CSC128: Introduction to UNIX

Cutting and Pasting in X-windows, putty and MS Windows


Cut and Paste

Basically cut and paste works differently in X or putty than it does in Windows. In Windows, you must tell the OS when to move selected text to the clipboard by hitting CTRL-C or going to the menu 'Edit | Copy'. In X just highliting it moves it to the clipboard. In MS Windows pasting is done with CTRL-V or the 'Edit | Paste' menu. The putty program, even though it is a Windows program behaves much like as if it was an X-windows application.

Copying Text:

In Windows you must highlight text THEN move it to the 'clipboard' by hitting CTRL-C or selecting 'Edit | Copy' from the window's menu.

In putty and in an X-window, any selected or highlited text in any window, is the text that is currently on the clipboard. So, just highliting it makes it be on the 'clipboard' with no need to hit CTRL-C or 'Edit | Copy'

Copying between 2 putty sessions:

In order to cut and paste in and out of one putty session to another, you would highlight your text in the first putty window and they you would go to the other putty window where you were trying to paste the text and hit the middle mouse button or wheel to paste. If you do not have a middle mouse button, or if using the scroll wheel as a middle button does not work, you should click both buttons at once or the right mouse button, which will paste.

Going from a web browser to a putty window:

If you are pasting INTO a putty session, you should just be able to paste into the putty session with the middle (or both) mouse button(s). So, for instance, you can find a command somewhere on my web site using a browser, highlight it and hit CTRL-C then paste that command directly into the putty window at the shell prompt by hitting the middle mouse button.

Pasting into a Windows program from a putty session:

You can select text (suppose from a vi session) inside of a putty window (remember no CTRL-C requirewd here). Then go to your Windows program and hit the middle mouse button or 'Edit | paste' and the text will be pasted. When pasting into a window in Netscape for example, sometimes you will have to select 'paste' from a little menu that pops up after you clicked the middle mouse button.

Pasting text from anywhere into a vi session:

If you are trying to paste into a file that your are editing in vi, you MUST press insert first, then use the mouse buttons to paste.

If you are copying a file from a Windows program, you should select the text first and then choose 'Edit | copy ' or just hit CTRL-C which will move that text to the Windows clipboard (note that you do not have to inform X or putty to move stuff to the clipboard, if it is selected or highlited with the mouse it already is on the clipboard)