I looked for the topic, but I only find information on how to have middle click emulation (wheel click) using taps with N fingers. I want to have the emulation with the real buttons under the trackpads AND mice connected through USB. For this topic, I saw adding the flag in /etc/X11/xorg.conf, but it does seem to not exist / have moved in Ubuntu 12.04

up vote 4 down vote accepted

In previous versions of Ubuntu I used to enable middle mouse emulation with gpointing-device-settings. The package exists for 14.04 as well, so I guess it still works:

sudo apt-get install gpointing-device-settings
gpointing-device-settings

Update 1: gpointing-device-settings crashes on 14.04. But I found a workaround to manually enable middle mouse emulation in dconf:

sudo apt-get install dconf-editor
dconf-editor

Navigate to /org/gnome/settings-daemon/peripherals/mouse and activate middle-button-enabled.

Update 2: None of the methods above are still valid for 16.04 LTS. But the first step from this official workaround helped. Note that the remaining steps of the guide might not be applicable.

Create the file /usr/share/X11/xorg.conf.d/middle-mouse-button.conf and insert

Section "InputClass"
     Identifier "middle button emulation class"
     MatchIsPointer "on"
     Option "Emulate3Buttons" "on"
EndSection

Update 3: This changed again after Ubuntu uses Gnome again. For 17.10, 18.04 and so forth the setting can be applied using the Gnome Tweak Tool as described in this Q&A: Keyboard & Mouse -> Middle Click Paste

  • 1
    thank you. It didn't work for me (gnome+ xmonad, touchpad) though. I resorted to "synclient TapButton3=2" and use triple tap as copy – user274992 Aug 22 '14 at 8:14

Following up @jotrocken's answer, the configuration almost works. It should be:

Section "InputClass"
     Identifier "middle button emulation class"
     MatchIsPointer "on"
     Option "Emulate3Buttons" "True"
EndSection

Then restart lightdm or other DM running on your system currently.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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