Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

I was using the mouse copy-paste extensively, until recently, when some OpenSuSe upgrade reconfigured this on all my machines. Now the scrollbuton is the one to paste (which I hate, since it's hard to click without scrolling, and I also click it sometimes accidentally).

Where is this configured? Ideally I would love something that I can add to session start (for both Gnome and KDE).

share|improve this question
It would be helpful if you could describe your desired behavior. If you don't want to use the scrollbutton to paste, what would you rather use? – Faheem Mitha Mar 23 '11 at 18:10
@Faheem Uhm, care to read the title? – Let_Me_Be Mar 23 '11 at 18:49
Oops. – Faheem Mitha Mar 23 '11 at 18:52
askubuntu.com/questions/160164/… answers this question with some noob friendly/GUI solutions. It doesn't require ubuntu, rather: gpointing-device-settings , gsettings or synclient – pd12 Jun 7 '15 at 6:21
up vote 2 down vote accepted

It is configured in /etc/X11/xorg.conf.

You'll see a section that looks like

Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "mouse"
        Option          "CorePointer"
        Option          "Device"                "/dev/input/mice"
        Option          "Protocol"              "ImPS/2"
        Option          "Emulate3Buttons"       "true"

Here is a random vaguely relevant link from SU.


share|improve this answer
Is there any way this can be configured without modifying xorg.conf? This is also an issue on machines where I don't have root. – Let_Me_Be Mar 23 '11 at 18:50
@Let_Me_Be: There might be. I'm not aware of one. – Faheem Mitha Mar 23 '11 at 18:55

You can set this property with xinput. Run xinput list to see the list of connected input devices. Note the exact name or the number of the device corresponding to your mouse (not the “Virtual core pointer”, but something like “Logitech USB-PS/2 Mouse M-BA47”). The name depends on your mouse model; I think the number is assigned dynamically, so you might need to do a bit of parsing to cope with multiple machines.

Then, run

xinput set-prop "$device_name_or_number" "Evdev Middle Button Emulation" 1

Run xinput list-props "$device_name_or_number" to see a list of available properties, the exact set is different on different systems.

While you're at it, you might want to tune other settings (run xinput list-props "$device_name_or_number" to see what settings exist). In particular, by default, I think the emulated middle button will be the same as the mouse wheel press, but that should be fixable by reassigning the wheel button (Evdev Wheel Emulation Button).

See also Configuring Input Devices on the Ubuntu wiki.

share|improve this answer
This answer is more correct because xorg.conf is missing on many modern systems (and has been missing for quite a while). – Mischa Arefiev Oct 24 '12 at 11:48
I wonder whether the effect of the above command is "sticky" between sessions. At any rate, it works for me and now I can actually use The Gimp! – Lori Mar 24 at 15:29
@Lori It isn't sticky. Typically you'd put this in a script and add that script to your startup applications. – Gilles Mar 24 at 15:38

The third mouse button can be enabled system wide by adding a file /etc/X11/xorg.conf.d/20-3rdbutton.conf with the following content:

Section "InputClass"
   Identifier "middle button"
   MatchIsPointer "on"
   MatchDriver "libinput"
   Option "MiddleEmulation" "on"

I use this on my HP nc2400 with Fedora 23, and it works.

The source of this information is the corrected and adapted config of comment 14 of Red Hat’s bug 1227992.

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.