3

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.

6
  • 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)? Sep 22, 2009 at 20:08
  • 3
    Why would anyone use putty on Linux?
    – innaM
    Sep 22, 2009 at 20:23
  • This question doesn't make sense. PUTTY on Linux? ssh under gnome-terminal, yakuake, tilda... all vastly superior. Sep 22, 2009 at 20:31
  • 1
    PUTTY on Linux? Why Dec 21, 2011 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. Jan 26, 2012 at 0:13

6 Answers 6

4

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

6
  • 1
    But what about 'cutting' text from another window?
    – jldupont
    Sep 22, 2009 at 19:29
  • copy it from another window, then use middle mouse button on the putty window.
    – user1931
    Sep 22, 2009 at 19:37
  • @John T: does not work for me.
    – jldupont
    Sep 22, 2009 at 19:39
  • Weird, does for me: i38.tinypic.com/2zscsvn.png
    – user1931
    Sep 22, 2009 at 19:41
  • @John T : the issue is with Google Chrome...
    – jldupont
    Sep 22, 2009 at 19:57
2

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"
EndSection

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.

2

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

1

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.

1

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.

0

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

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

You must log in to answer this question.

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