Comment 67 for bug 489830

Revision history for this message
Gameover (a20365354-z) wrote :

A fix without using gpointing-device-settings:
First, type "xinput" in terminal. It will list your input devices. You should see something like this:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Genius Optical Mouse id=8 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
    ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
    ↳ Power Button id=6 [slave keyboard (3)]
    ↳ Power Button id=7 [slave keyboard (3)]
    ↳ AT Translated Set 2 keyboard id=9 [slave keyboard (3)]
In my case, Genius Optical Mouse is my mouse, its id is 8.
Then, type "xinput list-props <your mouse device id> | grep "Evdev Middle Button". You will get something like this:
 Evdev Middle Button Emulation (259): 0
 Evdev Middle Button Timeout (260): 50
The id in my case, the id of "Evdev Middle Button Emulation" is 256
Then, type "xinput set-int-prop <your mouse device id> <id of Evdev Middle Button Emulation> 8 1"
In my case, I should type "xinput set-int-prop 8 259 8 1"
BONUS: you can set the timeout with "xinput set-int-prop <your mouse device id> <id of Evdev Middle Button Timeout> 32 <timeout>"

If it works, then add "xinput set-int-prop <your mouse device id> <id of Evdev Middle Button Emulation> 8 1" to your session startup application. Please refer to https://help.ubuntu.com/community/AddingProgramToSessionStartup

Hope this helps. :)