The clipboard is not shared with PuTTY under CentOS

0

I'm running CentOS 6 on the local machine and using PuTTY.

Selection, copying and pasting text works well inside the PuTTY session. But the clipboard content on the local machine does not change.

My PuTTY version:

Installed Packages
Name        : putty
Arch        : x86_64
Version     : 0.62
Release     : 1.el6.rf
Size        : 4.5 M
Repo        : installed
From repo   : rpmforge
Summary     : Graphical SSH, Telnet and Rlogin client

How to share the clipboard?

Olexandr

Posted 2013-04-06T06:40:42.310

Reputation: 3

Answers

0

First of all, as William P. Botha said there is absolutely no reason to use putty on Linux. Just open your favorite terminal emulator and run ssh or whatever it is you need to do:

$ ssh user@remote.server.com
$ scp local_file.txt user@remote.server.com:/path/to/remote/file.txt

As for the clipboard, this gets slightly complicated under *nix. You are probably running afoul of the multiple clipboards offered by X (this is a feature, not a bug). Briefly, there are two main "clipboards" for *nix, the PRIMARY and CLIPBOARD. When you select text, that gets copied to the PRIMARY and can be pasted using the middle button of your mouse. Ctrl+C copies to the CLIPBOARD and can be pasted using Ctrl+V. So, depending on which clipboard is in use, you can paste using a different method. See this page on the Arch wiki for some more info.

You may also find one of the may "clipboard managers" useful. They allow you to switch between the clipboards in use and to save some previous selections in a sort of clipboard history to paste on demand. Some of the better known ones are:

  • clipit
  • glippy
  • glipper
  • parcellite
  • klipper

terdon

Posted 2013-04-06T06:40:42.310

Reputation: 45 216

Thank you very much! Also my thanks to mabagu and Willem P. Botha. – Olexandr – 2013-04-06T16:43:35.013

Really, I tried to paste using Ctrl+V. Pasting with middle mouse button works. Today I learned two things: about ssh command and about two "clipboards" for *nix. – Olexandr – 2013-04-06T16:50:45.703

I would vote up, but do not have enough reputation yet. – Olexandr – 2013-04-07T05:28:30.457

1

I would recommend just using the standard terminal or console for this in CentOS as it does everything you need. Putty is normally just used for Windows to Linux.

Adesso

Posted 2013-04-06T06:40:42.310

Reputation: 131

0

There is a patch to PuTTY available, which is called puttyclip: "This page contains a patched version of putty that allows you to remotely print into the Windows clipboard. A tiny shell script, winclip, can utilize this capability to allow remote (e.g. Unix) programs to pipe their output to the local Windows clipboard, or to copy remote files to the Windows clipboard."

This is apparently not for your putty-version, however i have found a version 0.60 update patch on a blog that probably works with your 0.62 as well. Otherwise you would have to install PuTTY 0.60 if this function is important to you.

superuser0

Posted 2013-04-06T06:40:42.310

Reputation: 889

Thank you, Torben, but I'm not running Windows on the local machine. I'm running CentOS... – Olexandr – 2013-04-06T07:44:18.420

0

PuTTy doesn't have it's own clipboard. It uses the 'selection clipboard' from X. Accessible via middle mouse button.

Are you pasting outside PuTTy with middle mouse button? Did you try if pasting from outside PuTTy into Putty works?

mabagu

Posted 2013-04-06T06:40:42.310

Reputation: 321

-1

I've modified the Putty to make it copy selected text into clipboard. Check this out.

The putty on Linux is little bit uncomfortable to do "copy and paste". The middle button on the mouse does the job, but it is still tricky to aim the right position on the target window.

The patch in this thread enables putty to copy selected text into clipboard, so that I can use "Ctrl+v" for pasting.

The patch is generated against putty version 0.63.

The image below shows the diff output diff output

justin

Posted 2013-04-06T06:40:42.310

Reputation: 1