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
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.
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)
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:
-
-
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?– poleguyNov 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?– poleguyNov 30, 2023 at 13:12
"Terminator" emulator has this feature built-in. Mark the text from the "Terminator" and it's going to your clipboard.