I usually add some applications like email, Skype, etc. to startup list so that these will auto-start during login. It is a time saver tweak for commonly used applications on a daily basis. Of course, some programs do have preference settings within them to auto-run, but many won’t.
STEP 1: Find out the command line for launching an application
To add a application to the startup list, you need to know the exact command line of the application. By default settings, Ubuntu stores all the applications shortcuts in /usr/share/applications/. So, navigate to the path and search for the program name in the search box.
Right-click on the application and select ‘Properties’. Copy the ‘Command’. This is the actual terminal command that launches the program.
STEP 2: Configure Startup Applications
Launch ‘Startup Applications’ from the Dash menu.
Click ‘Add’ and paste the copied command in the ‘Command’ section. You can give ‘Name’ and ‘Comment’ whatever you want. Click ‘Add’.
The program will get added in the Startup Applications.
Next time you restart Ubuntu, you should see the program start automatically.
HI, thank you
any idea wyhy sometimes I cannot change the startup applications in 16.04? I add one and remove the SSH Keyring, save it, close it…on reopen its back to SSH Keyring only, my entry is lost…
Any idea how to amend that and is there a workaround?
Thx
Dan
Mabye the autostart client doesn’t accept ~/… paths. f.e. to mount the google drive ocamlfuse I need to add: “google-drive-ocamlfuse start /home/IngosLaptop/googledrive”
instead of “google-drive-ocamlfuse start ~/googledrive”
Hi Dan, for me it was the same. Finally I had to manually create a file to do the job (which is what the startup applications tool should do). Just search for ‘manually create .desktop file ubuntu’ or something similar and you will find posts like this one: https://askubuntu.com/questions/281293/creating-a-desktop-file-for-a-new-application
It is actually easy. I didn’t even write half of the lines in the file (i.e. the one for the icon) and it works fine. I think the most important line is the one starting with “Exect=” where you have to add the same path described in this article.
Best
How do you do this on a server with no GUI?
You need to first create a .desktop file in ~/.config/autostart/ diectory. Then add this content to that file with the command you want:
cat << EOF >> ~/.config/autostart/yourcommandname.desktop
[Desktop Entry]
Type=Application
Exec=command
Name=yourcommandname
Comment=something
EOF
Thanks!
Hi Kiran,
Thanks for nice article. Does application run as root? and they start after all system and gpu drivers are loaded?
Thanks.