Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Linux by default the middle mouse button (i.e. wheel) copies the selected text into the place of cursor.

This causes accidental pasting while I'm trying to scroll code / config files via the mouse - especially in Eclipse.

Any idea how to disable it?

Update :

The main problem is that I'm using FreeNX for remote terminal, and don't have the mouse section in my xorg.conf. I guess it's because FreeNX uses some sort of virtual mouse.

Is it possible to turn it off in FreeNX, or in Gnome windows manager?


share|improve this question

migrated from Feb 23 '10 at 12:25

This question came from our site for system and network administrators.

Which window manager are you using, e.g. KDE, Gnome? – Scott Pack Feb 21 '10 at 13:10
I had a problem like this with the Logitech G5. I eventually just got a new mouse that wasn't as finnicky instead. – jrod Feb 21 '10 at 13:23
I'm using Gnome. – Anonymous Feb 21 '10 at 21:21

IMHO, that's a feature that missing on non-X11 platforms. :)

If you're using KDE or GNOME you should start poking around their respective mouse configuration panels.

Failing that, check This page lists a few ways to tweak your X11 configuration files.

You may be able to get away with something like:

xmodmap -e "pointer = 1 0 3 4 5"
share|improve this answer
This works, I used it to move the middle button to one of the side buttons. – Kyle Brandt Feb 21 '10 at 16:09
What if I'm using FreeNX terminal server, and I don't have the Mouse section in the xorg.conf? Will it still work if I create a new Mouse section there? – Anonymous Feb 21 '10 at 21:21

found the answer here:

From the article: Replace the emulate3button option in your xorg.conf file with this:

Option "ButtonMapping" "1 1 3 4 5"

This remaps the middle button into the left button, essentially turning the middle-click into a left-click.

share|improve this answer

Check your window manager preferences to see if there's an easy way to set Button 2 to something else. If that doesn't work, you can use xmodmap to map that button away.

share|improve this answer

Your Answer


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.