Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I would like to change the mapping of my touchpad (of an eee-pc with Linux Mint 16 MATE edition) so that a two fingers tap is a middle click and three is right click.

For that I add the ButtonMapping option to /usr/share/X11/xorg.conf.d/50-synaptics.conf:

Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
      MatchDevicePath "/dev/input/event*"
        Option "ButtonMapping" "1 3 2 4 5"
EndSection

But it has no effect.

This xinput command does work, but is lost on reset (and it doesn't work in ~/.xinitrc or other init scripts I've tried):

xinput set-button-map "ETPS/2 Elantech Touchpad" 1 3 2 4 5

Update: xclip is not actually what I want as it changes also the physical keys. However it did work in the MATE startup applications. The following doesn't, but does what I want when manually executed:

#!/bin/sh
synclient TapButton2=2
synclient TapButton3=3
share|improve this question

1 Answer 1

Idea #1 - gnome-session-proerties

Depending on how you'd like to solve this I can think of one way which should "just work". I would create an application that runs when you login and add a shell script to this list that runs this particular command. This will enforce the running of this any time you login.

#!/bin/bash

xinput set-button-map "ETPS/2 Elantech Touchpad" 1 3 2 4 5

Then add this script to the "Startup Applications Preferences" dialog in GNOME.

$ gnome-session-properties

                       ss #1

After adding an item to this dialog make sure that it's checked so that it'll run during logins.

Idea #2 - Adding options to 50-synaptics.conf

Since you're dealing with a Synaptic touchpad you could add the following to your "Xorg.conf.d" directory. This is right from the synaptic man page. This is boilerplate for a InputDevice rule you could add.

   Section "InputDevice"
     Identifier "devname"
     Driver "synaptics"
     Option "Device"   "devpath"
     Option "Path"     "path"
     ...
   EndSection

Again from the man page are the following options you could use:

   Option "TapButton2" "integer"
          Which mouse button is reported on a non-corner two-finger tap.  Set 
          to 0 to disable. Property: "Synaptics Tap Action"

   Option "TapButton3" "integer"
          Which mouse button is reported on a non-corner three-finger tap.  
          Set to 0 to disable. Property: "Synaptics Tap Action"

So putting it all together you could do something like this to the file: /usr/share/X11/xorg.conf.d/50-synaptics.conf:

Section "InputClass"
        Identifier "Switch key mappings"
        MatchDriver "synaptic"
        Option "TapButton2" "2"
        Option "TapButton3" "3"
EndSection

Also I think I would add this stanza to its own file under /etc/X11/xorg.conf.d/50-synaptics.conf instead. This directory is meant for overriding or appending additional customizations. That way if you do a system update your changes will not be impacted if the file under /usr/share/X11 are touched.

share|improve this answer
    
Unfortunately this is not working. Don't really understand why. –  Zah Apr 17 at 13:11
    
@Zah - what version of Linux is this? There are other ways to do the above but they quickly devolve into a multitude of ways. –  slm Apr 17 at 14:35
    
Please see update. –  Zah Apr 18 at 12:05
    
@Zah - see updates. –  slm Apr 18 at 12:56
    
Not working.... guess something is overriding the conf. Also tried calling the file /etc/X11/xorg.conf.d/999-synaptics.conf –  Zah Apr 19 at 10:46

Your Answer

 
discard

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.