HDS ViewStation System Administrator's Guide

A Hypertext Document


Customizing OLWM Menus

This page describes techniques for customizing OLWM menus to include HDSperx clients and other processes.

OLVWM Menu
Pressing the right mouse button brings up the OLWM Menu. It allows you to refresh the screen, to restart the window manager, to reread the Menu file, to exit the window manager, or to exit your entire session.

Normal operation of pull-down menus is that they disappear as soon as you release the mouse button that brought them up. You'll notice a little push pin in the top left corner of each menu along with a small hole next to it. If you move the push pin over to the hole, using the mouse pointer, it will pop into the hole and pin the menu onto the screen permanently (or at least until you pull it out of the hole). Having the menu constantly visible is convenient if you use its operations frequently.

Using HDSperx with OLVWM
The HDSperx menu is added to your root menu automatically. This allows you to start HDSperx clients easily.

Starting Local Processes from the Local OLVWM
When you use the ViewStation's local OLVWM window manager, a submenu for the ViewStation's HDSperx clients is automatically added to your root menu. This submenu lists all the HDSperx clients you have loaded and you can start them simply by clicking on them.

The details of making changes to this menu and setting it up manually are given later on this page.

Starting Remote Processes with Local OLVWM
The ViewStation runs OLVWM locally on the server. The OPEN LOOK Virtual Window manager may be started from a remote host using the rsh (BSD Unix) or rcmd (System V Unix) command as described on another page Starting Window Managers with RSH.

Starting processes on other hosts is done in the same way as with a remote window manager, using the appropriate configuration file. The sample OPEN LOOK configuration files for the window manager menus below show the process. This file resides in the user's home directory.

Note that the OPEN LOOK environment variables and paths must be in the user's .cshrc or .profile file, since it is that shell file (not your .login file) that is read when a remote shell process is started. Having these variables in another location, such as the .login file or in a separate shell script, generally means that the remote shell process fails.

Customizing OLVWM
You can use a number of OLWM resources to customize the appearance and operation of OLWM. A complete list of the OLWM resources can be found in the OLWM man pages.

Note that these resources must be loaded into the ViewStation (usually with the Xrdb Utility) before the local OLVWM is started. These examples show some simple OLVWM resource settings:

# Mouse focus policy - either followmouse or select
OpenWindows.SetInput: followmouse
# Select the window colors
OpenWindows.WindowColor: Pale Turquoise
OpenWindows.WorkspaceColor: White
# Virtual Desktop size
OpenWindows.VirtualDesktop: 1x1


In this example, the SetInput resource sets the mouse focus policy. The "select" value (note the lowercase) means that you click in a window to give it focus; the "followmouse" value means that focus follows the mouse position.

If you change the resource file, you must reload the resources (check your currently set resources with the appres program), then exit and restart OLVWM for the settings to take effect.

OPEN LOOK Window Manager Menu
The menu for the OPEN LOOK Window Manager is a file called "openwin- menu", which is found in the ./openwin/lib directory. There are a number of sample and submenu files there. Look at them to see their structure and syntax.

The openwin-menu file contains:
#
# @(#)openwin-menu 23.15 91/09/14 openwin-menu
#
# OpenWindows default root menu file - top level menu
#
"Workspace" TITLE
"Programs" MENU $OPENWINHOME/lib/openwin-menu-programs
"Utilities" MENU $OPENWINHOME/lib/openwin-menu-utilities
"Properties..." PROPERTIES
SEPARATOR
"Help..." exec $OPENWINHOME/bin/helpopen handbooks/top.to c.handbook
"Desktop Intro..." exec $OPENWINHOME/bin/helpopen handbooks/ desktop.intro.handbook
SEPARATOR
"Exit..." EXIT


The menu file consists of a label (which appears on the menu) and the command that it executes. Note the use of submenus (there are other submenus, such as the "demo" entries, in the ./openwin/lib directory that are not used). Note also the use of "SEPARATOR" entries to provide visual organization for the menu.

Modifying the Menu
If you want to modify this menu, just open the file with a text editor and make the desired changes. You may want to delete the "Desktop Intro..." entry, or add or delete some utility programs to the "Utilities" menu (this menu is in its own file, openwin-menu-utilities, in the same directory). Just make these entries and save the modified file. It is good practice to save a copy of the original file under another name.

Starting Clients with OLWM
The OPEN LOOK Virtual Window Manager provides a facility allowing the user to start processes from window manager menus as defined in an .openwin-menu configuration file. The sample file shown in the next section gives some simple examples. Details are available from the OLWM manual pages, including specifications for labeling and syntax; refer also to the .olvwmrc configuration file.

There are three things to note about the openwin-menu file:
1) You must start the ViewStation local window manager from a remote host in order to use these resource specification files for the local window manager. This remote host and the user will be the host and the user for starting remote processes, so the appropriate permissions and accounts must exist. If you start the ViewStation's local window manager from the Setup Mode menu, none of these commands will work because only the default resources are used. An error message "No remote host running" will appear in this case. The usage of these files is the same as when a host-based window manager is used.

Further, the permissions for the ViewStation must be the same as for the remote host that started the local window manager. This means that a process valid for the host will also be permitted for the ViewStation. This permission is set in the /etc/hosts.equiv file, where you must enter the ViewStation's name as an equivalent to the initiating host. If you are using an .rhosts file, the appropriate permissions must be entered there as well.

2) The local window manager reads (for purposes of its internal rcmd function) the environment files for the user specified, so the environment settings appropriate for the process must be present in the user's .cshrc file. For Bourne and Korn shells, the corresponding files are .profile, though you should double-check that these files are always read when the new shell is spawned. All commands to the remote host are prepended with the ViewStation's display setting so the output is returned to the ViewStation.

3) Different versions of OLWM (versions 1.0, 2.0, and 3.0 are generally available) use different syntax for this file. For example, the PIN and DEFAULT entries in the file may have to appear at the beginning of an entry or at the end, depending on your version. Further, the TITLE line may require the fields to be reversed, that is: "Workspace" - TITLE. Check your version and its manual pages for the correct usage. If the syntax in this file is not correct, the menus will not be read and the process will fail.

If you have problems starting remote processes, look in the Console window for error messages and consult the checklist for remote starting at the end of this chapter. You may see messages that report the rhosts command failed because of incorrect permissions, or a file was not found, or that a host is not reachable. Your host machine must be configured with permission for the ViewStation to start remote processes, refer to your /etc/hosts.equiv file or the .rhosts files on each machine for a ViewStation entry.

Using HDSperx Clients with OLWM

The HDSperx clients are set up to run from a root menu submenu automatically. Their operation from the menu is simple, since they start with just a mouse click on their entry. Control of the HDSperx submenu and its name is handled by two olvwm resources:

olvwm*autoClientMenu: True
olvwm*autoClientMenuName: HDSMENU


These are both olvwm resources and should be used with other olvwm resources in .Xdefaults or .olvwmrc. (Resources for the HDSperx clients themselves are HDS resources and should be used only in the HDS client configuration file.)

If you want to load the HDSperx submenu automatically, use "olvwm*autoClient Menu: True"; this is the default setting. If you want to move the menu from its top position, you should set the "autoClientMenu" to False and locate the tools menu where you want it. You can also use the "autoClientMenuName" to enter a new menu name, which might be "HDS Local Clients". By default, the ViewStation's local OLVWM has an internally defined menu called "HDSMENU" which can be explicitly referenced in your .openwin-menu file menu table.

# OPEN LOOK Virtual Window Manager Menu 
"Workspace" 			TITLE
"Winmenu..."			WINMENU
"Programs" 			MENU
     "XTerm..."			DEFAULT exec xterm
"Programs"			ENDPIN
"HDS Local Clients..."		HDSMENU

"Properties..."			PROPERTIES
"New Menu..."			REREAD_MENU_FILE
"Restart..."			RESTART
"Quit..."			WMEXIT
"Exit..."			EXIT

The OLVWM window manager can also start HDSperx clients explicitly, without using HDSMENU. For example, you can start a local HDSdclock with an .open win-menu file containing menu entries:

# OPEN LOOK Virtual Window Manager Menu 
"Workspace" 			TITLE
"Winmenu..."			WINMENU
"Programs" 			MENU
     "XTerm..."			DEFAULT exec xterm
"Programs"			ENDPIN

"Calculator"			exec xcalc
"Clock"				exec hdslocal hdsdclock
"HDS Local Clients..."		HDSMENU

"Properties..."			PROPERTIES
"New Menu..."			REREAD_MENU_FILE
"Restart..."			RESTART
"Quit..."			WMEXIT
"Exit..."			EXIT

and so on.

If you are making changes to the HDSperx clients' configuration, you can see the changes by using the "rehash" command in the Console shell window. This rehash command forces a reading of the configuration files, so olvwm responds to the new settings.

HDSperx Menu Contents
The HDSperx menu is a list of the ViewStation's local clients that you have selected in the ViewStation's clients.config file. You can add or delete clients from this menu by uncommenting or commenting their client menuName lines in the clients.config file.

Note that you must specify HDSperx processes with a "hdslocal" prefix to indicate that they should run on the ViewStation. In the example above, the xcalc will run on the host computer, but the hdsdclock will run on the ViewStation.

HDSperx Menu Handling
The menu itself is handled differently depending on your window manager star tup procedure.

ViewStation window manager with remote start - If you start the ViewStation's OPEN LOOK window manager using a remote shell command from the host computer, you get the OLWM menu specified in your .openwin-menu file with the addition of the HDSperx menu for the ViewStation's local clients. This merging of the menus is done automatically by the ViewStation.
This is the best option, since it includes all your menus. You can use the remote shell startup mechanism from an .xsession file or from your .profile, which are read as you login.

ViewStation window manager with local start - If you start the OPEN LOOK window manager by clicking on the ViewStation's OLWM icon (or the Auto-start button) on the Main Menu of Setup Mode, your OLWM root menu is the HDSperx menu (along with refresh, exit, and other commands). The customization options described here don't apply; you must use the rsh method of starting to get them.

Host-based window manager - If you use the host to run the Open Look window manager, you get the OLWM menus specified in the .openwin-menu file. You could manually add the HDSperx menu to this file, but you would have to make sure the f.exec command syntax was correct for the ViewStation's local clients.

Return to Section Heading Page


Return to the Home Page

If you need more information than is available here, you can reach HDS via email at info@hds.com, or call us at 1.800.HDS.1551 in the USA, or at +610.277.8300 from outside the US. For questions or problems regarding the HDS WWW page, contact webmaster@hds.com.
© 1996 by HDS Network Systems Inc.