Delay startup of app in Elementary OS
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
Save the file somewhere on your hard-drive and name it chrome_launch.sh
.
Next you need to make the script executable. To do that run the following from the terminal:
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.
My setup looks like this:
Chrome will now launch with a 10 second delay. This will be enough for the wifi to connect before chrome launches.
Comments