Rud Faden bio photo

Rud Faden

He who knows not and knows not he knows not: he is a fool - shun him. He who knows not and knows he knows not: he is simple - teach him. He who knows and knows not he knows: he is asleep - wake him. He who knows and knows he knows: he is wise - follow him.

Email Twitter Facebook Google+ LinkedIn Github Stackoverflow

When you use an app almost all the time, you usually want to add it to your list of start up item, to make them start up automatically. However for some apps, like browsers, it opening the app before an Internet connection is established will result in failed page/app loads. Therefore it is nice to know how to delay the start up. This post will focus on Elementary OS, but a similar approach should work in other Ubuntu variants. I will use Google Chrome as an example.

First, open your favorite text editor and paste the following

sleep 10

Save the file somewhere on your hard-drive and name it

Next you need to make the script executable. To do that run the following from the terminal:

chmod +x [path to file]/

The Open system settings -> Startup Applications. Press Add and in the Command field, navigate to your bash script. Then at the beginning of your path add sh, to tell the terminal to execute the script.

If you want, you can also add a name and a description.

sh [path to file]/

My setup looks like this:

Chrome startup with delay

Chrome will now launch with a 10 second delay. This will be enough for the wifi to connect before chrome launches.