in Ubuntu 10.10 I really don't want any password on resume on my EeePC, so I have to run
gconftool-2 --set --type=bool /apps/gnome-power-manager/lock/suspend false
and I want two finger middle click, so I have to run
xinput set-prop "ETPS/2 Elantech Touchpad" "Synaptics Tap Action" 8, 9, 0, 0, 1, 2, 3
(that gpointingdevice package can't do anything for me)
Those work, but only until the next resume. For some strange reason Ubuntu always overrides these changes.
I put both commands into a script in /etc/pm/sleep.d/
, but even then after resumes the changes are gone.
Where is this strange behavior coming from? And how do I make those changes permanent?
You could add those commands in sh file
save it as startup.sh(for example) and put it in System->Preferences->Startup Applications. Oh and add permission executing this file as program in file context menu->Permissions
You should be aware that all sleep.d script run as root and could easily be the problem here.
You can add debugging information to your script such as
echo "Touchpad command"
which will then appear in the logs. More infoOpen the logs by using Log File Viewer and find pm-suspend.log then search for the echo comments you added to your script and look for any errors.
If you need help deciphering the logs copy and paste them to dpaste and paste that link here.
You may be able to run these commands as another user with
su username -c command
For Ubuntu Oneiric, you should use the new hotplug-command hook. Basically, you create a script using this template that calls xinput with your desired settings somewhere in your path, make it executable, and then:
The script will be called on startup, resume, and whenever the device is plugged/unplugged.
I just added this as /etc/pm/sleep.d/99_touchpad (don't forget to chmod +x.) Works fine in Debian Wheezy so it should work the same in recent Ubuntu versions:
Substitute your own user name of course. My touchpad.sh (which is also called via "Startup Applications") is
to set locked dragging and two-finger middle click.