How can I make an application automatically start when I have logged in?
12.10 and later
11.10 - 12.04 LTS
Using Main Menu (alacarte )
Non GUI approach
Advanced users may want to put a .desktop file in
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.
Launch Startup applications from Dash
Click on Startup Applications
And then click on add
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.
This starts guake automatically, but waits 2 mins before doing so. You can change the 120 to whatever you wish.
Type Startup in Dash, and run Startup Application form there
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 Xfce4 Startup tool is available in Settings > Session and Startup
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
Check this question to get more help on creating
Also note if you want a startup application to start only in XFCE, but not in Unity, you have to put the line
You can use GNOME Startup Application.
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
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.
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:
Remember than the file batch permissions to set the flag "Allow executing file as a program" to ON.
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 .
Ubuntu 13.10 with UNITY Instructions
To do this with a command that requires
In my case, I wanted to disable the PSMOUSE driver using the command
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 :
To hide them :
Configure your command as per above posts in the Startup Applications Perferences window.
Then you have to edit the /etc/sudoers file using
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
Initially I tried using a bash script to run my the command indirectly, but this didn't work. I had to put
You might want to start it from a CLI via:
(just in case you're not running GNOME ;))
Take a loot @ $XDG_CONFIG_DIRS/autostart directory like
which says there is 3 directories in this example, take a look @ it and for example, I liked to prune the nautilus entry
otherwise if you can add it, create a Desktop entry file like touch /etc/xdg/autostart/my-shell-autostart.desktop
Click Run, wait a sec, and then follow the directions.
For Ubuntu 12.04,
1) Launch Startup Application from the top right menu
2) Without clicking on Add, open Dash and type the application you want running at startup e.g. Skype
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:
For a simple, portable way to do this, you can use Cron. Run