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.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
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.
Sponsored by ActiveState
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Linux Systems Administrator
- Validate an E-Mail Address with PHP, the Right Way
- Introduction to MapReduce with Hadoop on Linux
- RSS Feeds
- Weechat, Irssi's Little Brother
- New Products
- Tech Tip: Really Simple HTTP Server with Python
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




1 hour 35 min ago
1 hour 36 min ago
2 hours 21 min ago
3 hours 9 min ago
3 hours 33 min ago
5 hours 10 min ago
5 hours 11 min ago
7 hours 5 min ago
9 hours 54 min ago
15 hours 7 min ago