Ubuntu – How to delay a specific program on startup

cairo-dockconfigurationstartup

How to delay a program such as cairo-dock (No openGL) or Firefox?

Sometimes programs crash when started with other startup apps. I want programs to start 10 seconds late to avoid a crash.

Best Answer

Delaying autostart with inbuilt delay option


Note: Only works with desktop sessions that recognize the X-GNOME-Autostart-Delayparameter (e.g. Unity, Unity2D, GNOME). This will not work for LXDE, XFCE, KDE, etc.


With this solution there's no need for a script or sleep. Head to your autostart folder:

nautilus ~/.config/autostart

Find the .desktop file that corresponds with your application and open it in a text editor, e.g. gedit:

gedit ~/.config/autostart/application.desktop

Append the following line to the file:

X-GNOME-Autostart-Delay=foo

where foo is the time in seconds you want to delay the application launch by, e.g.:

X-GNOME-Autostart-Delay=60

Save the file, relog and you should see the effects.

Related Question