old-www/LDP/LG/issue01to08/ppptk.html

164 lines
5.2 KiB
HTML

<HTML>
<!-- BEGIN HTML HEAD ==================================================== -->
<HEAD>
<TITLE>Linux Gazette -- The ppptk Program</TITLE>
</HEAD>
<!-- END HTML HEAD ====================================================== -->
<!-- BEGIN HTML BODY ==================================================== -->
<BODY>
<H1><IMG ALIGN=MIDDLE SRC="../gx/lg_logo.gif">PPPTK</H1>
<H2>A Member of the Linux Documentation Project</H2>
<H4>&quot;The Linux Gazette...<I>making Linux just a little more fun...!</I>
&quot;</H4>
<H5>Copyright (c) 1996 John M. Fisk <I>fiskjm@ctrvax.vanderbilt.edu</I><BR>
The LINUX GAZETTE is a member of the LINUX DOCUMENTATION PROJECT.<BR></H5>
<HR>
<!-- ==================================================================== -->
<!-- ARTICLE ============================================================ -->
<H2><IMG ALIGN=BOTTOM SRC="../gx/text.gif">PPPTK - A Tcl/Tk Front-End for PPPD
</A></H2>
<P>
OK, let's take a better look at this little program. Here's a screen dump of
the most recent version of the program:
<P>
<IMG WIDTH=622 HEIGHT=738 SRC="./gx/ppptk.gif">
<P>
I've been using a series of BASH shell scripts to set up a PPP connection but
after school ended in June, I really wanted to create a Tcl/Tk front end for
all of this stuff. The features that I wanted included:
<UL>
<LI>Run-time entry of various parameters such as ping interval, modem init
string, redial interval, and so forth
<LI>Auto-minimization
<LI>Auto-ping to keep the connection from timing out
<LI>Checkbutton selection of lines to dial
<LI>Dial status Indicators
<LI>Optional BSD compression
<LI>Optional sound for connection and for connection time-out
<LI>Buttons for launching oft-used apps such as sendmail, popclient,
skim, and nist
<LI>/var/log/ppplog logging to keep a running indicator of the connection
status
</UL>
<P>
Well, I managed to get all those things set up. In addition, once a
connection has been established, it starts a timer which indicates the online
time -- AND, if a connection is up, iconizing the program causes the online
time to be displayed in the icon's title.
<P>
Seriously fun... :-)
<P>
I also wanted to be able to set up an auto-dial facility that would do:
<UL>
<LI>Immediate auto-dialing
<LI>Delayed auto-dialing
<LI>Auto Execution of selected programs
<LI>Auto Hangup, Quit, or Exit once the programs had finished execution
<LI>Auto Logging
</UL>
<P>
I did this because I wanted to have this program run unattended. Currently,
it can be set to perform a variety of functions at some specified time, log
its activity, and then optionally hangup or quit. This is nice because it can
be set up to run in the middle of the night when traffic is relatively
lighter.
<P>
Here's a screen dump of the AutoExec dialog:
<P>
<IMG WIDTH=306 HEIGHT=634 SRC="./gx/ppptk_autoexec.gif">
<P>
And finally, I wanted to be able to do some basic configuration during run
time. This would include changing fonts, colors, file locations, and so forth
-- rather than relying on hardcoded values. Here's a screen shot of the
Config dialog:
<P>
<IMG WIDTH=494 HEIGHT=622 SRC="./gx/ppptk_config.gif">
<P>
As I mentioned before, this has been a LOT of fun to work on (mostly during
those rare spare moments late at night). If you've enjoyed doing a bit of
shell programming and want to do something under X then I'd <B>strongly
recommend</B> doing a bit of playing with Tcl/Tk. I'd also commend to you one
of the excellent books on the subject: either <B>John Ousterhout's</B> book
<I>Tcl and the Tk Toolkit</I> or <B>Brent Welch's</B> book <I>Practical
Programming in Tcl and Tk</I>. Either of these are marvelous books although
you'll also want to have a set of the Tcl/Tk manual pages for full
descriptions of the language.
<P>
Well, have I got you interested...?
<P>
Hope so! :-)
<P>
This has been a HUGE amount of fun and it constantly amazes me that not only
Tcl/Tk, but also an ever-increasing number of add-on's are freely available to
anyone interested in using them. Try selling that one to the guys in Redmond,
WA...
<P>
Finally, if anyone is interested, I'd be happy to send a copy of the program
sources. Currently, this is strictly a home-grown program that has been
significantly customized to my own needs. I get 'Net access through the local
University which uses 8 phone numbers for a total of 120 lines. The first 32
lines have a 4 hour time limit and the rest have a 30 minute time limit.
So... you can understand why this has become pretty specialized. Still, there
might be something useful to someone and I'd be delighted to hear from anyone
regarding comments and criticisms about this.
<P>
Drop me a note at <A HREF="mailto: fiskjm@ctrvax.vanderbilt.edu">
fiskjm@ctrvax.vanderbilt.edu</A> if you're interested.
<P>
Thanks!
<P>
John
<P>
<HR>
<!-- ===================================================================== -->
<!-- FOOTER ============================================================== -->
<BR>
<H3><A HREF="./lg_issue8.html">Back to Linux Gazette!</A></H3>
<I>This page written and maintained by:</I><BR>
<ADDRESS>
<A HREF="./jmf.html">John M. Fisk</A> at <A HREF="mailto:fiskjm@ctrvax.vanderbilt.edu">
fiskjm@ctrvax.vanderbilt.edu</A>
</ADDRESS>
<!-- END HTML BODY ======================================================= -->
</BODY>
</HTML>