If you’re using some apps every time you log in to your desktop, you can avoid having to run them manually every time by adding them to the startup list. However, if you set too many apps to autostart, your initial login to your desktop will lag significantly. All apps will be fighting for the same resources while trying to get to your desktop. Thankfully, there’s a solution: add a delay to startup applications.
In this tutorial, we show how to optimally delay startup applications in Ubuntu. We do this by adding a delay timer so that it doesn’t run automatically after login. Let’s see how you can do it for the apps you use.
Also read: How to Manage Your Startup Applications in Ubuntu
Startup Applications
Some apps are helpful when they’re always available. However, some apps, in this case Plank, don’t autostart by default when you login. The solution is to add it to the list of other apps that start automatically whenever you log in to your desktop.
Visit your apps menu, search for the Startup Applications app, and run it.
The Startup Application Preferences dialog will show you a list of all the apps that load automatically whenever you log in.
Note: some system-related apps are hidden by default in the Startup Applications Preferences list. However, we ignore them for this tutorial, since they don’t affect what we want to do.
Add New Startup Entry with Delay
Let’s add an entry to the Startup Applications Preferences list for an app that we’d like to run automatically whenever we log in. In our case, that’s the Plank launcher. You can use any other app instead, like Gedit, Blender, Visual Studio Code, etc., by defining its path instead.
1. Click on the “Add” button on the right of the Startup Applications Preferences window to create a new entry. Enter a name for it in the appropriate field.
2. Type the command for the app you want to autostart in the Command field; you’ll have to enter the full path for those that aren’t included in your default Path variable. Alternatively, click on the Browse button on the right and locate its executable. For Plank, in our example, it was:
/usr/bin/plank
3. Click “Add.” Your app will autostart the next time you log in to your desktop.
4. Edit the same entry. Now add bash -c "sleep AMOUNT_OF_TIME_IN_SECONDS &&
before your command. For our case with the Plank launcher and a delay of 30 seconds, this would look like:
bash -c "sleep 30 && /usr/bin/plank"
5. If you’d like, add a comment that explains what your entry’s all about in the Comment field.
6. Lastly, click on the Add button on the bottom right to add your entry to the startup applications list.
6. Log out or restart your computer.
7. Your application will autostart after the delayed time.
That is how to delay startup applications in the latest versions of Ubuntu. Are you using a different approach for auto-starting your apps? You can also learn the shortcut keys for Ubuntu so you can access your applications faster.
Our latest tutorials delivered straight to your inbox