How to Delay Startup Application in Ubuntu

How To Optimally Autostart Apps With Delay In Ubuntu Featured

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.

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.

How To Optimally Autostart Apps With Delay In Ubuntu Plank Running

Visit your apps menu, search for the Startup Applications app, and run it.

How To Optimally Autostart Apps With Delay In Ubuntu Find Startup Applications

The Startup Application Preferences dialog will show you a list of all the apps that load automatically whenever you log in.

How To Optimally Autostart Apps With Delay In Ubuntu Startup Applications Preferences Window

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.

How To Optimally Autostart Apps With Delay In Ubuntu New Entry And Name Entry

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:

How To Optimally Autostart Apps With Delay In Ubuntu Autostart Command

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:

How To Optimally Autostart Apps With Delay In Ubuntu Bash Delay

5. If you’d like, add a comment that explains what your entry’s all about in the Comment field.

How To Optimally Autostart Apps With Delay In Ubuntu Added Comment

6. Lastly, click on the Add button on the bottom right to add your entry to the startup applications list.

How To Optimally Autostart Apps With Delay In Ubuntu Entry Added

6. Log out or restart your computer.

How To Optimally Autostart Apps With Delay In Ubuntu Log Out

7. Your application will autostart after the delayed time.

How To Optimally Autostart Apps With Delay In Ubuntu App Autostarted

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.

Odysseas Kourafalos Odysseas Kourafalos

OK's real life started at around 10, when he got his first computer - a Commodore 128. Since then, he's been melting keycaps by typing 24/7, trying to spread The Word Of Tech to anyone interested enough to listen. Or, rather, read.

2 comments

Leave a Comment

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.