Copy and Paste



next up previous contents index
Next: Unix Commands and Up: Your Workspace: xterm Previous: Setting Defaults in

Copy and Paste

Copying and pasting with xterm is easy and similar to the operations with PC windows. You can even cut and paste from one window to another, which also means from one application to another. This is particularly useful in editing files and in composing and modifying Unix commands, since you can copy job numbers or terrible file names.       

Copy
Depress the left mouse button. As you drag it over the text you want selected, the text is highlighted. Releasing the mouse button copies the selected text to the X clipboard (which you cannot view). To select a word, click twice on it; to select a line, click three times on it.
Paste
Move the cursor to the position where you want the text to be placed and then depress the middle button (or both buttons on two-mouse systems). In order for an editor to accept your paste, the editor must be in the insert or input mode. Emacs will use your copy once it's on the clipboard-but with Emacs' own conventions.

As an example, let's say you are mailing a note to anita and want to include a listing of the files in which she will find your program. You just pull down a menu to open another window, give the ls kabs/src command to get the listing, select for copying the file names by dragging with the left button depressed, and paste that list into your letter (which is in a different window) by depressing the middle mouse button. Before pasting, you must be sure your editor or mail program is in the input mode. Then you have to click your mouse to place the cursor where you want to paste the text. Your selected list remains on the X clipboard until another item is cut.

You can also use the X mouse for copying text from one file into another or even from one machine to another. Just open a window, log into the remote machine, and when you have placed the information you need on the remote window, select it in the same way. To place the information on the screen, you can display the file using more, your editor, cat, or whatever works for you.

Experienced users know that there's a long standing bug in xterm which causes it to hang, or stop, if you paste too large an amount of text. How large? Sorry, we can't tell you in advance. That will depend upon your system.



next up previous contents index
Next: Unix Commands and Up: Your Workspace: xterm Previous: Setting Defaults in