Making the Most of Andrew
At startup AUIS applications look for several initialization files. There are two classes of these, global or machine-wide files found in /usr/andrew/lib and personal files, found in your home directory. Each application can have its own initialization file. For example, ez would check for files in this order:
~/.ezinit /usr/andrew/lib/global.ezinit ~/.atkinit /usr/andrew/lib/global.atkinit
If the .ezinit file is found, the global.ezinit is not read. Similarly, if .atkinit is found, the global.atkinit file is not read. This ordering means that when you create an initialization file, you should make it refer to the files that it masks by using an “include” statement. So, if you are going to make a .ezinit file, you would want to include the global.ezinit by:
include /usr/andrew/lib/global.ezinit include $HOME/.atkinit
and your ~/.atkinit should probably include /usr/andrew/lib/global.atkinit.
If you don't include the global file, you will not get important default settings. Note, though, that not all programs have global initialization files. When something is defined more than once, the last definition stays in effect.
While I used ez in this example, this works exactly the same for typescript or any other AUIS application. Typescript would read ~/.typescriptinit, or if that file did not exist, it would read /usr/andrew/lib/global.typescriptinit instead. All applications look for ~/.atkinit and /usr/andrew/lib/global.atkinit. These files are described in more detail with the command auishelp initfiles.
In AUIS applications menus are simply a means to call a procedure (method) for an object. AUIS has hundreds of these defined and they provide enormous functionality. To define a menu, edit one of the initialization files described previously (a personal initialization file is probably best) and add lines like these:
addmenu filter-filter-region-thru-command "Misc,Flow~20" textview \ filter inherit "flowtogether" addmenu textview-lowercase-word "Misc,Lower~21" textview addmenu textview-uppercase-word "Misc,Upper~22" textview addmenu filter-filter-region "Misc,Filter Prompt~25" textview
The entries shown add items like Flow and Lower to the Misc menu card. The order of these items is determined by the numbers (20, 21, etc.). When you select a item like Lower, the procedure textview-lowercase-word will be called and the selected area will be folded to lower case.
Knowing the procedure names is important to create menu cards. There is no fixed list of all the procedures that are in AUIS because the AUIS objects are dynamically loaded. To help you find out what is available, select Describe Proc Table on the Misc menu card. This will open a window which displays a list of all the procedures and a short description of purpose for each.
A more complex example is shown when the procedure filter-filter-region-thru-command is called when the Flow item is selected. In this case the procedure calls the filter flowtogether. Flowtogether is a simple filter which combines lines together to remove excess whitespace and create data in paragraphs. I use this filter in messages when I want to quote part of some mail and make it nicer looking.
Most of the menus you see in the Linux distribution were added using addmenu in the various initialization files. You can add your own menu cards by adding addmenu commands in your private initialization files. More details on adding menu cards can be found with the command auishelp initfiles.
If I issue the command ez test.d, the data in this file will be an AUIS text document, but if I edit the file test.document, it will be just simply ASCII data. The difference obviously has something to do with the extension of the file. Linux, like all conventional Unix systems, really has no innate “knowledge” of what is in a file, but we all have expectations for what's in the file test.c. It's just a matter of convention. AUIS has its own conventions and these are controlled in the file /usr/andrew/lib/global.filetypes which has entries like these:
addfiletype .Xdefaults rawtext "template=rawtext" addfiletype .c ctext "template=c" addfiletype .h ctext "template=h" addfiletype .d text "template=default" addfiletype .doc text "template=default" addfiletype .help text "template=help"
Addfiletype commands allow you to map extensions to inset types so that new documents you create with a certain extension will get the proper inset type specified by the “template=” keyword.
Editing .Xdefaults will have the template rawtext (which will insure that copying an AUIS datastream results in a simple ASCII string and not some bold text) and editing .Xdefaults.old results in the default template (which allows you to copy and retain bold text) which is probably not what you want. The current AUIS distribution does not allow you to use wildcards in addfiletype commands, so you must explicitly map .Xdefaults and .Xdefaults.old individually. More details on filetypes can be found with the command auishelp initfiles.
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|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|
- RSS Feeds
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Dynamic DNS—an Object Lesson in Problem Solving
- 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?
- Download the Free Red Hat White Paper "Using an Open Source Framework to Catch the Bad Guy"
- Tech Tip: Really Simple HTTP Server with Python
- Please correct the URL for Salt Stack's web site
2 hours 46 min ago
- Android is Linux -- why no better inter-operation
5 hours 1 min ago
- Connecting Android device to desktop Linux via USB
5 hours 29 min ago
- Find new cell phone and tablet pc
6 hours 28 min ago
7 hours 56 min ago
- Automatically updating Guest Additions
9 hours 5 min ago
- I like your topic on android
9 hours 51 min ago
- This is the easiest tutorial
16 hours 27 min ago
- Ahh, the Koolaid.
22 hours 6 min ago
- git-annex assistant
1 day 4 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout 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 Pi Cobbler Breakout 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
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
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?