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

We have this machine (ubuntu 10.04) with autologon and firefox in startup sesson aplications.

But some times the firefox starts, and the network is not up (maybe a delay from dhcp server, or some weird problem in networking).

How we change the order of applications of startup session applications? And how we can define to firefox only start after the network is up?

share|improve this question

Although I'm unsure if all these existed in the 10.04 version of Ubuntu, I'm putting this answer here in case it does and also so it can be used for newer releases. You can use upstart to start a GUI application when a user logs in and have it require that networking is up first.

Run a GUI application

env DISPLAY=:0.0
exec /usr/bin/firefox

Run when a user logs in

  1. This makes use of D-Bus Service Activation.

  2. Add "UpstartJob=true" to file "/usr/share/dbus-1/system-services/org.freedesktop.ConsoleKit.service".

  3. Create a job configuration file corresponding to the D-Bus service, say /etc/init/user-login.conf [12]:

    start on dbus-activation org.freedesktop.ConsoleKit
    exec /usr/sbin/console-kit-daemon --no-daemon
  4. Ensure that the D-Bus daemon ("dbus-daemon") is started with the --activation=upstart option (see /etc/init/dbus.conf).

Now, when a user logs in, D-Bus will emit the dbus-activation event, specifying the D-Bus service started. You can now create other jobs that start on user-login.

Depend on another service

start on (started networking and user-login)

By combining these three things in an upstart job, you can start Firefox when a user logs in and the network is started (although you may want to specify which interface is up)

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.