I want to add an application to startup apps this way -->> Setup -->> Startup Control but there is no option to delay it. How can I do it the simplest?
How to delay executing startup apps? (solved)
Moderator: Forum moderators
How to delay executing startup apps? (solved)
Reason: added solved to subject
-
- Posts: 398
- Joined: Sun Oct 18, 2020 8:48 am
- Location: cze
- Has thanked: 54 times
- Been thanked: 90 times
Re: How to delay executing startup apps
Generally, there is a "startup" folder in /root.
Scripts or symlinks to the executable files, located here (/root/startup), will be activated each time the X is starting.
Theoretically, it should be possible to create a new script in this location that would contain something like this:
command sleep number_of_seconds (e.g. sleep 10), and on the next line
command to launch your application.
Then save the script and make it executable.
It depends on what specific app you are talking about.
- bigpup
- Moderator
- Posts: 6838
- Joined: Tue Jul 14, 2020 11:19 pm
- Location: Earth, South Eastern U.S.
- Has thanked: 875 times
- Been thanked: 1474 times
Re: How to delay executing startup apps
What specific version of Puppy Linux???
Are you asking about adding a app using Boot Manager -> Startup?
Give us some specific details on the specific app you are asking about adding to startup directory?
why does it need to be delayed?
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected
Re: How to delay executing startup apps?
I want to delay Firefox startup because network connection is not ready when Firefox autostarts and i have to reload all needed tabs when network connection is available. You know i press power on and in one minute my workstation is fully ready for work
I use Fossapup64
Solution by Feek works perfect. Thank You a lot Feek. You've made my life happier and easier
- fredx181
- Posts: 2908
- Joined: Tue Dec 03, 2019 1:49 pm
- Location: holland
- Has thanked: 341 times
- Been thanked: 1230 times
- Contact:
Re: How to delay executing startup apps?
mikolaj_q wrote: ↑Fri Jun 24, 2022 8:24 amI want to delay Firefox startup because network connection is not ready when Firefox autostarts and i have to reload all needed tabs when network connection is available. You know i press power on and in one minute my workstation is fully ready for work
I use Fossapup64Solution by Feek works perfect. Thank You a lot Feek. You've made my life happier and easier
The delay (e.g. sleep 10) before executing the command works of course, but here's a way to check connection, wait until there is actually a network connection, then execute the command:
(required is to have "curl" installed)
Code: Select all
# check network, wait until there is connection, will stay in loop until there's connection
case "$(curl -s --max-time 2 -I https://duckduckgo.com | sed 's/^[^ ]* *\([0-9]\).*/\1/; 1q')" in
[23]) : ;;
*) echo "No network connection yet...";;
esac
while true
do
case "$(curl -s --max-time 2 -I https://duckduckgo.com | sed 's/^[^ ]* *\([0-9]\).*/\1/; 1q')" in
[23]) break;;
*) : ;;
esac
sleep 3
done
# command to execute after there's a network connection, e.g. firefox
firefox