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.
Practical Task Scheduling Deployment
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- The Firebird Project's Firebird Relational Database
- Stunnel Security for Oracle
- My +1 Sword of Productivity
- Non-Linux FOSS: Caffeine!
- SUSE LLC's SUSE Manager
- Managing Linux Using Puppet
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Parsing an RSS News Feed with a Bash Script
- Doing for User Space What We Did for Kernel Space
- Google's SwiftShader Released
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