6

I need to bind the TapButton3 as central mouse button so i do:

synclient TapButton3=2

it works great but when i restart or wake up from suspension it forgets the setting. i know that i have to create the xorg.conf as follows

Section "InputClass" 
Identifier "touchpad catchall" 
    Driver "synaptics" 
    MatchIsTouchpad "on" 
    Option "TapButton3" "2" 
EndSection

but this doesen't work. anyone can help me? ...please?

Jorge Castro
  • 71,754

2 Answers2

3

I created the /etc/X11/xorg.conf.d/71-synaptics.conf file with the following contents with sudo vi:

Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
        Option "TapButton3" "2"
EndSection

and I can see in /var/log/Xorg.0.log that the option has been set.

[ 91056.468] (**) Option "TapButton3" "2"

The option was merged with options I had set similarly in my 70-synaptics.conf file.

If your device uses a different device or different driver (see the /var/log/Xorg.0.log to see), you should adjust the Identifier and Driver lines appropriately.

Another approach is to disable the gnome mouse settings plugin.

  • To do this start a terminal with Alt+Ctl+T, and then install the dconf-editor:

    apt-get install dconf-editor hleinone

  • Launch dconf-editor

    dconf-editor

and navigate the tree to org.gnome.settings-daemon.plugins.mouse.

  • Finally, uncheck the Active box

A drawback of this latter approach is that no settings you configure in System Settings-> Mouse and Touchpad will be effective.

This approach, from the comments, is from here by way of hleinone.

John S Gruber
  • 13,336
  • I have the above configuration and still when I return from suspend the TapButton3 is back at 0. – hleinone Jun 10 '12 at 16:44
  • @hleinone What does the /var/log/Xorg.0.log file say? Can you see that it doesn't set it, or that it sets it and sets it back. If the latter, when does the reset happen and are there any helpful messages around the time it happens? – John S Gruber Jun 10 '12 at 16:55
  • I don't see it being set on the log. – hleinone Jun 10 '12 at 17:05
  • I'd suggest that you look at the first 50 lines of your /var/log/Xorg.0.log file to your question. Mine says: Using config directory: "/etc/X11/xorg.conf.d" . If you still also have a /etc/X11/xorg.conf file both the file and the directory presumably should be listed. If it says that and you are sure of all the other details you might try adding a different option and see if the log says that is set (determine if it doesn't like the option in the file or if it doesn't find like the file). – John S Gruber Jun 10 '12 at 18:07
  • Mine says: Using config directory: "/etc/X11/xorg.conf.d" and Using system config directory "/usr/share/X11/xorg.conf.d" No mention about /etc/X11/xorg.conf since it doesn't exist. – hleinone Jun 10 '12 at 18:22
  • @hleinone, you can try to set another option and see if it shows it is set. You should also check to see that a synaptics touchpad was found. Mine says: config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event8), followed by LoadModule: "synaptics", followed by: Loading /usr/lib/xorg/modules/input/synaptics_drv.so. It must be a touchpad and must be handled by the Xorg synaptics driver in order to match the rule. – John S Gruber Jun 10 '12 at 19:09
  • Ok, there's config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/event6) then followed by those two lines you mentioned. And actually there's the Option "TapButton3" "1" as well (I changed it to 1). But on boot it's back at 0. I removed all the other means of fixing this issue, so there's only the 71-synaptics.conf file. – hleinone Jun 10 '12 at 19:44
  • How ever I set it up in the /etc/X11/xorg.conf.d/71-synaptics.conf it'll always be overridden by 0 on boot and doesn't seem to have any effect on suspend. As advised here the startup application trick works for startup, but doesn't help at all on returning from suspend. – hleinone Jun 10 '12 at 21:10
  • I used the solution described in here to solve this. So unchecking the org.gnome.settings-daemon.plugins.mouse active box in dconf-editor. – hleinone Jun 10 '12 at 21:54
1

Old Answer

You can use ClickFinger3 instead, which is quite close to TapButton3.

I encountered exactly the same problem. In addition to TapButton3, my conf file also set ClickFinger3 to 2.

Section "InputClass"
        Identifier "touchpad bind middle button"
        MatchDriver "synaptics"
        Option "TapButton3" "2"
        Option "ClickFinger3" "2"
EndSection

However, my Xorg.0.log does have the following.

[    35.860] (**) Option "TapButton3" "2"
[    35.860] (**) Option "ClickFinger3" "2"

The ironic thing is ClickFinger3 works pretty well but TapButton3 doesn't even work.

I also tried to put synclient TapButton3=2 ClickFinger3=2 in the .xsessionrc file, in the startup application script.

I tried this

xinput set-prop --type=int --format=8 "SYNA2393:00 06CB:75E2 Touchpad" "Synaptics Tap Action" \
       `xinput list-props "SYNA2393:00 06CB:75E2 Touchpad" | sed -n 's/,//g; s/Synaptics Tap Action.*:\(.*\)./\1/p'` 2

and that

xinput set-prop --type=int --format=8 "SYNA2393:00 06CB:75E2 Touchpad" "Synaptics Tap Action" 2 3 0 0 1 3 2

To no avail, none of them works for TapButton3 and all of them works for ClickFinger3. I spent a day (literally, no exaggeration) to research about it and arrived at this conclusion.

This line of code is very likely to the cause of this strange behavior.

References:
state of multitouch gestures in 14.04 / Unity
How can I disable arbitrary default multitouch gestures in Unity?


New Answer

I found the real solution after I wrote the above.

Accidentally, I unchecked the "Tap to Click" option in Mouse & Touchpad via GUI and then read the output of synclient. I observed that all the tap related values had been set to 0. This made me believe that the Unity mouse panel executes synclient upon login and sets "Synaptics Tap Action" to 2, 3, 0, 0, 1, 3, 0.

To verify my conjecture, I needed to disable this GUI thing. I googled "ubuntu unity control center override synclient" and got this link as the top result.

I conducted an experiment by deactivating the GNOME mouse plugin.

gsettings set org.gnome.settings-daemon.plugins.mouse active false

Then I rebooted, hooray, the TapButton3 finally worked after login. I jollied around and soon found out my usual natural (reverse?) scrolling, which I set through GUI settings , no longer worked. After some investigation, I gathered the following actions (possibly incomplete) made by GNOME mouse plugin.

synclient HorizTwoFingerScroll=1 VertEdgeScroll=0
syndaemon -i 1.0 -t -K -R &

I can now make touchpad settings on a per-user base (which I prefer). So I removed my synaptics.conf file and wrote the following as my ~/.xsessionrc.

synclient TapButton3=2 ClickFinger3=2
synclient HorizTwoFingerScroll=1 VertEdgeScroll=0
# the following ampersand is significant
syndaemon -i 1.0 -t -K -R &
# natural scrolling
synclient VertScrollDelta=-28 HorizScrollDelta=-28

Reference:
How do I make my synclient settings stick?

Lei Zhao
  • 301
  • 2
  • 7