3

I want to use two finger scrolling on my touchpad. I'm using Ubuntu 13.04, and the Mouse and Touchpad GUI configuration doesn't let me enable it (the checkbox is greyed out). As a workaround, I created a script that is run on startup per the advice. The script is:

xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Two-Finger Scrolling" 8 1         
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 8 1 1
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 32 0

This works fine after I log in. However, when I sleep and resume, the setting seems to disappear -- two finger scrolling is no longer enabled.

Some solutions (e.g.) suggest using synclient and xorg.conf, but those don't seem to work. Other solutions (e.g.) add scripts that are run upon resuming from sleep. This seems like the wrong way to go about it -- there should be a way to make permanent changes without having to re-tweak them on every resume.

Does anyone have a permanent way to enable two finger scrolling?

Sam King
  • 719

4 Answers4

1

You can add the script to /etc/X11/Xsession.d/ to make the change persist across all sessions. Just make sure you read up on how to customize Xsession's startup procedure (particularly the naming convention): http://manpages.ubuntu.com/manpages/raring/man5/Xsession.5.html

cesar
  • 111
1

Even if you did the run on resume thing it wouldn't have worked(at least for me it didn't), in fact it inhibited my system from suspending (got the lock screen only).

So here's my, ugly but working solution.

Create a script /desired/path/my-synaptic.sh (call it X) with the following content(set the mode to 777 just in case, chmod 777 X):

#! /bin/sh

while true
do
 # all your commands here
 sleep 5 # increase the time if you want to be less aggressive about it
done

Then go to Startup Applications from the dashboard and add a startup program with the following command:

nohup X

and you're good to go until this issue is properly addressed.

Idea of the script was taken from here.

And yeah not even cron was of any help in this situation.


set-int-prop is deprecated. Source 1 and 2.

0

I did this to make my xinput settings persist after reboot (Ubuntu 13.04 Unity), but it may not help for resuming from hibernate:

sudo vi /usr/local/bin/xinput.sh

Add your xinput line(s) and save.

sudo chmod 755 /usr/local/bin/xinput.sh

Press the Super key do go to Dash, search for Startup Applications and click on it to open. Click Add:

Name: xinput
Command: /usr/local/bin/xinput.sh
Comment: xinput settings

Save and reboot

0

I've had to put it in /etc/X11/xorg.conf.d/50-mouse-map.conf (and reboot) to be permanent not only over reboots but also over suspend/resume.

#instead of: xinput set-button-map "2.4G Wireless Optical Mouse" 1 2 3 4 5 6 7 0 
Section "InputClass"
    Identifier  "2.4G Wireless Optical Mouse"
    Option  "ButtonMapping" "1 2 3 4 5 6 7 0 0 10 11 12 13 14 15 16"
EndSection
Matija Nalis
  • 1,482
  • 15
  • 21