Making the Most of Andrew

In this article, Terry Gliedt completes our tour through the Andrew project with details on using and customizing AUIS applications.

In previous articles I focused a great deal on the ez editor and on the multi-media user mail agent, messages, but these are only two of a rich set of applications. Here are a few other applications that you'll find useful:

bush (see Figure 1) provides a graphical interface to the file system. It shows the directory hierarchy, filenames and their attributes. It also provides a window where the ez editor will run as well as a means to invoke an arbitrary command on a file. With bush you can sort the list, rename, and delete files, too.

Figure 1. Bush Showing a Tree of Directories

chart allows you to create simple graphs from numeric data. The data can be presented as a histogram, pie chart, or line graph.

ezdiff is not actually an application, but rather a procedure you can call from all ez windows. This is used to run the diff command on the data in two windows and then interactively see the difference between the files.

To try ezdiff, edit two files (e.g., ez/etc/hosts .deny/etc/hosts.equiv). In each window, select the Start item on the Ezdiff menu card. As you select the Next item on the Ezdiff menu card, the differences in each file are shown as highlighted data. This makes it very easy to copy lines selected in one window and paste them in the other. And yes, ez correctly remembers the locations of all the other differences when you make changes to either document. This is a life saver when looking at various versions of a file.

figure (see Figure 2) is a fairly conventional drawing editor. The files usually have an extension of .fi. Figure can create a document with lines, circles, boxes, and other insets (e.g., rasters or text), and then move them around, reshape, etc. Since figure creates an ATK data-stream, you can easily insert figures in other AUIS documents.

Figure 2. Sample AUIS Figure

pipescript (see Figure 3) reads data from stdin and displays it in a window. This is very convenient with pipes, because the output data does not disturb your xterm window and yet is not in a file you need to remove. The data can be conveniently scrolled, searched or saved. I use it all the time for commands like tar tzvf auis63L1-wp.tgz | pipescript.

raster provides a simple means to edit digitized pictures (called rasters). The data must be in AUIS data-stream format. The pbmplus package (available on sunsite) provides a wide set of filters to convert between various forms of digitized data. For example, to convert from a TIFF to an AUIS-raster, I'd use this command:

tifftopnm test.tif | ppmquant 256 | ppmtopgm\
| pgmtopbm | pbmtocmuwm > test.ras

typescript (see Figure 4) provides an alternative to xterm. You enter commands to your shell in the input window and the results are shown in the same window where they can be scrolled, searched or saved. Typescript does not support curses like xterm does, so you cannot run vi or bash in a typescript, for example. However, you can use the tcsh or pdksh (ksh) shells.

Figure 3. grep InitializeClass *.c | pipescript

Typescript has several other features that I find very useful. The README for the word processing package describes how you can cause the current working directory to be kept in the title of the typescript window. Typescript is “smart” about these paths, too. Notice in Figure 4 that the path shown in the title of the window is “~”, my home directory, and not a fully qualified path.

Typescript supports the use of several PC keys to make it easier to enter commands. The Cursor-Left and Cursor-Right keys can be used to edit the current command (regardless of whether my shell supports this). The Home and End keys will move the cursor to the beginning or end of the line (or selected area). The cursor keys are also mapped to allow me to move up and down through the command history. Cursor-Up gets the previous command entered, Cursor-Down the next.

Figure 4. Sample Typescript Window

In my opinion an even more useful feature is command completion. If I type ls and then press Cursor-Up, I get the previous command that began with “ls”. File completion is supported with the tab key. If I enter ls src/tp and then press the tab key, typescript will complete the path “src/tp” to “src/tpg-config” (in my case). It makes entering paths to files ten times easier. I love it!

If I enter a command like ls /etc, the window will likely fill and scroll automatically. If I want to see the beginning of the scrolled data, I must use the mouse (or Page-Up/Down keys) to scroll. However, if I enter ls /etc control-J (where I enter the command with a control-J keystroke, rather than the normal Enter), the command is executed, but the output is pushed to the top of the current window so I do not need to scroll.

Typescript also allows me to create my own menus in the file ~/.shmenu. In Figure 4, you can see I have a menu card Internet on the menubar. This is from my own .shmenu file which looks like this:

#  User's .shmenu file
#       Do help .shmenu for more information.
#       Establish the pop up menus for the
# typescript window.
Internet~20,FTP<->Sunsite export~15:ftp
sunsite.unc.edu
Internet~20,FTP<->CMU~16:ftp.andrew.cmu.edu
Internet~20,FTP_Anonymous~20:anonymous
Internet~20,FTP_Ident~21:tpg@mr.net
Internet~20,FTP_bin~22:bin
Internet~20,FTP_submissions~23:cd pub/next/submissions
Internet~20,Telnet->CMU~31:telnet ftp.andrew.cmu.edu
Internet~20,Bring Slip Up~40:/usr/local/bin/slipup
Internet~20,Take Slip Down~41:/usr/local/bin/slipdown

Figure 5. Modifying preferences with prefed

______________________

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