Recently I found the auto-copy on selection feature of gnome-terminal really annoying. However, I tried to look for a way to disable it. As it turns out, there's few documentation for that. I was wondering if there's a way to disable this feature?
2 Answers
That's not gnome-terminal doing that, it's X. And there's no way to disable it since "copying" in modern environments is just copying the PRIMARY selection to the CLIPBOARD selection therefore disabling it would prevent any copying at all. Just learn to not hit the middle mouse button.
-
2Could you elaborate on that? According to Gnome Terminal Manual (library.gnome.org/users/gnome-terminal/stable/… ): "For all text selections, GNOME Terminal copies the selected text into the clipboard when you release the mouse button." Also, I wasn't using mouse middle button at all, just normal clicks.– FrankCommented Oct 20, 2010 at 0:00
-
I'm not seeing the documented behavior, just what X normally does. Commented Oct 20, 2010 at 0:04
-
1My X server doesn't copy on select, nor paste on middle click. Now, if I could just track down how I did it....– CodererCommented Mar 11, 2011 at 22:38
-
1@coderer If you figure it out, please let me know! My touchpad likes to throw spurious middle clicks from time to time, so that combined with my habit of selecting text as I read leads to unwanted pastes from time to time (~daily). Commented Mar 23, 2011 at 1:37
-
1Why is this even the default behavior? Even now, 7,5 years later, there is no option to disable the automatic copy. This is a dangerous feature and could possibly end up copying classified information. Some people use selection to make text more readable, i.e white text och black background. Selecting the text makes it easier to read, which doesn't mean the user wants to copy the text... Having copied text in clipboard could lead to unintentional pastes, and with today's auto save features to prevent work loss, classified info could potentially be persisted to a remote storage database...– DanielCommented Mar 2, 2018 at 12:04
If you want to prevent X clients from accessing the PRIMARY selection (i.e. when "copying" is done by merely selecting text and "pasting" is usually done by middle-clicking), I added an option for this to hax11:
https://github.com/CyberShadow/hax11 (see NoPrimarySelection
)
To enable it, install hax11, and in ~/.config/hax11/profiles/default
, add:
Enable=1
NoPrimarySelection=1
-
Yes, this is the only solution to disable middle mouse click paste that works, thanks!– d9kCommented Dec 27, 2021 at 20:32