Re: Auto invoke browser upon wvdial successful Internet connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux