Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I don't like having the middle mouse button paste, because I often end up with uncompilable code in Eclipse. How can I turn this off (in all programs)? I'm running Fedora.

share|improve this question
3  
Middle-click to insert selection is fundamentally part of the way X11 works; see http://www.jwz.org/doc/x-cut-and-paste.html. –  ephemient Nov 10 '11 at 22:44
    
Just in Eclipse, or in all programs? –  Gilles Nov 10 '11 at 23:12
    
@Gilles: In all programs. :) –  derekhh Nov 10 '11 at 23:26
4  
I've not seen any trivial way to do this without nuking the middle mouse button altogether or hacking X or screwing with the normal clipboard as well, so my suggested "solution" is just to learn to use the middle mouse button properly. It's incredibly convenient to be able to highlight a text URL anywhere and go to it by middle clicking in my (FF) browser window. –  jw013 Nov 10 '11 at 23:51
add comment

4 Answers

Having the middle button paste is a unix user interface standard, like having the left button select or activate, and the right button do something else (such as extending, toggling, firing up a menu, …). You'll find it bound to pasting in most unix applications.

If your problem is that your mouse is overly sensitive when you put your finger on the wheel, I suggest getting a better mouse. There are plenty of cheap decent mice.

You can reassign mouse button 2 to a different number. Applications identify the left, middle and right mouse buttons as buttons 1, 2 and 3 respectively. Put this code in a script that's executed when your X session starts (how to do that depends on your desktop environment).

echo 'pointer = 1 6 3 4 5' | xmodmap -
share|improve this answer
add comment

It's a common convention that many programs abide by. There is no global way to turn it off, you must do it on a program by program basis.

EDIT: (short of, as Gilles says, disabling mouse button 2. But some programs do have other uses for mouse button 2, so I would not recommend this.)

share|improve this answer
add comment

Maybe you should try this:

For a solution to the problem, please view this guide I wrote: http://www.assembla.com/spaces/slipstream/wiki/Disabling_GTK's_middle_mouse_button_functionality

Or, more directly, here's the patch to disable the 'middle mouse button paste' functionality in GTK: http://subversion.assembla.com/svn/slipstream/patches/gtk_disable_middle_mouse_button_paste.patch

The original answer is over here http://askubuntu.com/questions/4507/how-do-i-disable-middle-mouse-button-click-paste

share|improve this answer
add comment
up vote -1 down vote accepted

Finally I'm using the blog post here to solve this problem: blog post

share|improve this answer
add comment

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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