Arch Linux – PuTTY Pasting

Published on July 6, 2022 at 6:29 pm by LEW

Introduction

Today I am posting a short article on pasting text into a PuTTY terminal under Arch Linux. I just had this issue, and managed to resolve it, in spite of searching the forums.

For those who do not know, PuTTY is a suit of open source terminal emulators that can be used with SSH. Technically it can be used with TELNET and several other protocols also.

I have been using PuTTY on Debian for a long time. I was surprised to run into issues doing copy paste operations under ARCH. And, somewhat unusually in this case, the Arch Wiki and forums were not much help. Some were even a little snarky.

The Issue With Copy Paste in PuTTY

This one is easy, it did not work out of the box.

Most people know how to copy and paste. Basically you copy something with a right mouse click or a control + c, and paste it with a right mouse click, or control +v. Under Linux the middle mouse button has been used for pasting sometimes. Also from a terminal shit + insert can be used to paste.

When I installed PuTTY on Arch and tried to copy paste, nothing was working. So I decided to do an online search for some help. I found a lot of articles suggesting some or all of the above methods, so not much use.

I also read several articles about multiple clipboard buffers under Linux and xorg, but none of that yielded any useful results. Neither did some possible suggestions about using Wayland instead of xorg.

Some of the entries I really found less than useful suggested using the command line for SSH. Not totally out of the question, but there are advantages to using a program with a GUI. For me the command line is not a problem. I just wish some of the responders sounded a bit less snarky.

There are also several other programs that can replace Putty. But one of the things I try to do is maintain as much program similarity between my various computing environments. So I wanted to use PuTTY, as I used it elsewhere.

The Solution

After all that, the solution was actually pretty simple. I am sure lots of people have figured out that it is a configuration issue causing this problem. However in this case the configuration issue was not with Linux. Or rather it was with the Arch build of the Putty program. So lets get straight to the solution I used. Note this worked on my install, it might or might not work on yours.

As of this writing I am running KDE 5.25.2 with Wayland on Arch Linux. I am also running PuTTY release 0.77 from the Arch repository.

Lets open up PuTTY and create a new session. DO NOT CLICK OPEN YET! We give our session a name and set the basic parameters; IP address, Port Number, SSH. Then we save it. Something I cannot do in the current terminal application.

Now working with my session, in the left hand menu I go down to Window > Selection. Under Selection there is a section called “Assign copy/paste actions to clipboard”.

This is where you setup how PuTTY handles copy/paste/. On my install they were all initially set to Primary. I flipped one over to clipboard, then saved my session so it would not be forgotten. And that resolved my copy/paste problem with PuTTY.

Conclusion

I hope this helps someone fix their copy/paste problem with PuTTY. I know when I looked into it, the online information I found did not exactly point to a solution.

 

Add New Comment

Your email address will not be published. Required fields are marked *