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

How can I make an application automatically start when I have logged in?

share|improve this question

14 Answers 14

up vote 258 down vote accepted

14.04 and later

  • Open the Dash and search for "Startup Applications"

    enter image description here

  • Now click on Add and give in the command to run the application. This can be found in Main Menu if installed (see below) or as shown in this question.

    enter image description here

Using Main Menu (alacarte Install alacarte)

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

    enter image description here

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

    enter image description here

  • Now note the command for that program .

    enter image description here

Non GUI approach

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

[Desktop Entry]
Name=<Name of application as displayed>
Exec=<command to execute>
Icon=<full path to icon>
Comment=<optinal comments>
share|improve this answer
in 12.04 you can run "Startup Aplications" from the dash the same way like in 12.10 – jutky Jan 2 '13 at 23:20
@jutky: the difference is, that we dont have it any more in the me-menu from the cogwheel in 12.10. – Takkat Jan 2 '13 at 23:36
useful the "Non GUI approach" part, I was searching that folder! – Pisu Jan 7 '13 at 17:50
The Start-up Applications Preferences dialogue can be brought up from ALT+F2 gnome-session-properties if you can't find it in menus (e.g. in Gnome Shell) – mtdevans Jan 28 '13 at 22:59
@abhishah901: thanks for the notice, updated answer. – Takkat Dec 24 '15 at 9:22

For 11.04 and newer see here: How to start applications at startup automatically in 11.04?

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

share|improve this answer

Launch Startup applications from Dash

enter image description here

Click on Startup Applications

enter image description here

And then click on add

enter image description here

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:

Type Startup in Dash, and run Startup Application form there

enter image description here

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)

share|improve this answer
In Ubuntu 14.04, I don't see those options in the system menu in the upper right. – user29020 Sep 25 '14 at 7:39
In 14.04 type Startup in dash, and you can run it from there. Look at the addition in the answer. Thanks – Mitch Sep 25 '14 at 13:02

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:

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.

share|improve this answer
From your answer what I get is that for both you put .desktop file in ~/.config/autostart/ – Eduard Florinescu Aug 30 '12 at 7:37
Please if you know by heart what would be that GUI program, for Unity it is Startup Applications(easy to search), for xfce ? – Eduard Florinescu Aug 30 '12 at 7:38

You can use GNOME Startup Application. enter image description here

Click the Add button and then add the full command to open the application you want. If you don't know the path of the command you can do

which name_of_commmand

share|improve this answer

You can use the feature to "Remember Currently Running Applications" in the "System/Preferences/Startup Applications" preferences window. Which (when enabled) will "remember" all the programs that you are using and will re-open them after a reboot or when starting the system for the first time in a day.

This is great when you don't have enough time to make notes of what were you doing the last time and you wish an application to open if it was running the last time.

If you wish to remove an application from this feature simply close it and go to this function and press the "Remember Currently Running Application" in order to refresh the list of the programs that will be opened the next time.

A screenshot is placed here in order to illustrate.

enter image description here

share|improve this answer
The only thing I do not like about this one is that your/my wireless is slower to come up than my browser is in loading when it was active. Every tab needs to be reloaded after wireless picks up. – Rinzwind May 8 '11 at 17:17
Good point. That's why I don't save that preference with the browser open :) Docky is owning the control for my browser with an icon on it. But yours is a good point! Thank you. – Geppettvs D'Constanzo May 9 '11 at 20:50

Also to put a BATCH FILE into start up applications to run after user login.... type at the command line in start up applications in the field Command:

gnome-terminal  -e  "/batch-path/" 
  • gnome-terminal: open the terminal after user login with current user privileges
  • -e: set the terminal to execute the batch file
  • "/batch-path/": is the batch full path and full name

Remember than the file batch permissions to set the flag "Allow executing file as a program" to ON.

share|improve this answer

Take a loot @ $XDG_CONFIG_DIRS/autostart directory like

usr@myLinuxTower: ~$ echo $XDG_CONFIG_DIRS/autostart

which says there is 3 directories in this example, take a look @ it and for example, I liked to prune the nautilus entry

sudo rm /etc/xdg/autostart/nautilus-autostart.desktop

otherwise if you can add it, create a Desktop entry file like touch /etc/xdg/autostart/my-shell-autostart.desktop

[Desktop Entry]
share|improve this answer

type as startup applications in your unity dash and it will list you that application and click it to open . after opening that you can add your application there .

share|improve this answer

Ubuntu 13.10 with UNITY Instructions

To do this with a command that requires sudo is a bit tricky.

In my case, I wanted to disable the PSMOUSE driver using the command sudo rmmod psmouse to prevent a mouse click problem that randomly manifests itself. See for more info on this problem. I got tired of entering it on every boot.

On my install, the ~/.config folder did not have an autostart sub-folder, so I created one. This enabled my Startup Applications Perferences settings to be saved.

In order to toggle visibility of hidden startup applications, you can use the following commands.

To show them :

sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop

To hide them :

sudo sed -i 's/NoDisplay=false/NoDisplay=true/g' /etc/xdg/autostart/*.desktop

Configure your command as per above posts in the Startup Applications Perferences window.

Name:    Fix Mouse
Command: sudo rmmod psmouse
Comment: Fix Mouse

Then you have to edit the /etc/sudoers file using sudo visudo. Add a line that contains the following info:

username ALL=(ALL) NOPASSWD: /sbin/rmmod

You must enter this line below the line which starts with %admin. I added my line to the end of the file. It is IMPORTANT to use sudo visudo to edit this file as making a mistake will prevent you from being able to do any sudo commands at all. If that happens, boot in recovery mode and undo your edits, then try using sudo visudo.

Note: Initially I tried using a bash script to run my the command indirectly, but this didn't work. I had to put sudo rmmod psmouse directly in the Edit Startup Program window.

share|improve this answer

You might want to start it from a CLI via:

$ gnome-session-properties

(just in case you're not running GNOME ;))

share|improve this answer

Alt+F2, then gnome-help ghelp:user-guide?gosstartsession-2.

Click Run, wait a sec, and then follow the directions.

share|improve this answer
cool I know the part to add but not the commands... so do I google them? or should I hit alt+f2 then put the name of the program... if it finds it, I'll say run in terminal... to display the command? – user11383 Feb 24 '11 at 4:43
@Bob, which application do you want to run on start up? – Oxwivi Feb 24 '11 at 5:35

For a simple, portable way to do this, you can use Cron. Run crontab -e to edit your user's crontab; add @reboot command to run command on each boot.

share|improve this answer

For Ubuntu 12.04,

  1. Launch Startup Application from the top right menu

    enter image description here

  2. Without clicking on Add, open Dash and type the application you want running at startup e.g. Skype

    enter image description here

  3. Drag the application to the Startup application window. If Dash windows is too big that you can't drag your app outside, use the restore window button (shown in the previous image) at the top left corner. Final list looks like this:

share|improve this answer

protected by heemayl Apr 11 at 14:07

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.