Startup Scripts – How to Delay Application Start to Reduce Boot Time

12.10samsungscripts

I have an application installed for my samsung NP-RV509 installed that makes the fn keys work properly..

I figured it out that it is the reason behind almost 30sec xtra booting time…

so i was wondering if i could write a shell/python script(actually i myself cant as i dont know shell/python prog) that will introduce a delay may be using a loop or something and then start the above application…I shall add this script in start up apps…

this will simulate the running of that program at startup but, delayed in actual…

so how can i achieve this?(help wth the code)

thankyou! 🙂

Best Answer

You can add a delay time with sleep command.

man sleep for more info .

Example

I want to startup a program with delay of 10 seconds. I create an entry in the startup applications with this in command field

sleep 10;/usr/bin/<program name>

Example 2

I want to create a script with the delay (sleep) option and add this script to startup applications

gedit delayscript.sh

and I add these lines

#!/bin/bash 

sleep 10 
/usr/bin/<program name>

save the script and give it executable permissions

chmod +x delayscript.sh

and add it to startup applications (command field) with full path

/home/username/delayscript.sh