I am running Kali 2, and have a script that I want to run on startup. Right now, I have the script in my profile.d directory, but it takes too long to execute. The effect is that after I login, the desktop loading stalls until the script execution is complete. Instead, I would like to be able to use my desktop while the script is executing, also I tried implementing a delay in the script (sleep 20s), but this just locks the desktop out for 20s longer.
1 Answer
Hey what you need to do is add an '&' to the end of the command. This will make the command be forked to the background and your startup will continue.
eg.
# echo 'This will make it run in the background' &