The Plan 9 windowing system is called 81/2, since it was the Eight and a half'th windowing system that Rob Pike had written. To create a new window, you select New from the right button menu, and sweep out the window you want. That window then runs a shell (rc, discussed below).
What is unusual about the windows in 81/2 is that you can edit the text directly in the window. Thus, if you make a typing error in a command, you fix the error, select the entire line, and resubmit it. This obsoletes the need for built-in command history as found in current Unix shells, such as ksh, bash and tcsh.
Furthermore, windows provide more complicated text editing capabilities. By pressing the ESCAPE key, the window goes into “hold mode”. All text is kept in the window. It is not sent to the program running in the window until the ESCAPE key is hit again, leaving hold mode. Hold mode is indicated by an extra white border inside the window, and a larger, white arrow for the mouse cursor.
You might use this, for example, when sending mail to someone. Run the Mail command, and then go into hold mode. Type in, edit, and rearrange your letter to your hearts content. Then leave hold mode, and out goes your mail to the Mail program.
Finally, by default, 81/2 windows do not scroll. Instead, text just buffers up inside them until you are ready to look at it. The down-arrow key on the keyboard allows you to quickly move through the buffered text. You can use the button 2 menu to change the behavior of the window so that it does scroll. The non-scrolling mode is a feature; it obviates the need for pager programs like more, pg, and less.
The Unix program that emulates 81/2 windows is called 9term. 9term was written by Matty Farrow, at the University of Sydney, in Australia. It adds an additional library, libtext, on top of libframe and libXg. 9term is both small and fast. On a Sun SPARCstation LX, 9term starts almost instantly, while an xterm can take several seconds to start up, noticeably longer.
Besides hold mode described above, 9term provides cut and paste editing and the ability to search backwards or forwards in the window for a particular piece of text (whatever is currently selected). 9term also uses the up-arrow key to allow you to go backwards in the window, something that must be done with the mouse in 81/2.
The 9term interface is consciously similar to that of sam. Button 1 in both programs selects text, button 2 supplies the editing menu, and button 3 provides the control menu. Double-clicking button 1 at the end of a line selects the whole line, and double-clicking in the middle of a word selects the word. Finally, in both programs, menus “remember” the last command issued. Thus, the next time you call up a menu, the default action is to do what you did last time, which is often what you want to do.
Having the identical interface makes using your system much easier; you don't have to mentally “switch gears” when moving from one window to the next: your mouse and keyboard work the same way, no matter what.
9term is fast because it is simple. Unlike xterm, it is not emulating a real terminal (or two or three), trying to interpret and process escape sequences. This means, for example, that you can't run vi or emacs inside a 9term window. On the other hand, why would you want to? sam is considerably more powerful than vi, and much easier to learn than Emacs. My intent is not to start Yet Another Religious Editor War. Rather, the philosophy is that 9term doesn't have to be complicated to support screen editors, since a powerful editor, sam, is already available.
In the same directory as the 9term distribution there is a tar file with a large set of Unicode fonts for use with X. I particularly like the pelm.latin1.9 font.
The sidebar describes where to get 9term and the Unicode fonts.
In next month's conclusion, we'll discuss the shells to run inside 9term, and the 9wm window manager that completes the 81/2 emulation.
Arnold Robbins (firstname.lastname@example.org) is a professional programmer and semi-professional author. He has been doing volunteer work for the GNU project since 1987 and working with Unix and Unix-like systems since 1981.
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|
- Stunnel Security for Oracle
- The Firebird Project's Firebird Relational Database
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SUSE LLC's SUSE Manager
- Managing Linux Using Puppet
- My +1 Sword of Productivity
- Non-Linux FOSS: Caffeine!
- Doing for User Space What We Did for Kernel Space
- SuperTuxKart 0.9.2 Released
- 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