(c) Peter Antman, 1996

pppbutton [-en]

-en english dialog texts

pppbutton is a tcl/TK-script which creates a button, from which you can start and shut down a ppp-connection.


Unzip the tar-file and place pppbutton in a convenient place, for example /usr/sbin.

Either use your own ppp-up and ppp-down scripts or configure the example-scripts in the distribution.

To use pppbutton redial function you need a script that takes care of chats exits signals. Check the example scripts.


The configuration is done directly in the pppbutton script. To use it you have to specify the names of your ppp-up and ppp-down scripts. It is done with the variables "skript" - for ppp-up - and "skript2" for ppp-down.

You also have to change the values of variable search_string to the names of your local domain, if you have an ethernet interface. Othervice it should be only localhost.

It is also possible to configure such things as delays between network and ppp status checks and the interval between redialings. It is done with the variables t_net_check, t_ppp_check 1 and t_redial.

The only exception to this is that when pppbutton is started with the argument -en it shows English dialog texts instead of Swedish.

Also: Be sure to check that the path to wish is correct for your machine.


To connect: click on the button with mouse button 1

To disconnect: click on the button with mouse button 2

To exit the program: click on the button with mouse button 3. You will then get a menu from which you can exit the program. From the menu it is also possible to check the status of the net (netstat -t) and the latest lines in /var/log/messages (tail).

When connected the button is colored. If no there is no activity the button is green, which means it is OK to cancel the connection. When there is activity, the button is red.

If there are some troubles with ppp or chat different dialogs are presented. For example is the ppp interface checked every second to see if the connection prematurely has went down.

With the OK-buttons in the dialog a new dial-up attempt is made, and with Cancel the attempt is canceled.

When chat says that the number is busy, the OK-button will start an ongoing attempt to redial every tenth second. It is only possible to cancel this between dialing attempts.

I use pppbutton as a GoodStuff-like button. I place it over the GoodStuff menu. It can be done in this way:

Start pppbutton from .xsession

pppbutton -en -geometry 72x30+10+267 &

One have to experiment a bit with the geometry to get it right, and maybe even change the geometry of GoodStuff and the Pager.

In .fvmrc I have also placed the following line under Style Flags to make pppbutton appear on all screens:

Style "pppbutton" NoTitle, Sticky, WindowListSkip

Version History

0.1 Fist working, but primitive version.

0.2 A function which controls the status of pppd to catch any anomalities in ppps behavior, when connecting and when up

0.22 The dialog has a nicer look, and pop up at the mouse cursor.

0.3 A popup menu is activated when pressing mouse button 3

0.31 A bug due to excess code was taken away. It made the net-check activities go down when using the popup menu.

0.4 A redialing function was implemented. At this level the netactivities was monitored both by packets send to the ppp-interface and netstat. It was to volatile in my taste.

0.5 A new alegoritm to check the net-activities was implemented. It only check for external connection. To make it work you have to fill in your local domain, if you have one, under variable search_sring.

0.51 Two bugs have been solved. One that made the net-check activity go down when redialing, and one that made that too many pppd-broken dialog apeared.

English dialog-texts was also implemented. And the OK-buttons in the dialogs was connected directly to a new connection attempt.

Where to find pppbutton:




(c) Peter Antman, 1996.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Send any comment to peter.antman@abc.se