The time now is Mon 09 Dec 2019, 23:08
All times are UTC - 4 |
Author |
Message |
B.K. Johnson
Joined: 12 Oct 2009 Posts: 776
|
Posted: Fri 18 Oct 2019, 11:21 Post subject:
How can I make sure network connects before browser starts? Subject description: Solved |
|
Just a little personal irritant in need of a solution.
Scenario
I have a little script in Startup that auto-loads Firefox.
My Firefox config keeps the last set of tabs (when session is saved).
Frisbee (but I suspect all network managers) are invoked before the script in Startup.
Consequently, ALL the Firefox tabs with internet web pages show Server Not Found.
Question
Is there a way to reverse the order of processing, i.e. so that the script directive is invoked after the network app connects?
upupbb32, firefox 69.0.3
see sig for other details
Description |
firefox tabs with Server Not Found |
Filesize |
23.62 KB |
Viewed |
36 Time(s) |

|
_________________ B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM
Last edited by B.K. Johnson on Sat 07 Dec 2019, 20:22; edited 2 times in total
|
Back to top
|
|
 |
bigpup

Joined: 11 Oct 2009 Posts: 12980 Location: S.C. USA
|
Posted: Fri 18 Oct 2019, 11:38 Post subject:
|
|
Maybe put a sleep command at the start of the script.
The script is activated, but it sleeps for a period of time before it actually does anything.
How to Use the Linux Sleep Command to Pause a BASH Script
https://www.lifewire.com/use-linux-sleep-command-3572060
Network connection does take some time to complete.
Wired connection is usually quick.
Wireless takes some time.
I usually get to a working desktop and 10 to 30 seconds later the connection is made.
_________________ The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
|
Back to top
|
|
 |
jafadmin
Joined: 19 Mar 2009 Posts: 1013
|
Posted: Fri 18 Oct 2019, 11:59 Post subject:
|
|
This script will loop until WAN becomes available:
Code: | #! /bin/bash
PINGHOST="1.1.1.1"
while :
do
RTN=$(ping -c 1 -w 2 -n $PINGHOST | grep "from")
if [ -z "$RTN" ]
then
sleep 1
else
break
fi
done
#startbrowser
|
.
|
Back to top
|
|
 |
B.K. Johnson
Joined: 12 Oct 2009 Posts: 776
|
Posted: Fri 18 Oct 2019, 12:12 Post subject:
|
|
@bigpup, @jafadmin
Thanks guys.
[EDIT]
Sleep worked. Initial setting of 60 may have been too long. Think I'll try jafadmin's rather than fiddling with the number for sleep.
[EDIT-2]
At first glance, the script seems to work also.
I'll mark the thread as SOLVED.
_________________ B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM
|
Back to top
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|