How do I start applications automatically on login?

20.04 and later

  1. If not yet done by default install gnome-startup-applications

  2. Search and open "Startup Applications"

    screenshot

  3. click add to enter the command including options of your application as you would run it from terminal (you may have to give in the full path if it runs from a non-standard location)

    screenshot

  • This will add a .desktop file in your ~/.config/autostart

    screenshot

14.04 and later

  1. Open the Dash and search for "Startup Applications"

    screenshot

  2. Now click on Add and give in the command to run the application. This can be found in Main Menu if installed (see below)


Using Main Menu (alacarte) to find the terminal command to run a given program:

  1. Firstly open the program 'Main Menu' (type Menu in the Dash)

    screenshot

  2. Now select the program which you want to add to startup and click on properties .

    screenshot

  3. Now note the command for that program .

    screenshot


Non GUI approach

Advanced users may want to manually put a .desktop file in ~/.config/autostart to run applications after a user login. This may have following content:

[Desktop Entry]
Type=Application
Name=<Name of application as displayed>
Exec=<command to execute>
Icon=<full path to icon>
Comment=<optinal comments>
X-GNOME-Autostart-enabled=true

You may have to give this file execute permission.


For 11.04 and newer see here: How do I start applications automatically on login?

For older versions: If the program you wish to run on startup is in the Applications menu, you can drag-and-drop it into the Startup Applications window to add it to the list.

enter image description here


  1. Launch Startup applications from Dash

    screenshot

  2. Click on Startup Applications

    screenshot

  3. And then click on add

    screenshot

  4. Type the name of the program, browse to the command, and then click add.

Addition: Here is a sample that I use to autostart Guake (the Gnome version of Yakuake):

Put this in the 'command' box.

sh -c "sleep 120s; guake"

This starts guake automatically, but waits 2 mins before doing so. You can change the 120 to whatever you wish.

For 14.04 and 16.04

Type Startup in Dash, and run Startup Application form there

screenshot

And then just follow the rest of the steps.

Please note that, if you are using Ubuntu in another language, "startup" might not find the correct program. Try another search that is in your language.


Both Unity and Xfce4 have GUI programs that allow you to control startup applications.

For Unity:

enter image description here

enter image description here

For Xfce4 Startup tool is available in Settings > Session and Startup

enter image description here Image courtesy of Xubuntu Geek xubuntugeek

If the GUI is not what you want, and you want is more advance control, then you can put .desktop files in the ~/.config/autostart/ directory for Xfce4, and a .desktop file in ~/.config/autostart for Unity to run applications after a user login.

Check this question to get more help on creating .desktop files:

  • How can I edit/create new launcher items in Unity by hand?

Also note if you want a startup application to start only in XFCE, but not in Unity, you have to put the line OnlyShowIn=XFCE in the .desktop file. It is OnlyShowIn=Unity for a Unity only application.