PPPui: A Friendly GUI for PPP

Having problems setting up PPP? Mr. Meyers gives us a graphical interface to make it easy.
Changes Required in PPP Utilities

PPPui works with the existing PPP utilities as is—almost. There is one required change and one optional change to effect the interface from the utilities to PPPui:

  • Required: The startup script must not terminate until the connection is closed. Normal pppd behavior is to run in the background as a daemon—this does not work for use with PPPui. You need to add the -detach option to the invocation of pppd in the ppp-on script. In my version of ppp-on, based on the 2.2.0f distribution of the PPP utilities, the pppd invocation appears thus:

         exec /usr/sbin/pppd debug lock modem crtscts\
         /dev/modem 38400 asyncmap 20A0000 escape FF\
         kdebug 0 -detach $LOCAL_IP:$REMOTE_IP\
         noipdefault netmask $NETMASK defaultroute\
         connect $DIALER_SCRIPT

  • Optional: The chat program, which handles the dialing and login responsibilities, has the option of logging all text received from the remote modem to stderr—that is, to display what you would see if you were logging in from a terminal. If this option is enabled with the -V command, the resulting stderr provides a nice display of the progress of the login, which would be useful feedback on the PPPui console. Unfortunately, chat's stderr is eaten by pppd for logging purposes. So PPPui provides an alternate route to the console: a named pipe whose name it advertises through the PPPUI_PIPE environment variable. By adding -V to the chat invocation and redirecting stderr to the named pipe, you capture the login sequence on the console. An excerpt from my version of the ppp-on-dialer script:

     if [ "$PPPUI_PIPE" != "" ] ;
     then exec 2>"$PPPUI_PIPE" ; fi
     exec /usr/sbin/chat -V

Figure 1. PPPui Screen Dump

Figure 1 is a screen dump of PPPui taken ten seconds after I established a connection with Teleport, my ISP in Portland. The login sequence is captured in the console, and the clock ticks away in the upper left corner and on the title bar. If I iconify the client, the running clock appears with the icon or in the task bar (depending on your choice of window manager).

What about security and permissions? One more change to the utilities seems appropriate, and it is addressed in the sidebar, “PPP Security and Those Pesky Run-Only Scripts”.

Interacting with the Window Manager

By adding a PPPui action to the window manager, you can make starting your PPP connection a one-click operation. I use FVWM95 as my manager; this line in my .fvwm95rc adds PPP startup to the FvwmButtons panel:

*FvwmButtons(Title 'teleport', \
Action 'Exec "Teleport Connect" \
PPPui -name "Teleport Connect" \
"/etc/ppp/scripts/ppp-on" \
"/etc/ppp/scripts/ppp-off" ppp0 &')

PPPui has an additional option to facilitate interaction with FVWM95. The -small windowname argument causes the following two operations to occur after the connection is established:

  1. The console is unmapped and the clock and quit button repacked into a very small area.

  2. The window title is changed to the window name specified as part of the option.

To support the “swallowing” function of FvwmButtons, the following entry is needed in .fvwm95rc:

*FvwmButtons(Title 'teleport', Swallow \
        (Useold Respawn) "pppui_swallow"\
        Nop, Action 'Exec PPPui -name \
        "Teleport Connect" -small pppui_swallow\
        "/etc/ppp/scripts/ppp-on" \
        "/etc/ppp/scripts/ppp-off" ppp0 &')

It creates an invocation of PPPui that is swallowed into the button panel after the connection is established, as shown in Figure 2. (Unfortunately, the semantics of FvwmButtons cause the button to appear in a constantly-pressed state when the connection is not active, which is a bit distracting.)

Figure 2. FvwmButtons Example


PPPui replaces a hard-to-use and obscure user interface with a simple, intuitive graphical interface. The code for the PPPui program and the rscript utility are available by anonymous download in the file ftp.linuxjournal.com/pub/lj/listings/issue50/2491.tgz.


Nathan Meyers is a staff consultant in Portland for a large electronics company, where he specializes in application performance of UNIX-based products. He can be reached at nmeyers@teleport.com.


White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState