[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Auto invoke browser upon wvdial successful Internet connection
- From: "Bob Shaffer" <fedora bobshafferscomputer com>
- To: "For users of Fedora Core releases" <fedora-list redhat com>
- Subject: Re: Auto invoke browser upon wvdial successful Internet connection
- Date: Sat, 1 May 2004 08:32:16 -0400 (EDT)
This will do what you want.
#!/bin/bash
nohup wvdial 1>/dev/null 2>/dev/null &
while true; do
if [ -n "`/sbin/pidof pppd`" ]; then
# successfully connected
mozilla &
exit
fi
if [ -z "`/sbin/pidof wvdial`" ]; then
# wvdial failed and exited
xmessage "Failed to connect."
exit
fi
sleep 1
done
# end of script
It doesn't represent my life's work or anything, but it will work.
You can just run "killall -2 wvdial" to close the connection.
You can actually set up pppd to dial for you, and dial on demand if you
want too. That way when you open a browser it will automatically dial for
you if you're offline.
____________________________________________________________________________
Bob Shaffer II - Owner, Developer, System Operator - BobShaffersComputer.com
http://bobshafferscomputer.com/
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
/ \
Barry Yu said:
> I want to activate the Mozilla browsing ONLY WHEN INTERNET CONNECTION
> IS SUCCESSFULLY ESTABLISHED by WVDIAL, could any one advice or point me
> to right place of a how-to, I am not good at script (yet), if there is
> one, would really appreciate, Thanks.
>
>
> --
> fedora-list mailing list
> fedora-list redhat com
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]