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?


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.

  • 2
    Could 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. – Frank Oct 20 '10 at 0:00
  • I'm not seeing the documented behavior, just what X normally does. – Ignacio Vazquez-Abrams Oct 20 '10 at 0:04
  • 1
    My X server doesn't copy on select, nor paste on middle click. Now, if I could just track down how I did it.... – Coderer Mar 11 '11 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). – Drooling_Sheep Mar 23 '11 at 1:37
  • 1
    Why 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... – Daniel Mar 2 '18 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:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.