0

Is there a way to load the startup applications upon return from suspend.

My problem is that I have the line xset m 200 1 in my start-up applications, but it won't load after suspend.

It loads fine at start-up though.

Bruno Pereira
  • 73,643
Olivier
  • 121
  • 5

1 Answers1

2

Create a script with these contents

case "$1" in
    hibernate|suspend)
        #Do nothing at 
        ;;
    thaw|resume)
        xset m 200 1
        ;;
    *)
        ;;
esac
exit $?

Set it to executable with chmod +x foo_script_name

Move your script to /etc/pm/sleep.d with sudo mv foo_script_name /etc/pm/sleep.d, it will be run once your computer resumes from sleep.

Bruno Pereira
  • 73,643
  • I just tried that, but it doesn't load – Olivier Jan 11 '13 at 22:08
  • @Olivier: It most probably load, but fails. cat /var/log/pm-suspend.log and look for "foo_script_name". The problem is that xset has no display. Updated your other Q and add a link to it here in case someone else stumble upon it. http://askubuntu.com/questions/239802/how-can-i-speed-up-my-mouse/239826#239826 – Runium Jan 13 '13 at 10:33