LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Get mozilla to start wvdial (https://www.linuxquestions.org/questions/programming-9/get-mozilla-to-start-wvdial-281940/)

short101 01-25-2005 04:12 AM

Get mozilla to start wvdial
 
Hi all. Just wondering if anyone can point me in the right direction as to how to get mozilla to start wvdial. What I want is basically - when I start mozilla or my email client, I want a script or something firstly to check whether there is an existing connection, if there is, close, and if there isnt, then to start up wvdial and connect to the internet. Wvdial runs as root. I had fedora at one stage, and apperently, I think theres an app in there that will do this. However I never was able to get it working with my winmodem, so I had to use wvdial. Have switched to Debian sarge since and still use wvdial. Havent bothed with kppp or anything else cause I know wvdial works and I dont have any problems with it. Is this something that can be done at script level or is too complex and require programming. Not really very experienced in scripting and cant program at all, but I would like to give it a go. How hard do you think it would be?

acid_kewpie 01-25-2005 07:47 AM

I wouldn't know if there are more user level approaches for this, but a dial on demand server, diald, will be able to do this. basically it will dial when it sees internet traffic and hangs up after inactivity or such.

short101 01-25-2005 07:04 PM

Thanks acid_kewpie, will look into it.

dustu76 01-25-2005 11:46 PM

If you want to use this excellent opportunity to hone your shell scripting skills, you can write a script on the lines of :

[psuedocode]
while ifconfig_has_no_entry_for_ppp0
do
internet is down so
fire wvdial command
done
fireup_mozilla
[/psuedocode]

short101 01-26-2005 02:20 AM

Honing (actually - developing) my scripting skills is actually what I had in mind when I first asked the question. This may turn into a good little project to do on those rainy days. Have tried diald and cant get that to work at the moment anyway. Will keep trying but I think I'll have a go at writing my own home grown script just to see if I can. If I wrote a script that checked for an active connection, if it didnt find one, starts wvdial, then once active opens mozilla, could you put it somewhere in the mozilla directory to be run before mozilla is started? ie so if I click on mozilla icon, it runs script first.

dustu76 01-26-2005 10:24 PM

You don't have to put it in mozilla directory. You can place it anywhere & create a desktop icon/shortcut pointing to it. The script can call mozilla. I believe there is an option for running a program in an xterm (gnome had it??).

I'm out of touch with pointy-clicketty-icons 'cause I use fvwm ;)

Take the plunge, start writing it. We are always here to help you. You will eventually be successful & then...
Satisfaction Guaranteed.

HTH.


All times are GMT -5. The time now is 08:34 AM.