Elementary OS Luna 0.2 Synaptics Touchpad settings persistent

10,310

The short answer is yes, and by using:

synclient TapButton2=2

But this will only work until you reboot or shutdown, to make the changes persistent follow these few easy steps.


I found this Source to be very helpful.
Note: This has worked for all my Debian/Ubuntu based distributions.

These are the steps I took:

Setp 1: To determine your type of touchpad run the following command:

egrep -i 'synap|alps|etps' /proc/bus/input/devices

My output:

N: Name="SynPS/2 Synaptics TouchPad"

As you can see I have a 'Synaptics' type touchpad.

Step 2: To determine whether your touchpad will accept multitouch taps or not, run the following command:

grep "TouchPad: buttons:" /var/log/Xorg.0.log

My output:

[     7.480] (--) synaptics: SynPS/2 Synaptics TouchPad: buttons: left right double triple

This shows that my touchpad will accept 'double' and 'triple' finger taps. If you only see 'left' and 'right' listed, then your touch-pad does not support multi-touch.

Step 3: Current settings and Testing your new set-up.

To see what settings you currently have run:

synclient -l

You'll then get a long list of all the current settings for 'synclient', the one's your interested in are:

TapButton1              = 1
TapButton2              = 3
TapButton3              = 0
  • 'TapButton1' is a single/(one) finger tap
  • 'TapButton2' is a double/(two) finger tap
  • 'TapButton3' is a triple/(three) finger tap

The number after the '=' refer to the function executed by that type of tap.

  • '= 0' - disabled
  • '= 1' - 'left click' button function
  • '= 2' - 'middle' mouse button function
  • '= 3' - 'right click' button function

As you can see from the current settings the 'two-finger' tap is set to being*'right click'*. To change this to being the 'middle click' you'll need to change the 'TapButton2 = 3' to '= 2', do this using the following command:

synclient TapButton2=2

Now you should be able to use your touch-pad to do a two-finger tap to paste the most recent highlighted text under the mouse courser.

Step 4: Saving settings.

Your current changes will only work until your next shutdown or reboot. To save your settings you'll need to find where the settings are stored:

ls /usr/share/X11/xorg.conf.d

Output:

10-evdev.conf  11-evdev-quirks.conf  11-evdev-trackpoint.conf  50-synaptics.conf  50-synaptics.conf~  50-vmmouse.conf  50-wacom.conf  51-synaptics-quirks.conf  glamoregl.conf

Here the '50-synaptics.conf' file is the one we are interested in. Open as admin:

sudo scratch-text-editor /usr/share/X11/xorg.conf.d/50-synaptics.conf

or

sudo gedit /usr/share/X11/xorg.conf.d/50-synaptics.conf

Enter your password when prompted and add the following line just under the 'Section "InputClass" ' line and click save

    Option          "TapButton2"            "2"



Next time you boot you should be able to use 'double tap' as 'middle-click'.

Share:
10,310

Related videos on Youtube

Jompper
Author by

Jompper

Updated on September 18, 2022

Comments

  • Jompper
    Jompper over 1 year

    I have a problem making my touchpad settings persistent. I have installed Elementary OS Luna 0.2 few weeks ago, I'm quite new to linux but know my way around the computer.

    By default my Two Finger tap is set to right click, and I'd like to configure it to middle click. I'm able to set it right with command:

    /usr/bin/xinput set-prop "ETPS/2 Elantech Touchpad" "Synaptics Tap Action" 2 3 0 0 1 2 3
    

    I've set that command to run on startup in ~/.config/autostart/touchpad.desktop it's working fine when booting computer. But when I resume from standby the settings won't last. I heard I could setup /etc/pm/sleep.d/ script but for what I have read that it runs as a root user so I'd need to write a script which uses su and runs it as current user.

    Ok maybe I could do that but I was hoping to have my configuration in one file so that if I ever need to make any other settings to my touchpad default, I wouldn't have to modify many different files.

    I tried editing /etc/X11/xorg.conf.d/50-synaptics.conf

     Section "InputClass"
         Identifier "touchpad catchall"
         Driver "synaptics"
         MatchIsTouchpad "on"
         MatchDevicePath "/dev/input/event*"
         Option "TapButton2" "2"
         Option "TapButton3" "3"
     EndSection
    
     Section "InputClass"
         Identifier "touchpad ignore duplicates"
         MatchIsTouchpad "on"
         MatchOS "Linux"
         MatchDevicePath "/dev/input/mouse*"
         Option "Ignore" "on"
     EndSection
    

    But for some reason that wouldn't work either. Here's my Xorg.0.log from system start. I have currently disabled my ~/.config/autostart/touchpad.desktop script so I'd see if the xorg.conf.d method works.

    [     9.203] (II) config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/event9)
    [     9.203] (**) ETPS/2 Elantech Touchpad: Applying InputClass "evdev touchpad catchall"
    [     9.203] (**) ETPS/2 Elantech Touchpad: Applying InputClass "touchpad catchall"
    [     9.203] (**) ETPS/2 Elantech Touchpad: Applying InputClass "touchpad catchall"
    [     9.203] (II) LoadModule: "synaptics"
    [     9.203] (II) Loading /usr/lib/xorg/modules/input/synaptics_drv.so
    [     9.204] (II) Module synaptics: vendor="X.Org Foundation"
    [     9.204]    compiled for 1.11.3, module version = 1.6.2
    [     9.204]    Module class: X.Org XInput Driver
    [     9.204]    ABI class: X.Org XInput driver, version 16.0
    [     9.204] (II) Using input driver 'synaptics' for 'ETPS/2 Elantech Touchpad'
    [     9.204] (II) Loading /usr/lib/xorg/modules/input/synaptics_drv.so
    [     9.204] (**) ETPS/2 Elantech Touchpad: always reports core events
    [     9.204] (**) Option "Device" "/dev/input/event9"
    [     9.228] (--) synaptics: ETPS/2 Elantech Touchpad: x-axis range 0 - 2940
    [     9.228] (--) synaptics: ETPS/2 Elantech Touchpad: y-axis range 0 - 1400
    [     9.228] (--) synaptics: ETPS/2 Elantech Touchpad: pressure range 0 - 255
    [     9.228] (--) synaptics: ETPS/2 Elantech Touchpad: finger width range 0 - 15
    [     9.228] (--) synaptics: ETPS/2 Elantech Touchpad: buttons: left right double triple
    [     9.228] (--) synaptics: ETPS/2 Elantech Touchpad: Vendor 0x2 Product 0xe
    [     9.228] (**) Option "TapButton2" "2"
    [     9.228] (**) Option "TapButton3" "3"
    [     9.228] (--) synaptics: ETPS/2 Elantech Touchpad: touchpad found
    [     9.228] (**) ETPS/2 Elantech Touchpad: always reports core events
    [     9.240] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio1/input/input9/event9"
    [     9.240] (II) XINPUT: Adding extended input device "ETPS/2 Elantech Touchpad" (type: TOUCHPAD, id 11)
    [     9.240] (**) synaptics: ETPS/2 Elantech Touchpad: (accel) MinSpeed is now constant deceleration 2.5
    [     9.240] (**) synaptics: ETPS/2 Elantech Touchpad: MaxSpeed is now 1.75
    [     9.240] (**) synaptics: ETPS/2 Elantech Touchpad: AccelFactor is now 0.061
    [     9.240] (**) ETPS/2 Elantech Touchpad: (accel) keeping acceleration scheme 1
    [     9.240] (**) ETPS/2 Elantech Touchpad: (accel) acceleration profile 1
    [     9.240] (**) ETPS/2 Elantech Touchpad: (accel) acceleration factor: 2.000
    [     9.240] (**) ETPS/2 Elantech Touchpad: (accel) acceleration threshold: 4
    [     9.240] (--) synaptics: ETPS/2 Elantech Touchpad: touchpad found
    [     9.240] (II) config/udev: Adding input device ETPS/2 Elantech Touchpad (/dev/input/mouse0)
    [     9.240] (**) ETPS/2 Elantech Touchpad: Ignoring device from InputClass "touchpad ignore duplicates"
    

    And here's "synclient | grep TapButton" output:

    :~$ synclient | grep TapButton
    TapButton1              = 1
    TapButton2              = 3
    TapButton3              = 0