PPPui: A Friendly GUI for PPP
PPP, the Point-to-Point Protocol, is today's protocol of choice for network connectivity over a serial line. For Linux users, the tools of choice are the PPP utilities. The utilities—pppd, chat and a collection of scripts and utilities—nicely manage the connection from startup to shutdown: dialing and logging in, starting up the protocol, adding routing information and closing the connection.
What the PPP utilities do not have is a good user interface. If you use the utilities, you know the routine: execute a script called something like /etc/ppp/scripts/ppp-on, listen to your modem make noise and wait while your network connection attempts to start working. If nothing happens, check the process list. If pppd isn't running, the login attempt failed and you need to try again. If the connection goes down, you eventually figure it out by checking the process list and starting a new connection. Things improve after you've used the PPP utilities awhile—you begin to recognize the state of the connection by the sounds of disk activity.
PPPui was written out of my frustration with the utilities' low-tech interface. It's an X-based (specifically, Tcl/Tk-based) GUI that provides very simple control over a PPP connection. The goal was to provide easy startup and shutdown and useful visual feedback about the connection.
The scenario for a PPPui session looks something like this:
Start PPPui. I've defined a window manager action, described below, that makes this a one-click operation.
A window comes up and reports the progress of the login process. If login fails, the window disappears and you must try again.
Once login succeeds and the PPP route is added, PPPui displays a running clock of your connect time. The clock is visible even when you iconify PPPui.
To terminate the connection, press PPPui's “Quit” button.
PPPui is implemented as a wish (WIndowing SHell—part of the Tcl/Tk package) script and requires wish4.2. It does not replace the PPP utilities, but does require some very minor changes to them—discussed later in detail.
The PPPui script was developed on a Slackware system using the PPP utilities source distribution. In the following description and in the script itself, there are assumptions about locations (scripts and executables) and permissions that do not necessarily apply to other distributions. The script takes two required arguments and two optional arguments. The basic invocation takes a PPP startup command, a PPP shutdown command and optionally the name of the PPP device being opened (defaults to ppp0). For example:
PPPui /etc/ppp/scripts/ppp-on\
/etc/ppp/scripts/ppp-off ppp0
The startup and shutdown commands are interpreted by /bin/sh when they are invoked and can contain multiple arguments and anything else the shell will recognize. For example:
PPPui /etc/ppp/scripts/ppp-on\
'/etc/ppp/scripts/ppp-off ppp0' ppp0
The other optional argument, -small, is
described in the section “Interacting with the Window Manager”.
After parsing the command line, PPPui sets the shell command to use when interpreting startup and shutdown commands. It then sets up a simple GUI containing a label, a “quit” button and a scrolled text console for displaying status information. PPPui also sets up a named pipe to the console, whose purpose is explained in the section “Changes Required in PPP Utilities”, and it initiates the startup command and captures the output. After setup, PPPui's most important job is to wait around for something to happen. Here are the things it is waiting for:
The startup command generates output or output is received through the named pipe. The output is captured by HandleStartOutput{} or HandleFIFOInput{} (respectively) and sent to the console by calling ToConsole{}.
The PPP connection is established. PPPui calls CheckPPPDevice{} every 1/2 second to examine the contents of /proc/net/route until a route appears for the device (the third argument to the script names the device). Once the route appears, PPPui starts a running display of the connect time, calling PostTime{} once a second to update the clock. The clock is displayed in the label at the upper-left corner of the GUI and also in the window's title. This allows the clock to be visible even when the window is iconified.
The user asks to close the connection by pressing the “Quit” button or closing the window. PPPQuit{} is called to invoke the shutdown command. After the invocation, PPPui resumes waiting. Any output from the shutdown command is captured by HandleStopOutput{} and sent to the console.
The startup command terminates. This is usually in response to execution of the shutdown command, but can also occur if the connection dies or the login fails. The death of the startup command results in an EOF condition detected by HandleStartOutput{}, at which point PPPui terminates and its window disappears.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- New Products
- Tech Tip: Really Simple HTTP Server with Python
- RSS Feeds
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.




53 min 7 sec ago
2 hours 21 min ago
3 hours 30 min ago
4 hours 17 min ago
4 hours 38 min ago
10 hours 52 min ago
16 hours 31 min ago
22 hours 30 min ago
22 hours 53 min ago
23 hours 3 min ago