12

I wish to have select-to-copy and right click to paste in a terminal. Gnome terminal doesn't support this out of the box I think so I guess I am going to have to find a different terminal.

Everything I read says this is not "very linux" and only provides alternatives...like middle button and CTRL+SHIFT+C/V...is there a terminal application that actually supports my requirements?

3 Answers 3

12

The X11 way is to paste with middle-click, which can be simulated by clicking left and right mouse buttons simultaneously.

If you absolutely require paste on right-click you'll either sacrifice other functionality (normal right-click) or you'll need to patch gnome-terminal yourself.

Re-map your right-click to act as middle-click

Use xmodmap to disable the middle button and re-map the right button to act as middle. This will affect all X applications, so it doesn't seem desirable. To temporarily see if this is the behavior you want, run this command:

xmodmap -e 'pointer = 1 0 2'

If you prefer to swap the middle and right buttons, try this instead:

xmodmap -e 'pointer = 1 3 2'

Rebuild gnome-terminal with a patch to allow middle-click paste

Instructions for doing this for gnome-terminal 2.32 (Ubuntu 11.04) are available here: http://www.taika.org/~tomba/gnome-terminal/index.html

The current version of gnome-terminal is 3.6 (Ubuntu 14.04). Writing and applying a good patch is a very advanced procedure. I recommend you try learning to use middle-click or left+right "mouse chording," and if those don't satisfy you then swap your right and middle mouse buttons using xmodmap. If you really want to try the patch, leave a comment, and I'll work through it with you.

1

Terminator has this option. It both smart-copies the highlighted text, and uses mouse-right to paste:

https://launchpad.net/terminator

https://www.tecmint.com/terminator-a-linux-terminal-emulator-to-manage-multiple-terminal-windows/

0

It is year 2022 now and Terminal's Edit > Preferences > Advanced (tab) has a checkbox named Automatically copy selection to clipboard which is related to copy & paste via mouse.

(for those of us missing the old X-Window/XTerm/PuTTY behavior)

You must log in to answer this question.

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