15

i'm used to using putty on a window's machine. With putty whatever you select is automatically on the clipboard without having to right click and select copy. And right click just pastes.

5 Answers 5

20

A little known feature of the X server in Linux and other UNIX-like operating systems gets you half of the way there.

Anything you highlight in Linux, regardless of the program, is put into a special clipboard buffer, which you can paste using your mouse's middle (wheel) button (which is emulated on many laptops by pushing both buttons at the same time). You can also use a keyboard shortcut, if you like.

Unfortunately, I don't think you can change gnome-terminal's right-click behavior.

0
1

The solution involves you to download source code of gnome terminal and apply the patch and then you will need to build a package which will build deb packages and then you can just install from those packages.

For more clear instructions you can view this page.

1

Adding this to ~/.Xresources (create if it doesn't exist) worked for me:

xterm*selectToClipboard: true

Just log out and back in, or do a restart. Selected text will then be automatically copied and you can paste it with middle-click (when middle-click is enabled in Gnome-Tweaks)

0
1

I'm using xfce with ubuntu. In that terminal you need to check the box:

Edit->Preferences->General->Automatically copy selection to clipboard

Paste is with middle click. I dunno about paste with right click.

This is the screen from xfce4-terminal 0.8.9.1:

enter image description here

4
  • "Automatically copy selection" is not an option Nov 21, 2023 at 23:11
  • I just pasted a screen shot to prove I'm not making this up. :-) @PhilipRego maybe you are using a different version of xfce4-terminal?
    – poleguy
    Nov 23, 2023 at 0:09
  • You didn't say you were using that terminal. I'm using GNOME Terminal Version 3.46.8. The question is tagged gnome-terminal, so the correct answer is you cannot copy to the clipboard with gnome-terminal on highlight. Nov 28, 2023 at 16:05
  • You're right, I said I was using xfce and referred to "that terminal" by which I meant xfce4-terminal. A bit unclear, I guess. The question didn't specify gnome or gnome-terminal, only Ubuntu, and it is tagged with 'putty' as well... I did not limit myself to those tags. I saw no answer for myself, an Ubuntu xfce user, and the question applies to xfce as well. We could add the xfce tag too?
    – poleguy
    Nov 30, 2023 at 13:12
-1

"Terminator" emulator has this feature built-in. Mark the text from the "Terminator" and it's going to your clipboard.

You must log in to answer this question.

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