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 am trying to add a delay at start up for a few applications using the sleep command. For example: I'm trying sleep 5; tomboy which works in terminal, but doesn't work when I add it to the command field in the "Startup Applications" section of the system settings.

With the sleep command, the commands don't seem to execute at all. Is there another command I should be using to create a delay? Is this a bug?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

The startup applications line probably doesn't invoke a shell. Try setting it to run in a terminal. Then, change it to: bash -c 'sleep 5; exec tomboy'.

Warning: This is all untested.

share|improve this answer
    
You probably don't want to set it to run in a terminal since you don't want a useless terminal window hanging around. –  psusi Apr 11 '11 at 15:48
    
@psusi @mssever This is working perfectly. It's not launching a terminal window, everything starts up like it should, just now with the delay. Thanks a bunch. –  Spaisekraft Apr 11 '11 at 20:29
    
Use X-GNOME-Autostart-Delay=5 in .desktop file in ~/.config/autostart/tomboy.desktop. see here:How can I delay a specific program on startup? –  Khurshid Alam Mar 23 '13 at 10:03
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.