-->
by Kamran Husain
IN THIS CHAPTER
This chapter introduces you to OPEN LOOK on Linux. Ideally, this chapter could be
expanded into a book of its own. That being impossible however, we will cover some
of the basics of OPEN LOOK in this chapter, including
If you have not already done so, read Chapter 23, "Using Motif." This chapter will build on that chapter, so there won't be duplicate information for you to weed through. The information you require from the Motif chapter is the discussion on X Window, working with pointers, and the Motif environment. You will definitely need to know how to use resources in the .Xdefaults files and starting X Window via shell scripts like startx.
OPEN LOOK is a specification of a Graphical User Interface (GUI). A GUI determines the look and feel of a system--the shape of windows, buttons, and scrollbars; how you resize things; how you edit files; and so on. The OPEN LOOK GUI is specified, developed, and maintained primarily by Sun Microsystems, Inc. XView is simply the port on Linux. When I talk about OpenWindows, I will refer to XView for Linux in this chapter.
OpenWindows is a windowing environment that conforms to the OPEN LOOK Graphical User Interface Specifications. It's compatible with the X11 window system from MIT as well as (currently) Sun's NeWS and SunView, so you can intermix programs written for any of these systems. It comes from Sun and also with UNIX System V Release 4 from certain vendors.
Several toolkits exist for programmers to use in developing programs that conform to the OPEN LOOK specifications:
OLIT was AT&T's OPEN LOOK Intrinsics Toolkit for the X Window system. OLIT used a widget set and was therefore easy to learn for people who were already X11/Xt programmers. You could buy the source from AT&T, although you didn't get the same version that Sun would ship.
Sun includes the OLIT library in OpenWindows. OLIT is also often included in UNIX System V Release 4. OLIT was written in C. The last release of OLIT in OpenWindows 3.0 was OLIT 3.0. OLIT support passed to USL (UNIX System Laboratories), who replaced it with MoOLIT (see the following Tip).
XView is Sun's toolkit for X11, written in C. It is similar in programmer interface to SunView. There's even a shell script to help migrate source code from SunView to XView. XView is often said to be the easiest toolkit to learn if you are not familiar with X Window.
The XView toolkit is included in OpenWindows. The current version of XView from Sun is 3.2p1.
The NeWS Toolkit (TNT) is an object-oriented programming system based on the PostScript language and NeWS. TNT implements many of the OPEN LOOK interface components required to build the user interface of an application. It's currently included in OpenWindows.
The current version of TNT from Sun is 3.1. Release 3 contains some incompatibilities with TNT 1.0 and TNT 2.0, but Sun is committed to supporting the API, at least until it stops NeWS support some time later this year and replaces it with Display PostScript. Wait. You might ask what "is committed to" means in this context; the answer seems to be that it means absolutely nothing.
Sun currently asserts that it is committed to OLIT, however.
The C++ User Interface Toolkit (UIT) consists of an object-oriented C++ class library layered on top of XView and a tool to generate code from files written in a graphical interface language called DevGuide 2 GIL. The UIT also includes features that simplify event management and the use of PostScript and color. It is said to be compatible with OpenWindows Versions 2 and 3, and presumably Version 3.0.1, as the release mentions that it works on Solaris 2.
UIT is not an official Sun-supported product but an ongoing project of various people within Sun.
There are two window managers for OpenWindows: olwm and olvwm. A window manager is responsible for deciding how to lay out windows on the screen, and for managing the user's interaction with the windows.
olwm is the standard OPEN LOOK window manager. This window manager is included with all of the OpenWindows implementations, and you can also get the source via FTP because Sun donated it to the freeware domain.
The olvwm program is a version of olwm that manages a virtual desktop (hence the v in its name). It shows a little map on the screen, with the currently displayed area represented by a small rectangle. You can move around by dragging the rectangle or with the arrow keys. This enables you to run several clients (applications) that occupy the full screen and move the display around from one to the other. olvwm was derived from the OpenWindows 3.0 olwm by Scott Oaks. You need to have XView 3.0 to compile it.
The olvwm and olwm packages are included on the CD-ROM at the back of the book.
First, confirm that you have installed the XView system on your Linux system. You need the xv disk set, which consists of two disks: xv1 and xv2. The files in this disk set are detailed in the following list:
xv32_a.tgz | Static libraries for developing XView 3.2 applications. |
xv32_so.tgz | Shared libraries for XView 3.2. |
xv32exmp.tgz | Sample programs for XView 3.2. |
xvinc32.tgz | Include files for XView 3.2 programming. |
xvmenus.tgz | Menus and help files for the OPEN LOOK window manager. |
xvol32.tgz | XView 3.2 configuration files, programs, and documentation. |
You need one of two files to get started with OpenWindows: either .xinitrc or .xsessionrc.
The first time you run OpenWindows, a .xinitrc file is created in your login directory ($HOME). If it already exists, you might have to edit it somewhat. It's best to move all old X11 files you have to another directory, and then merge the old and new files.
Refer to Chapter 23 for a detailed discussion on .xinitrc and installing X on your Linux system.
Take the following steps to convert this .xinitrc file into one for using OpenWindows:
There are other optional files you can create in your $HOME directory, depending on which version of olwm or olvwm you use:
This file is used to initialize your desktop when you start OpenWindows with olwm or olvwm. A sample .openwin-init file is shown in Listing 24.1. This sample file shows how two xterms and one clock application are started every time you start a session. OpenWindows looks at a file called .openwin-init in your home directory. If .openwin-init is not found in the home directory, OpenWindows looks in the $OPENWINHOME/lib directory. The .openwin-init file contains a list of applications to start by default.
#!/bin/sh # # Created by `xtoolplaces' on Fri Dec 9 23:10:23 1994 # /usr/bin/X11/xterm -sb -sl 500 -j -ls -fn 7x14 -geom 82x24+45+52 & clock -Wp 4 5 -Ws 172 52 -WP 224 533 +Wi &
xterm -e /bin/bash -geom 80x24+103+89 &
Look in $OPENWINHOME/lib (normally /usr/openwin/lib) for this and other similarly named (openwin-menu-s, openwin-menu-d, and so on) files without the leading period (.). We will discuss these files in the "Environment Variables" section later in this chapter.
The .Xdefaults file applies to OpenWindows as well. You can put X Window resource specifications in here. In particular, it is a good idea to include at least
OpenWindows.FocusLenience: true *Input: TRUE
These enable non-ICCCM-compliant programs to receive input even if they forget to ask for it.
Start your program up with the startx support. See Figure 24.1 for what you should see when you start OpenWindows.
FIGURE 24.1. The Xterm in OpenWindows.
In OpenWindows (and Sun Workstations, for that matter), the left and right buttons on a mouse are referred to as SELECT and MENU, respectively. Clicking the SELECT button in a window selects a window. Clicking the MENU button in a window displays any menu for that application.
Let's examine the borders on an Xterm in OpenWindows in greater detail.
(See Figure 24.2.) These borders are drawn by olwm and have special functionality.
FIGURE
24.2. OpenWindows borders.
The resize handles (buttons) are the indentations on each window. You can resize
a window by pressing and holding SELECT over any of the resize corners and then dragging
the mouse to the new location.
Releasing the mouse button sets the new size of the window. If you hold down the Ctrl key while you are dragging, the resize operation is constrained to resize vertically or horizontally, depending on which direction you move first.
The Window button is the small box with a downward-pointing triangle near the left end of the title bar. Clicking MENU over the Window button brings up the Window menu. Clicking SELECT over the left mouse button on the Window button executes the Window menu's default action. This usually closes the window into an icon. You can change the window menu's default action by holding down the Ctrl key while manipulating the Window menu.
An icon represents a closed window. You can still do most of the same operations as with an open window. Moving and selecting icons with SELECT and ADJUST is exactly the same as for open windows. A similar version of the Window menu is available on an icon by pressing MENU. Double-clicking SELECT opens the icon. Icons cannot be resized.
You can select a group of windows and icons by using the left or middle mouse buttons over the workspace (the area of the screen outside of all windows and icons, commonly known as the "root window"). Pressing either SELECT or ADJUST and dragging the mouse defines a rubber band rectangle.
When you release the mouse button, you will be operating on the set of windows and icons enclosed by this rectangle. If you created the rectangle using SELECT, the windows and icons within will be selected, and all other objects will be deselected. If you used ADJUST, the objects within will have their selected state toggled, and any other windows and icons already selected will remain selected.
XView supports menus of the form shown in Figure 24.3. This is a sample menu containing options for you to choose. These menus are called pop-up menus.
Pop-up menus are operated using the MENU mouse button. There are two methods of operating with an OPEN LOOK menu: the click-move-click method and the press-drag-release method. You choose either method by clicking the MENU button (pressing and releasing it quickly) or by pressing it down and holding it.
If you click the MENU button, a menu pops up and will stay up indefinitely. To continue operating the menu, click the MENU button over a menu item. To dismiss the menu, click the MENU button on an area of the screen outside the menu. To operate menus in press-drag-release mode, press the MENU button and hold it down while you move the mouse. The menu remains on the screen as long as you hold down the MENU button. To execute an action, move the pointer over a menu item and release the mouse button. To dismiss the menu, move the pointer outside the menu and release the MENU button. Some menu items have a submenu. This is indicated by a right-pointing triangle at the right edge of the item. To activate a submenu, click on the item (in click-move-click mode) or move the pointer to the item and then move toward the right edge of the menu (in press-drag-release mode).
Some menus have pushpins. If a menu has a pushpin, it will initially be in the "out" state. If you click on the pin (in click-move-click mode) or move over it and release (in press-drag- release mode), you will pin the menu to the workspace. The menu will remain on the screen indefinitely, and you can execute commands from it by clicking on its items. To remove the menu, move over the pin and click SELECT on it.
Pressing MENU over the workspace brings up the Workspace menu. This menu is customizable, but it typically contains at least the following items. The arrows to the right of any item indicate a submenu for the displayed item. (See Figure 24.3.)
FIGURE
24.3. The pinnable Workspace menu.
Each option on the Workspace menu is discussed in the following list:
FIGURE 24.4. The shell selections from the main menu.
FIGURE 24.5. The Textedit utility.
The Cut utility can be used to cut and paste sections between files. You can access any of the menu items by using the SELECT button on any of the menu items.
Look in $OPENWINHOME/lib (normally /usr/openwin/lib) for the file openwin-menu and other files of the form openwin-menu-*. Copy these files into your home directory with a period in front of them. For example, copy openwin-menu as .openwin-menu.
The .openwin-menu file is used to set up your workspace menu. Look at Listing 24.2 for this file.
# # @(#)openwin-menu 23.15 91/09/14 openwin-menu # # OpenWindows default root menu file - top level menu # "Workspace" TITLE "Shells " MENU $OPENWINHOME/lib/openwin-menu-s "Editors " MENU $OPENWINHOME/lib/openwin-menu-e "Tools " MENU $OPENWINHOME/lib/openwin-menu-t "Games " MENU $OPENWINHOME/lib/openwin-menu-g "Utilities " MENU $OPENWINHOME/lib/openwin-menu-u #"Slingshot Examples " MENU $OPENWINHOME/lib/openwin-ss-ex # #"UIT Examples " MENU $OPENWINHOME/lib/openwin-uit "Properties " PROPERTIES SEPARATOR "X11 Programs " DIRMENU /usr/X386/bin "XView Programs " DIRMENU $OPENWINHOME/bin "XV 3.00" exec /usr/X386/bin/xv "Window Menu " WINMENU SEPARATOR "Screensaver " MENU $OPENWINHOME/lib/openwin-menu-screensave "Lock Screen " MENU $OPENWINHOME/lib/openwin-menu-xlock "Exit" EXIT
Let's look at some of the entries in this .openwin-menu file.
You can now use different files for customizing your menus differently by adding or deleting items to this file.
The menu specification language has a number of keywords, all of which are in all-uppercase letters.
The syntax for this file is straightforward. Each line typically specifies one menu button. There are three fields per each uncommented line. The first field defines a label, an optional keyword, and an action to take if the item is selected.
The label is either a single word or a string enclosed in double quotes. This string appears in the menu button. If the optional keyword DEFAULT appears next, this menu item becomes the default item for this menu. The rest of the line (excluding leading whitespace) is considered to be a command. It is executed by sending it to bash. Any shell metacharacters are passed through to the shell unchanged.
The command field can be extended onto the next line by placing a backslash (\) at the end of the line. The newline will not be embedded in the command.
A submenu is specified using the special keyword MENU in place of a command. A button is added to the current menu, and clicking or pulling right on this button brings up the submenu. Subsequent lines in the menu file define buttons for the submenu, until a line that has the special keyword END in the command field is encountered. The label of the MENU line must match the label on the END line; otherwise an error is signaled.
Submenus can be nested arbitrarily, bracketed by MENU and END lines with matching labels.
Submenus can be defined in a different file using either the MENU or the INCLUDE keyword. To include a submenu from another file, use a line with a label, either the MENU or the INCLUDE keyword, and then the filename. The file so named is assumed to contain lines that specify menu buttons. The submenu file need not have any MENU or END lines (unless it has submenus itself). The current file need not have a matching END line if the submenu is read from another file. Submenu files included with the MENU keyword are considered to be an integral part of the menu tree, and any error encountered during the reading of the file will cause the entire menu to be considered invalid. A submenu file included with the INCLUDE keyword is considered optional, and any error encountered during reading of the file is not considered fatal. If an error occurs during INCLUDE processing, a disabled (grayed-out) item is inserted in place of the submenu and processing of the current menu file continues.
To make a submenu pinnable, add the special keyword PIN after the END keyword on the line that ends the submenu definition, or after the TITLE directive (I'll discuss that in a minute).
By default, the label in a menu button is used as the title of the submenu.
You can override this default by specifying a line that has the special keyword TITLE in the command field. The label from this line is used as the submenu's title. This line can appear anywhere in the submenu definition.
This action does not add an item to the menu. In addition, if the PIN keyword follows the TITLE keyword on this line, the submenu is made pinnable.
This construct is useful for declaring a submenu defined in a separate file as pinnable.
A line containing only the keyword SEPARATOR adds extra space before the next item.
Table 24.1 lists keywords that can be used in the command field of a menu item. They specify functions that are internal to olwm and that are not invoked by running a shell.
Table 24.1. Special keywords in olwm.
Keyword | Description |
BACK_SELN | Moves the selected windows and icons behind other windows. |
EXIT | Kills all applications and exits the window manager after getting confirmation from the user. (This is useful for exiting the entire window system.) |
EXIT_NO_CONFIRM | Like EXIT but skips the confirmation notice. |
FLIPDRAG | Toggles the state of the DragWindow resource. |
FLIPFOCUS | Toggles the state of the SetInput resource. |
FULL_RESTORE_SIZE_SELN | Toggles the full-sized/normal-sized states of the selected windows and icons. |
NOP | No operation. Don't do anything. |
OPEN_CLOSE_SELN | Toggles the opened/closed states of the selected windows and icons. |
QUIT_SELN | Quits the selected windows and icons. |
PROPERTIES | Brings up Workspace Properties. |
REFRESH | Causes all windows on the screen to be repainted. |
REREAD_MENU_FILE | Forces an immediate rereading of the workspace menu customization file. olwm starts a complete search for a menu file and uses the first valid file it finds. |
RESTART | Restarts the window manager. |
SAVE_WORKSPACE | Takes a snapshot of the set of currently running applications, and put the command lines so obtained into a file $HOME/.openwin init (in the user's home directory). |
Runs the command specified by the SaveWorkspaceCmd resource. | |
START_DSDM | Starts providing the DSDM service. |
STOP_DSDM | Stops providing the DSDM service. |
WMEXIT | Exits the window manager without killing any applications. |
olvwm is a window manager with a virtual desktop. You use the olvwm command to invoke this window manager. Change olwm to olvwm in your .xinitrc file.
olvwm is a virtual window manager for the X Window system that implements parts of the OPEN LOOK graphical user interface. olvwm differs from olwm in that olvwm manages a virtual desktop that is larger than the actual screen.
When it is started, olvwm displays a Virtual Desktop Manager (VDM) window. The VDM is the window that provides a scaled-down version of the entire desktop.
If the desktop is running in default mode, it displays a grid, each square of which maps to the size of the monitor. Each square is termed a logical screen.
The current view is that part of the desktop that is currently displayed on the screen. A virtual window is a small rectangle displayed in the VDM. Every window on the desktop has a corresponding virtual window in the VDM.
The VDM always appears on the screen. (See Figure 24.7.)
FIGURE 24.7. The Virtual Desktop Manager.
By default, the VDM (and hence the desktop) is divided into a grid. Each square of the grid represents a screen size. The dividing lines between each logical screen are represented by dashed lines in the VDM. This division into logical screens is purely informational. If you like, windows can straddle these boundaries, the current view into the desktop can straddle them also, and windows can be moved at will between them. However, by default, most actions in the VDM keep the current view along these boundary lines.
You can use the resize corners on the VDM to resize the virtual desktop. If you make the virtual desktop smaller, windows that might be off the new virtual desktop are not moved (though they are not lost, either, because you can get them back by resizing the desktop again). Space added or subtracted is always done so from the right and bottom of the desktop (regardless of which resize corner you used).
Events that occur in a particular virtual window behave just as if they were delivered to the corresponding application's frame. Thus, pressing the MENU button over a virtual window brings up the Frame menu and enables the real (and virtual) windows to be opened, closed, resized, and so on.
Pressing the SELECT button selects that real (and virtual) window. Pressing the ADJUST button adds (or subtracts) that window from the selection list.
SELECTing and dragging one or more virtual windows moves the real and virtual windows (just as in olwm). Note that if you drag the mouse outside of the VDM, the window can be moved onto to the screen. Conversely, when dragging a window on the screen, if the mouse moves into the VDM the window's icon moves to another location within the VDM. However, if part of the VDM is obscured, you cannot move a window into that part of the VDM.
It is possible to drop something onto a virtual window as if it were dropped onto the corresponding application. This enables you to drag a file from one window on the screen to another application on another part of the desktop.
Double-clicking the SELECT button on an area in the VDM background moves the current view to the logical screen containing the point where the mouse was double-clicked.
The MENU button brings up a (pinnable) menu that enables movement based on full screen sizes in the direction indicated. (See Figure 24.8.)
FIGURE 24.8. A pinnable menu.
You'll notice that the Virtual Desktop Manager never moves on your screen if you change views into the desktop. That's because the VDM is permanently sticky.
Windows that are sticky never move position on the screen when you change your view into the desktop. To set a particular window as sticky, simply select Stick in its Frame menu. You may similarly unstick the window via its menu.
Menus for base windows include the Stick and Unstick commands.
Windows that are sticky always appear in the same place on the screen no matter which part of the virtual desktop you're viewing. Windows that are not sticky (by default, all windows except the VDM) move when you change the current view on the virtual desktop.
Like olwm, olvwm uses key bindings for certain actions. All actions are specified in olwm as well as an additional set of actions to control the view into the desktop. You can use the function keys F1 through F9 with the Alt key to switch virtual screens.
You can customize OpenWindows using resources. Resources affect the behavior of applications in olwm. Global resources in olwm consist of two resource components:
Thus, to set the AutoColorFocus attribute, one would use olwm.AutoColorFocus as the resource specification in .Xdefaults. olvwm will read a resource file ($HOME/.olvwmrc) for your resources.
olwm automatically picks up changes to many of these resources if the resource database changes at runtime. You can modify olwm's behavior by changing the resource database with xrdb or with Workspace Properties.
If a resource value is specified on olwm's command line, it overrides the value in the resource database. Therefore, changing the resource's value in the database has no effect on this resource setting.
Some customizations include the following:
Hot Keys | You can specify that when a certain key (or, more likely, a key in combination with modifiers) is pressed, certain actions are performed. You can warp to a particular application, and open, raise, close, execute, and quit applications. |
Screen Bindings | You can specify that certain applications will always start on a particular logical screen. |
Menu Options | You can alter the behavior of WINMENU selections on a particular window. |
In general, the editing/moving commands go in the opposite direction when shifted--that is, Ctrl-W deletes a word, and Ctrl-Shift-W deletes the word to the right of the insertion point.
Alt-i - include file Alt-f - find selection (forward/backward) Ctrl-a - start of line Ctrl-< - back word Ctrl-e - end of line Ctrl-> - forward word Ctrl-w - delete word Ctrl-u - delete to start/END of line Ctrl-Return - move to end/START of document
See the olwm and olvwm man pages for a list of some of the default keys.
You can and paste between XTerm and other OpenWindows programs. I will use textedit as a sample program.
To go from XTerm to textedit (for this example):
To go the other way, from textedit to XTerm:
(If you have a two-button mouse, press both left and right buttons together.)
For Quick Copy within textedit, mailtool, and similar programs:
To drag-and-drop to move a selection, follow these steps:
You can configure OPEN LOOK for a left-handed mouse and keyboard. Use xmodmap to change the mouse buttons. Type man 7 XView for a list of key bindings you can change, at least for XView programs.
With OpenWindows 2.0, you can use defaultsedit to set the mouse mappings and then let SunView handle them. The status returned by svenv should tell you whether your server is running under SunView; put this in your .xinitrc:
if eval `svenv -env` then xmodmap -e "pointer = 1 2 3" input_from_defaults else xmodmap -e "pointer = 3 2 1" fi
Here are some solutions to problems you might have:
MANPATH=$OPENWINHOME/share/man:/usr/man; export MANPATH
or
setenv MANPATH $OPENWINHOME/share/man:/usr/man
for csh users. $OPENWINHOME should be /usr/openwin on most systems. Set your path so that $OPENWINHOME/bin (and $OPENWIN/bin/XView for OpenWindows 2) come before /bin (or /usr/bin, they're the same), or you'll get the SunView versions of mailtool, cmdtool, shelltool, and so on.
In this case, include the following lines in your .Xdefaults file, as these enable non-ICCCM-compliant programs to receive input even if they forget to ask for it.
OpenWindows.FocusLenience: true
*Input: TRUE
XTerm*VT100.Translations: #override \ <Key>L6:select-set(CLIPBOARD)\n\ <Key>L8:insert-selection(CLIPBOARD)
If this text is already in the app-defaults file, so if it isn't working, check that XFILESEARCHPATH is set to this:
/usr/openwin/lib/%T/%N%S
If it isn't, either set it or copy/merge these lines from $OPENWINHOME/lib/app-
defaults/XTerm into /usr/lib/X11/app-defaults/XTerm.
This version automatically puts each xterm selection onto the Clipboard:
XTerm*VT100.translations: #override\n\ ~Ctrl ~Meta<Btn2Up>: insert-selection(PRIMARY,CUT_BUFFER0)\n\ ~Ctrl ~Meta<BtnUp>: select-end(PRIMARY,CUT_BUFFER0,CLIPBOARD)\n\ <KeyPress>L8: insert-selection(CLIPBOARD)
Xlib: connection to ":0.0" refused by server Xlib: Internal error during connection authorization check Error: Can't Open display
try the command xhost-machine, where machine is the computer
on which you ran the command that failed.
If you want to let other users run programs on the same machine as you, using your
display, you have to type the command xhost +'hostname', which lets any
user on 'hostname' access your display.
Also note that Ctrl-L2 locks the colors of the current window, and Ctrl-L4 unlocks them--this is described in the olwm man page.
See the X*.faq in the /usr/docs/faq directory for detailed information on problems specific to different platforms. The FAQ file can be give you a lot of information about Linux and what problems to expect.
XView for Linux uses the following environment variables:
/usr/lib:/usr/5lib:/usr/openwin/lib:/usr/CC/`arch`
Include this line in it:
$(OPENWINHOME)/bin:$(OPENWINHOME)/bin/xview
If you work with Sun Microsystems Sun Workstations, then the olwm and olvwm managers should make life easier for you. If you want to make life even easier, you can map the function keys to reflect that of Sun Workstations. To do this, you have to modify the .Xmodmap file in your home directory. If you do not have a .Xmodmap file, you can create one with a text editor.
The best place to look is in the man pages for xmodmap. The man pages are full of examples, some of which I will describe briefly here. For issues specific to your setting, read the man pages.
A typical .Xmodmap file will look like this:
keysym F1 = xman keysym F2 = F19 keysym F3 = F20 keysym F4 = F16 keysym F5 = F18
The Undo button is ominously absent from the .Xmodmap entries. To get this entry, add the following line. (The text after the ! is a comment and ignored by X.)
keysym F6 = F14 ! The undo button.
For example, if you hate the location of the Shift and Control keys on your PC, you can swap the location. Simply put these lines in your .Xmodmap file:
remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = Control_L add Lock = Caps_Lock add Control = Control_L
You can also assign the meta key to a function key using this line:
keysym F9 = Meta_L
Finally, when you have made your changes, you have to tell the server to use them. It's too cumbersome to shut down the window manager and restart it. Instead, you can use the rdb command:
$ xrdb .Xdefaults
You can also invoke specific settings from the command line using xmodmap. For example, type the following line:
$ xmodmap -e "keysym F9=Meta_L"
Modifying the .Xmodmap file is better in that the changes are preserved for future sessions.
XView 3.0 is available at http://www.yggdrasil.com/ and http://tsx-11.mit.edu/pub/linux if you want to upgrade the CD-ROM version.
OpenWindows can be obtained from Sun, or you can get the source from Interactive Systems, Inc. It is also included in some vendors' System V Release 4 implementations, although that's not always the latest version.
Sun includes OpenWindows with SunOS, and it is also included as the windowing system for Solaris.
There are said (by Sun) to be more than 35 ports of OpenWindows either available now or in progress. Unfortunately, none of them seems to be available from anywhere.
Douglas N. Arnold (dna@math.psu.edu) keeps an up-to-date FAQ on ftp.math.psu.edu (currently 146.186.131.129) in the file /pub/FAQ/open-look.
MoOLIT can be bought from AT&T in source form.
Nabajyoti Barkakati gives an excellent introduction to X and to OLIT programming, as well as setting up and using X and OpenWindows, in UNIX" Desktop Guide to OPEN LOOK,
Sams Publishing, 1992, ISBN 0-672-30023-0
The OPEN LOOK Graphical Interface is documented in two books: Sun Microsystems, Inc., OPEN LOOK Graphical User Interface Application Style Guidelines, Addison Wesley, 1989.
Sun Microsystems, Inc., OPEN LOOK Graphical User Interface Functional Specification, Addison Wesley, 1989.
David Miller describes programming with OLIT in his book, An OPEN LOOK at UNIX (M&T Press).
You could also try The X Window System: Programming and Applications with Xt, OPEN LOOK Edition, by Doug Young and John Pew (Prentice Hall, 1992, ISBN 0-13-982992-X).
Sun Microsystems supplies a large amount of documentation with OpenWindows, although you may have to order it separately. The following list shows what I have; they are each 8.5x11 and vary from about 1 to 2 inches thick. They say "User's Guide" or "Programmer's Guide" on the front cover. The user manuals have a red stripe on the bottom, and the programmer versions have a green stripe:
800-6006-10 | OpenWindows Version 3 Release Manual |
800-6029-10 | OpenWindows Version 3 Installation and Start-Up Guide |
800-6231-10 | OpenWindows Version 3 DeskSet Reference Guide |
800-6618-10 | OpenWindows Version 3 User's Guide |
800-6323-10 | Desktop Integration Guid |
800-6027-10 | Programmer's Guide |
800-6005-10 | OpenWindows Version 3 Reference Manual (the man pages) |
800-6319-10 | The NeWS Toolkit 3.0 Reference Manual |
800-6736-10 | NeWS 3.0 Programming Guide |
800-6055-10 | OLIT 3.0 Widget Set Reference Manual |
800-6198-10 | XView 3.0 Reference Manual: Converting SunView Applications |
800-6854-10 | F3 Font Format Specification (order separately) |
Here is what you should remember from this chapter on OPEN LOOK: