How to run applications at startup on Ubuntu 18.04?

Startup applications are the programs that are launched automatically when Ubuntu boots up. Sometimes you want to make an application start after you log in to the system, like for instance a chat app or fan controller

app, etc..
It could be also the case when the number of applications or services at startup becomes high that the system starts to slow down or show signs of sluggishness. In such situations, you may want to remove some of these automatically started programs in order to free up the system resources.
In this short article, you will learn how to execute a program at startup and how to prevent applications from launching automatically once the system boots up.

Startup applications management

Ubuntu has already a tool to manage Startup Applications .In order to open it, go to Dash and look up the word “Start ”as shown below :

Once the shortcut appears, Now, click on it. This will bring up the window below :

To add a new application, simply hit the Add button and insert in the command field your program name in order to run the application. To know which command corresponds to your desired program, refer to the following section.

Read: How to list, start and stop services at boot time in Linux Ubuntu/Debian

How to find the command to run an application?

To find the correct command that calls your application proceed as follows :

1 – Open the folder /usr/share/applications :

Right click on your desired application icon and select Properties :

This will bring up a small popup in which you can find the required command :

Once you know the command, copy it and go back again to the prompt window of the previous section, .i.e.

Now in the Command field, paste the command value. You may want also to enter a name and a description. Finally, click on on Add button. Now in the next boot up, your selected application will be automatically launched at boot up.

Remove startup applications in Ubuntu

To remove a program from startup applications preferences, select it and then click on Remove button. :

The program will not launch automatically at each start-up. Note that this will not uninstall the program.

Read: How to shut down, restart, suspend and hibernate Linux

Delaying a program launch at boot

To delay the launch of your chosen application proceed as follows :

1 In case your application already starts at boot, open up the startup application preferences window

2 Select the application

3 Hit the edit button

4 Put the cursor on the command field and add ‘sleep n’ right at the start of the command. This will delay the launch of the program by n seconds. See example below :

Now save and quit. This will take effect at the next boot.

Hidden startup programs display

To see the services that are launched at startup, open up a terminal and run the command below:

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

This is a sed command that will find and replace the ‘NoDisplay=false’ attribute with ‘NoDisplay=true’ in all the applications that have autostart enabled.
Once the command above is completed, open the Startup Applications Preferences and you should be able to see many more applications as shown below :

Conclusion

This tutorial has demonstrated how to control startup applications in Ubuntu. Questions are always welcomed.

ziad nahdy

Ziad Nahdy, fan of open source, worked at SAP for 17 years. He is a technical writer, blogger and Linux enthusiast. He loves to read and help others with their problems. He is addicted to open source software but he also loves other technology related stuff.

Leave a Reply

Close Menu