Sunday, September 18, 2011

Add Applications to Startup for All Users - Ubuntu

Note: Those who want to autostart certain applications for the current/single user, should add their desired apps to 'Startup Applications' by searching the Dash in Unity or from the System > Preferences menu in classic Gnome.

Sometimes there are a few applications you want to autostart for all the users of your PC. Instead of adding them individually to 'Startup Applications' for each user, there is a general method which also saves quite a bit of work, and later, if you want to get rid of the application from the startup, it's just as easy as running a single command.

For autostarting an application for all the users, you simply need to copy the desired application's launcher from '/usr/share/applications' to '/etc/xdg/autostart', e.g. if you want to autostart Firefox for all the users when they log in, from Terminal, run this command:

sudo cp /usr/share/applications/firefox.desktop /etc/xdg/autostart

You can repeat the same command as many times as you like, just replace 'firefox.desktop' with your desired application's launcher.

Later, if you want to remove the application from startup again, run:

sudo rm /etc/xdg/autostart/firefox.desktop

This method might work with any other Linux as well.

Related Posts: