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.

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.

share|improve this question

1 Answer 1

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.

share|improve this answer
    
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. askubuntu.com/questions/239802/how-can-i-speed-up-my-mouse/… –  Sukminder Jan 13 '13 at 10:33

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.