Impossible to disable middle-click paste without breaking the middle mouse button

Bug #735665 reported by Aaron Kelley
80
This bug affects 17 people
Affects Status Importance Assigned to Milestone
GTK+
Fix Released
Medium
X.Org X server
Won't Fix
Medium
gtk+3.0 (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

I've found plenty of forum posts from other people complaining about this but I couldn't find an existing but report in Launchpad.

It baffles me to find that there is no way to disable the middle-click screen buffer "paste" feature without breaking the middle-click button on the mouse altogether. I'm sure there are lots of people who think it's nifty. However, for me and others, it is just annoying.

If I am scrolling in a text editor like Gedit and the middle-click button actually gets pressed, it often pastes a chunk of text in the middle of the document and I don't notice because I scroll right by. This leads to trouble later on.

My searching indicates that a common solution to this problem is to re-map the middle-click button to something else (so that it behaves like either the left or right button, or just does nothing), using xinput or by editing Xorg.conf. However, this breaks other applications that use the middle mouse button for other things (opening and closing tabs in Firefox, middle-click scroll).

There should be a solution to this problem other than "map the middle-click button to something else" and "get a new mouse that doesn't accidentally click." I don't care if it's setting an option in an obscure text file.

To reproduce:

 - Open Gedit.
 - Type some text.
 - Select some text.
 - Middle-click somewhere in the document.
 - Selected text is copied to where you middle-clicked.
 - No (documented) way to disable this behavior without re-mapping the middle-mouse button, breaking other middle-click functionality.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: ubuntu-desktop 1.207
ProcVersionSignature: Ubuntu 2.6.35-27.48-generic 2.6.35.11
Uname: Linux 2.6.35-27-generic x86_64
Architecture: amd64
Date: Tue Mar 15 15:00:42 2011
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubuntu-meta

Revision history for this message
Aaron Kelley (aaronkelley) wrote :
affects: ubuntu → xorg (Ubuntu)
Changed in xorg-server:
importance: Unknown → Medium
status: Unknown → Won't Fix
Revision history for this message
Bryce Harrington (bryce) wrote :

As per upstream's comments, X allows this to be configured, so it's up to the toolkit/desktop to expose the configuration functionality to users.

Note, sometimes desktop environments like to avoid providing too much configuration options to avoid confusing users, so will make educated choices about the optimum default settings and limit configuration. Thus it is possible this might be a WONTFIX bug by gnome-desktop; in such case your options are either to utilize the lower level config tools provided by X itself (e.g. xinput, as you mentioned), or if it really bothers you, select a desktop environment where these options are more exposed.

affects: xorg (Ubuntu) → gnome-desktop (Ubuntu)
Revision history for this message
adf88 (adf88) wrote :

This is not just a problem of accidental clicking. It makes middle mouse button unusable for text editors.

Revision history for this message
Anthony Dillon (ya-bo-ng) wrote :

+1 to allowing a user to disable the pasting ability with the middle button.

I writing alot of code in aptana studio and as i scroll up and down the page, my middle button sometimes clicks and as a results leaves errors in the code if I don't notice. I would expect a simple tick box to enable and disable this functionality in the mouse settings window.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-desktop (Ubuntu):
status: New → Confirmed
Changed in gnome-desktop (Ubuntu):
importance: Undecided → Wishlist
affects: gnome-desktop (Ubuntu) → gnome-settings-daemon (Ubuntu)
Revision history for this message
Sebastien Bacher (seb128) wrote :

GNOME bug https://bugzilla.gnome.org/show_bug.cgi?id=665193:
"Disable middle-click paste by default"

it's not exactly what is requested there but should be good enough

Changed in gnome-settings-daemon (Ubuntu):
status: Confirmed → Triaged
Changed in gnome-settings-daemon:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in gnome-settings-daemon:
status: Confirmed → Expired
Changed in gnome-settings-daemon:
status: Expired → Fix Released
Changed in gnome-settings-daemon:
status: Fix Released → Confirmed
Revision history for this message
supashang (supashang) wrote :

As a coder, this is a really annoying feature. I am most of the time in a Mumble channel chatting to friends as well as coding. My talk button is set to my middle mouse button and each time I chat I unknowingly paste clipboard data into my code. This causes the compiler to freak out and has me tracking down the code that the Middle Mouse Paste feature has pasted into my scripts!

I'm using Ubuntu 14.04 LTS.

Changed in gnome-settings-daemon:
status: Confirmed → Won't Fix
Changed in gnome-settings-daemon:
status: Won't Fix → Confirmed
Revision history for this message
peng cheng (pc175) wrote :

still not fixed after 6 years? This is absurd.

Revision history for this message
Mathew Hodson (mhodson) wrote :

Support for changing this was added to GTK.

You can create the file ~/.config/gtk-3.0/settings.ini with these contents:

[Settings]
gtk-enable-primary-paste=true

Or you can just use gnome-tweak-tool, which exposes this setting as a check box.

There is a GNOME bug https://bugzilla.gnome.org/show_bug.cgi?id=665193 for changing the default.

affects: gnome-settings-daemon (Ubuntu) → gtk+3.0 (Ubuntu)
Changed in gtk+3.0 (Ubuntu):
status: Triaged → Fix Released
affects: gnome-settings-daemon → gtk
Changed in gtk:
importance: Medium → Unknown
status: Confirmed → Unknown
Changed in gtk:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.