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.
|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