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 want Firefox to start automatically when I start Lubuntu. I have the LXSession Configuration app installed. In it, I've tried entering all the suggestions in this question, such as:

bash -c "sleep 10 && firefox"

sleep 10 && firefox

xterm -e 'sleep 10 && firefox'

sh -c "sleep 10 && skype &"

For all of them, they work on the command line, but not when I enter them in the LXSession Configuration interface.

If I enter firefox by itself, it launches when Lubuntu starts.

I'm guessing all the sleep commands above only work in Ubuntu. How to I get a program to delay when autostarting in Lubuntu?

Extra note: The reason I want to delay Firefox is because I autoconnect to a VPN, and it takes a while for the VPN to complete connecting. I need Firefox to start after the VPN connection is complete, so if there is any way to force one program (like Firefox) to start upon completion of some other event (network manager completing a connection), that would work too.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Try this:

Create a file $HOME/.config/upstart/firefox-with-delay.conf

Content:

start on desktop-start
stop on desktop-end

script
    sleep 30
    firefox 
end script

More info:

http://ifdeflinux.blogspot.de/2013/04/upstart-user-sessions-in-ubuntu-raring.html

http://upstart.ubuntu.com/

share|improve this answer

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.