Making the Most of Andrew
All AUIS applications provide a means to use a filter to modify a selected area. The Misc menu card provides items to fold data to lower case, upper case or to “flow” the data together. To use filters, simply select an area (so it is highlighted) and select the correct item. There is also an item (Filter Prompt) which allows you to specify your own filter. For instance, specifying the filter sort would cause the selected text to be sorted—just like you would in a conventional Unix pipe.
You can tailor the behavior and appearance of your AUIS applications with your own ~/preferences file. Each time an application begins, it checks a set of resources you have specified in your preferences file. The resources in the preferences file are similar to other X-resources. A sample preferences file is provided in /usr/andrew/sample.preference. If you edit this file you will find lines like these:
Messages.Geometry: 750x600 Figure.BackgroundColor: White *.BackgroundColor: LightSkyBlue4
The first field (e.g., Messages, Figure or “*”) is the application name. The asterisk means it applies to all AUIS applications. AUIS resource names are case insensitive, so “Messages” is the same as “messages”. The second field is specific to the application. Most of these, like “Geometry” or “BackgroundColor”, will be pretty obvious. Others, like “XStyleSelections”, will be a mystery unless you read the preferences help file (auishelp preferences). Some of these resources are specific to a single application and others apply to all AUIS applications.
The third field (after the colon) is the value of the resource and is tied directly to the second field. These resources can be rather confusing. To make it easier to understand what resources can be set for which applications, a specialized preferences editor was written, prefed. As you can see in Figure 5, the prefed window is divided into four areas. You select the application name in the upper left hand window (“EZ” in this case). The upper right hand window has the list of resource names (“OverwriteFiles”). The middle window shows you what the current setting is and allows you to change it. Finally, the bottom window provides a description of what the resource controls. When you select the item Save, your preferences file will be modified, just as you would expect with any editor. The addition of prefed has made it much easier to figure out this bewildering array of resource names. When an application initializes, it searches for all resources that apply to that application. The resources are applied in the order that they are read. The search order is first in ~/preferences and then in the machine-wide “preferences” file in /usr/andrew/lib/global.prf. Thus, if you specify any resources that apply against all applications (e.g., *.BackgroundColor), these should be at the bottom of your preferences file. This is sightly different than resources for conventional X-applications.
One thing to keep in mind is that preferences are only read when an application initializes. If you change the ez BackgroundColor, for example, this will not take effect until you start a new ez from the command line (from an xterm or typescript).
Messages, the multi-media mail user agent, is unique with respect to its treatment of preferences. Since there are a great many preferences resources for messages, a long time ago the author of messages added his own specialized way to set preferences for messages by selecting the Set Options item on the Other menu card.
Printing is an area where it seems everyone needs to “have their own way”. AUIS printing involves two steps. Applications generate groff data and the first step is to format this to generate the printer-specific datastream. The second step is to simply deliver the stream to the printer. These two steps can be overridden with your preferences. The default preferences settings are:
*.FormatCommand: /usr/andrew/etc/atkprint /tmp/%s.n | *.PrintCommand: lpr -P$PRINTER
These two commands are joined in a pipeline (hence the pipe character, “|”, at the end of FormatCommand). When this command is built, the %s will be changed to the name of the groff input file.
Many AUIS applications actually generate PostScript data with just a simple groff “wrapper” around the PostScript. In the next major release, AUIS will generate PostScript directly and the need for a FormatCommand will be eliminated. But for now, if you are having difficulty you might want to copy /usr/andrew/etc/atkprint and make your own version which you can modify to meet your needs. You can then specify your own FormatCommand resource to invoke your own version of atkprint.
Sometimes I want to capture the groff input, so I simply make a quick preferences change
*.FormatCommand: cat /tmp/%s.n > /tmp/test.n
to copy in the input file to /tmp/test.n. I can then execute the print sequence manually with:
/tmp/atkprint /tmp/test.n | pipescript
so I can see exactly what's happening in the shell script. On the other end, if I want to simply capture the PostScript, I can change preferences to:
*.PrintCommand: cat > /tmp/test.ps
There are obviously many ways to accomplish either of these steps. The point to remember is that AUIS printing is entirely externalized. You can control it to any degree you need.
|Contrast Security's Contrast Enterprise||Aug 30, 2016|
|illusive networks' Deceptions Everywhere||Aug 29, 2016|
|Happy Birthday Linux||Aug 25, 2016|
|ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs||Aug 24, 2016|
|Updates from LinuxCon and ContainerCon, Toronto, August 2016||Aug 23, 2016|
|NVMe over Fabrics Support Coming to the Linux 4.8 Kernel||Aug 22, 2016|
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Contrast Security's Contrast Enterprise
- illusive networks' Deceptions Everywhere
- Happy Birthday Linux
- What I Wish I’d Known When I Was an Embedded Linux Newbie
- New Version of GParted
- All about printf
- ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs
- Tech Tip: Really Simple HTTP Server with Python
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide