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

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
up vote 2 down vote accepted

Try this:

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


start on desktop-start
stop on desktop-end

    sleep 30
end script

More info:

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.