If you have a specific set of applications that you open every day regularly, you might want to try setting up autostart programs that will be executed after every PC boot process. For instance, I usually add a few applications like email, Shutter, Skype, and Color Picker apps to the startup list so that these will autostart after logging on to the PC.
Doing so, although it uses some PC resources, is a time-saver tweak for commonly used applications regularly. Some software comes with the auto-start feature in their respective “Preferences (if there is one)”, but generally, most won’t have it. Hence, here we go, let’s get started with this tutorial, which I hope will come in handy for you.
Autostarting Apps on Ubuntu
Before proceeding to the actual process to add an application to the startup list, you need first to know the command-line way of launching your app. By default settings, Ubuntu stores all the applications shortcuts in the following path:
/usr/share/applications/
Hence, please navigate to the path and search for the program name in the search box.
Step 1. Find out the command line for launching an application. For example, if my case, I want to add the “Transmission” app to the startup.
Step 2. Right-click on the application and select ‘Properties’. Copy the ‘Command’ row content. For my example, it is “transmission-gtk %U”. This is the actual terminal command that launches the program.
Step 3: Now that you know the command-line to execute, let’s configure and add it to the Startup Applications. We shall break the tutorial into two sections. Firstly, Ubuntu 16.04 and older that uses the Unity desktop environment, and secondly, the newer Ubuntu versions with the GNOME desktop.
On Ubuntu 16.04 LTS and Older (with Unity)
Launch the ‘Startup Applications’ from the Unity Dash menu. You can begin with typing “startup” for the result to appear.
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 to the Startup Applications.
On Ubuntu 18.04 LTS and newer (with GNOME)
Click on “Activities”, look for “startup” and click on “Startup Applicatications” from the results.
Click on the ‘Add’ button and paste the command-line that you copied earlier into the ‘Command’ section. You can fill the optional ‘Name’ and ‘Comment’ fields with whatever you want. When done, click ‘Add’.
That’s it! Next time you restart your Ubuntu PC, you should see the added programs start automatically.
7 comments
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.