Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

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

share|improve this answer
    
That's what I do now. Unfortunately, the setting appears to be cleared after resuming from standby. –  Sam King Jul 13 '13 at 18:11
add comment

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

share|improve this answer
add comment

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.

share|improve this answer
    
Hmm... That would work, but it feels like a bit too much of a hack to just keep running a command every few seconds in the background. –  Sam King Sep 25 '13 at 5:20
    
@SamKing a system already does run plenty of commands in the background. Plus it'ss not cpu/memory intensive. And like I said until the issues gets resolved/properly addressed, this is the easiest working hack. –  Bleeding Fingers Sep 25 '13 at 5:30
    
Generally, a system runs commands in the backround when there is a meaningful reason for them to do so (eg, monitoring IO or waiting on system calls to return). I'm aware that it wouldn't be memory intensive and that the sleep means it isn't busy waiting. Nonetheless, I'm looking for a more elegant solution. Also, it does have other negative effects, such as preventing me from easily tweaking those settings if I want to (without rebooting or manually killing the script's process) and forcing a processor context switch every 5 seconds, which could reduce cache utilization. –  Sam King Sep 25 '13 at 15:51
    
@SamKing like I said it is not even close to elegant but at least I am willing to pay this negligible price. Pointer setting's are not something that one changes every other day, I never touched my settings in 11.04 for over a year(even forget it existed) and it wasn't this ugly. –  Bleeding Fingers Sep 25 '13 at 16:26
add comment

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.