Gnome-terminal - How to Copy selection to clipboard automatically?

Viewed 60402

I want to make gnome-terminal behave in such a way that when the end user selects a region on the terminal (with a mouse or mouse key), it gets automatically copied into the clipboard. Is it possible at all? If so, how?

10 Answers

My Answer on superuser: https://superuser.com/a/1721880/1694169

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)

Related