6

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

David Foerster
  • 36,264
  • 56
  • 94
  • 147

2 Answers2

4

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

jotrocken
  • 342
  • 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 08:14
1

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.