Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
I'm not even able to comment anymore because I spent all my reputation on this bounty, but the answer that was auto-selected does not help at all. This is an unsolved and very annoying problem. – Reinis I. May 24 '11 at 8:23

You could add those commands in sh file

gconftool-2 --set --type=bool /apps/gnome-power-manager/lock/suspend false
xinput set-prop "ETPS/2 Elantech Touchpad" "Synaptics Tap Action" 8, 9, 0, 0, 1, 2, 3

save it as example) and put it in System->Preferences->Startup Applications. Oh and add permission executing this file as program in file context menu->Permissions

share|improve this answer
This answer is off the mark. He's asking about running a script on resume, because the touchpad settings get reset after resuming from sleep. /etc/pm/sleep.d/ doesn't work, because it probably runs too early. – Reinis I. May 8 '11 at 10:00

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 info

  • Open 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

share|improve this answer

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:

gsettings set org.gnome.settings-daemon.peripherals.input-devices hotplug-command <script>

The script will be called on startup, resume, and whenever the device is plugged/unplugged.

share|improve this answer

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:

case "${1}" in
        DISPLAY=:0.0 su <username> -c /home/<username>/

Substitute your own user name of course. My (which is also called via "Startup Applications") is

dev="ETPS/2 Elantech Touchpad"
# Use xinput --list-props "ETPS/2 Elantech Touchpad" to list data
xinput set-prop "$dev" "Synaptics Tap Action" 8, 9, 0, 0, 1, 2, 3
xinput set-prop "$dev" "Synaptics Locked Drags" 1
xinput set-prop "$dev" "Synaptics Locked Drags Timeout" 500

to set locked dragging and two-finger middle click.

share|improve this answer

Your Answer


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.