Click to See Complete Forum and Search --> : A GTK version of xmessage? And something else that wont fit in the subject


Spacecake
04-25-2001, 04:03 PM
First question is: i use xmessage to ask questions when my scripts aren't run in a terminal window. Is there a simmilar program that looks nicer, though? Default X gui is *ugly* :)

Another thing was, i was trying to write a simple script (i only started sh scripting a few days ago) that launched wvdial, and upon successful connect, did some stuff for me (like uploading a html file with my ip in so when i tell ppl to get files off my computer i can always direct them to the same URL, and other stuff).
But how do i find out if wvdial has successfully connected or not? I can't just wait a certain amount of time, because i live in the land of crappy ISPs (england) where it often doesn't connect first time or at all.
When i use the dialer thingie that comes with redhat6.2 (rp3) and watch the list in top, it starts up something called ppp-watch, pppd and wvdial all at the same time, then wvdial disappears once i am connected. How do i do this from a script? Then i could just check the returncode of wvdial and decide whether to upload or not.

Yet another question... after going through the bash man page about 10 times i still cant see a command that will just wait for n seconds. Eg. when i connect to the internet i want to be able to wait a few seconds before uploading the above mentioned stuff, cause i have a really crap isp and for some reason nothing will load up for the first 20 secs or so.
The only way i used so far when i was in quick need of it was a script with a while loop checking the time it was started against $SECONDS. This sucks all free cpu cycles though. Argh :) I guess i could combine that with that bash builtin i read about that limits cpu usage... but, ISN'T THERE JUST A BLOODY DELAY COMMAND? :p

Thanks for any help...

/Spacecake (who feels bad for leeching advice from this forum and never posting help to anyone else :o)

pwrhouse
04-25-2001, 08:34 PM
I believe the "wait" command you are looking for is sleep.

sleep n

Hope this helps

binaryDigit
04-26-2001, 12:51 AM
and...
after a succesfull connection the script /etc/ppp/ip-up or ip-up.local is run. not exactly sure about the path, but that's where it is in slack. there is also ip-down which handles a terminated connection. so put whatever script you come up with in ip-up.

Pierre Lambion
04-26-2001, 04:25 AM
GTK alternatives to xmessage:
http://freshmeat.net/search/?q=xmessage

Right, xmessage is really ugly!