In this tutorial, we will learn how to control startup programs in Ubuntu, either by adding or removing them to start up automatically upon boot.
To configure your startup applications, follow the steps below.
Adding a Startup App
Before we continue with the following steps, we need to know the path of the applications to configure as a startup program. We will be using the
which command to accomplish this. As an example, we will add Firefox to start automatically. The command to find its path would be:
$ which firefox
Once we know the application’s path, we can proceed to configure our startup program in Ubuntu.
Step 1. Go to the Activities menu, and open Startup Applications.
Step 2. In the next window, click on Add.
Step 3. Finally, enter the name and provide the command or path for the startup program.
Removing a Startup App
To remove an app from starting up automatically, simply select the application you wish to remove and then click on remove.
Delaying a Startup App
We can also delay an app from starting automatically, so that it won’t start until after a specified amount of time. This is a good idea to prevent too many applications from trying to start up simultaneously.
Step 1. In the Startup Applications Menu, select the application and click on edit.
Step 2. In the next window, add the
sleep command before the command/path entry. In this case we will set up a delay of 60 seconds for firefox.
bash -c "sleep 60 && /snap/bin/firefox"
Finally, click on save and restart your system for the changes to take effect.