Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How does (where is) the the cut&paste function for PUTTY under Ubuntu ?

EDIT: source text is not in the PUTTY window.

EDIT: Found the problem: the source text is in a Google Chrome tab which does not support "cutting" (at least for now).

EDIT: mea culpa: I realize now that SSH is preferred under Linux.

share|improve this question
Are you trying to "cut" or "copy"? Important difference. Is the text you're trying to select in a text box or displayed on a page (i.e. static text)? – tnorthcutt Sep 22 '09 at 20:08
Why would anyone use putty on Linux? – innaM Sep 22 '09 at 20:23
This question doesn't make sense. PUTTY on Linux? ssh under gnome-terminal, yakuake, tilda... all vastly superior. – The How-To Geek Sep 22 '09 at 20:31
PUTTY on Linux? Why – Shiplu Dec 21 '11 at 12:16
Your third edit doesn't make sense either: Putty is SSH (most often), the point of the comments was that there are superior terminals under Linux. – Benjamin Bannier Jan 26 '12 at 0:13
up vote 4 down vote accepted

You can use the right mouse button to copy it, then click the middle mouse button (wheel) to paste.

share|improve this answer
But what about 'cutting' text from another window? – jldupont Sep 22 '09 at 19:29
copy it from another window, then use middle mouse button on the putty window. – John T Sep 22 '09 at 19:37
@John T: does not work for me. – jldupont Sep 22 '09 at 19:39
Weird, does for me: – John T Sep 22 '09 at 19:41
@John T : the issue is with Google Chrome... – jldupont Sep 22 '09 at 19:57

I solved this issue using 2 methods:

1. Using PuTTY Linux version:

Clicking both touchpad buttons, I simulated the middle button.

I needed to enable it manually, since the Linux Mint distro I'm using had not this middle button simulation activated. The latest version of evdev, version 2.5, changed the default for the middle mouse button emulation code. This change has disabled emulation of the middle mouse button by clicking the left and right mouse buttons.

To enable the middle mouse button emulation, add this to xorg.conf:

Section "InputClass"
Identifier "middle button emulation class"
MatchIsPointer "on"
Option "Emulate3Buttons" "on"

2. Using PuTTY Windows version

I prefer that since I do not need to change distro settings like Xorg, only Wine settings in order to connect to console serial ports:

Since Wine handles com ports by having a link to the device (i.e. /dev/ttyUSB0), in the ~/.wine/dosdevices folder, this link would be created as follows, in order to update your wine profile configs:

ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1

I prefer this second method. Since copying and pasting always works, I do not need the middle button simulation and, the cherry on top of the cake, it NEVER hangs (occasionally PuTTY hangs on some Windows XP installations).

Otherwise, in case you do not need/want to install Wine, the first method is preferable.

share|improve this answer

I replaced all occurences of GDK_SELECTION_PRIMARY with GDK_SELECTION_CLIPBOARD in unix/gtkwin.c and unix/gtkdlg.c in the sources, then recompiled. I also had to add '#include "../proxy.h"' to unix/uxproxy.c to get it to recompile, but that's maybe because I'm on FreeBSD.

Anyway, the end result is that it recompiled, and works with the more-or-less expected behaviour.

share|improve this answer

In Ubuntu 12.04, I was able to paste using Ctrl + Shift + Insert after copying text from a Firefox window or text editor.

share|improve this answer

Just highlight the text for copy and right click for paste.

share|improve this answer
If only it was that easy... this works under the Windows version but not the Linux version AFAIK – jldupont Sep 22 '09 at 19:22
I just tried this running Chrome in Ubuntu inside VirtualBox, and it worked perfectly fine for me. – tnorthcutt Sep 22 '09 at 20:12
@tnorthcutt: maybe some key event handlers are blocking the "cut" functionality on the web page in question. – jldupont Sep 22 '09 at 20:37

One other thing to watch out for (which I just learned about) is that on desktop Linux there are often two different "clipboards" that text can be copied to: X/X11 clipboard and the Gnome/GTK clipboard. This threw me for a bit. I could paste text into some windows, but depending on where I copied it from I couldn't paste in to Putty.

Basically, some applications handle the multiple clipboards and some do not. A few solutions can be found here:
How can I merge the gnome clipboard and the X selection?

One of the most popular programs for syncing both clipboards is autocutsel.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .