![]() |
![]() |
![]() |
![]() |
Window Managers
This chapter describes the local window managers available on the network computer. These window managers are: Motif Window Manager (MWM) and XP Window Manager (XPWM).
Setting Up Local MWM
Starting local Motif Window Manager (MWM) from your host allows MWM to access the configuration and resource files in a standard location, for example, the %HOMEDRIVE%%HOMEPATH% directory. It also allows you to customize the window manager menus and to define menu selections that include host commands. For detailed information about MWM configuration, refer to the MWM man page located in the C:\NCBridge\tekxp\man\nt directory by default.
Starting Local MWM
Enter the following command in the user's session start up file.
- xpsh -display displayname:0.0 mwm
This assumes that xpsh is in your search path. The default search path is /tekxp/bin/<host>. You need not specify -display displayname:0.0 if you have set the DISPLAY environment variable.
Starting MWM with the xp.cnf File
The start and preload commands in the xp.cnf file can be used to start MWM. For details about these commands, refer to Chapter 2, Remote Configuration in the NCBridge Reference Manual.
Starting MWM with the Client Launcher
You can customize the Client Launcher to include those clients that you use most often. If authorized, MWM is listed on the Client Launcher by default as part of the Window Managers submenu. To start MWM, move the mouse pointer to MWM and click the mouse button. For information about the Client Launcher, refer to the Client Launcher section in Chapter 4, Local Clients.
Accessing MWM Configuration Files
When starting local MWM using xpsh, using the -access xpsh command-line option enables local MWM to access full resource and file access as if it were started from a host. For example, the following line starts local MWM and accesses system-level and user-level customization files on the host:
- xpsh -access xpsh mwm
Accessing the MWM Resource Description File
MWM searches for a resource description file in this order:
If MWM does not find a resource description file in one of the above locations, it defaults to a language-specific defaults file under the boot directory, typically, C:\NCBridge\tekxp\boot\<language>\system.mwmrc. The <language> variable is determined by the language command in the remote configuration file, or in Setup. To see the current language setting, enter Setup and look at the Language option. A sample system.mwmrc file is located in \tekxp\examples\mwm.
Creating a Local MWM Resource Description File
You can copy the system.mwmrc file to your home directory and then modify the file to customize your Motif environment. Table 5-1 shows the functions you can add to the file.
Accessing the MWM Defaults File
MWM is configured from its resource database. This database is built from the following sources, listed in the order that MWM accesses them.
- MWM command-line options.
- File specified by the XENVIRONMENT environment variable, if it is set, otherwise:
%HOMEDRIVE%%HOMEPATH%/.Xdefaults-terminal_name, if it exists.- RESOURCE_MANAGER root window property, if it is set, otherwise:
%HOMEDRIVE%%HOMEPATH%/.Xdefaults, if it exists.
- The RESOURCE_MANAGER is typically set with the xrdb command. These values do not override the existing values in the database. An example .Xdefaults file is shown in Example 5-1.
- The user's application specific app-defaults file:
- The application's specific app-defaults file:
- /usr/lib/X11/app-defaults/Mwm, if it exists, otherwise:
/usr/lib/X11/app-defaults/Mwm- The actual location of this file depends on the XFILESEARCHPATH environmental variable. These values do not override the existing values in the database.
- If none of the above application specific app-defaults files are found, MWM defaults to a language-specific defaults file from the boot configuration directory, typically, /tekxp/boot. The language is specified by the Language command in the remote configuration file (xp.cnf), or in Setup. To see the current language setting, enter Setup and look at the Language option.
- Example 5-1 Example .Xdefaults File
- ! For the monochrome (or 4 bit plane=16 color/grey) device,
! decorations are shaded with pixmaps.The window title is
! reverse video to improve visibility.
#if PLANES > 4
Mwm*menu*background #d4d8e8
Mwm*menu*foreground: Black
Mwm*background: #7c8498
Mwm*foreground: #fce089
Mwm*activeForeground: #ffff00
Mwm*activeBackground: #9db5cd
#else
Mwm*bitmapDirectory: /usr/include/X11/bitmaps
Mwm*bottomShadowColor: Black
Mwm*topShadowColor: White
Mwm*activeBottomShadowColor: Black
Mwm*activeTopShadowColor: White
Mwm*background: Black
Mwm*client*backgroundPixmap: flipped_gray
Mwm*activeBackground: White
Mwm*activeBackgroundPixmap: gray
Mwm*foreground: White
Mwm*client*foregroundPixmap: flipped_gray
Mwm*activeForeground: Black
Mwm*activeForegroundPixmap: gray
Mwm*iconImageBackground: Black
Mwm*iconImageForeground: White
Mwm*iconImageBottomShadowPixmap: flipped_gray
Mwm*iconImageTopShadowPixmap: flipped_gray
#endif
Mwm*buttonBindings: DefaultButtonBindings
Mwm*clientDecoration: all
Mwm*clientAutoPlace: True
Mwm*frameBorderWidth: 5
Mwm*iconAutoPlace: True
Mwm*iconClick: False
Mwm*iconBoxGeometry: 6x1+0-0
Mwm*iconDecoration: image label
Mwm*iconFrameBorderWidth: 20
Mwm*iconPlacement: bottom left
Mwm*iconPlacementMargin: 10
Mwm*interactivePlacement: False
Mwm*keyBindings: DefaultKeyBindings
Mwm*passSelectButton: True
Mwm*resizeBorderWidth: 8
Mwm*showFeedback: all
Mwm*systemButtonClick: False
Mwm*systemMenu: DefaultRootMenu
Mwm*useIconBox: True
Mwm*windowMenu: DefaultWindowMenu
Mwm*cleanText: True
Mwm*saveUnder: TrueAccessing Bitmap Files
The MWM iconImage and bitmapDirectory resources are used to specify paths to bitmap files. The default value for bitmapDirectory is the /usr/include/X11/bitmaps directory. To access a bitmap file star in your %HOMEDRIVE%%HOMEPATH% directory, the iconImage resource can be set in your %HOMEDRIVE%%HOMEPATH%/.Xdefaults file as follows:
- Mwm*program_name*iconImage: ~/star
Specifying Virtual Key Bindings
MWM reads the %HOMEDRIVE%%HOMEPATH%/.motifbind file, if it exists, to install a virtual key bindings property on the root window. Example motif bindings files are installed in the /tekxp/examples/mwm directory by default.
Setting Up Virtual Desktop Panning
The Virtual Desktop Panning feature is available with MWM 2.0. This section provides an example of how you can modify your .Xdefaults and .mwmrc files to activate virtual panning in MWM. The MWM functions f.pan, f.goto, and f.track_pan need to be bound either to keys or to mouse buttons.
Editing the .mwmrc File for Virtual Desktop Panning
Add the following to your .mwmrc file to use virtual panning. Make sure that the name of the button bindings match the name given for the resource value Mwm*buttonBindings in your .Xdefaults file.
- Buttons MyButtonBindings
{
<Btn2Down> root f.menu GotoMenu
Meta<Btn1Down> root f.track_pan
}- Keys MyKeyBindings
{- Meta<Key>Up window|root f.pan 0,-100
Meta<Key>Down window|root f.pan 0,100
Meta<Key>Left window|root f.pan -100,0
Meta<Key>Right window|root f.pan 100,0
}To set up a menu that lets you quickly switch to different locations on the virtual desktop, enter the following. Then restart MWM.
- Menu GotoMenu
{
Up-Left f.goto 1500,1100
Up f.goto 0,1100
Up-Right f.goto -1500,1100
Left f.goto 1500,0
Home f.goto 0,0
Right f.goto -1500,0
Down-Left f.goto 1500,-1100
Down f.goto 0,-1100
Down-Right f.goto -1500,-1100
}Editing the .Xdefaults File for Virtual Desktop Panning
Add the following to your .Xdefaults file to keep MWM from moving all your windows back to the visible part of the screen at startup:
- Mwm*positionOnScreen: False
Note that it is important to set the positionOnScreen resource to False because MWM automatically repositions all off-screen windows back to the display screen on restart.
To set up a menu to go to preset positions on the virtual canvas, add the following lines:
- Mwm*GotoMenu*numColumns: 3
Mwm*GotoMenu*packing: PACK_COLUMN
Mwm*GotoMenu*orientation: HORIZONTAL
Mwm*GotoMenu*alignment: ALIGNMENT_CENTERFor consistency with the .mwmrc file, add the following lines:
- Mwm*buttonBindings: MyButtonBindings
Mwm*keyBindings: MyKeyBindingsTo prevent the client and icon windows from moving, add the following lines:
- Mwm*XBiff*iconPinned: True
Mwm*XBiff*clientPinned: True
Mwm*iconPinned: TrueTroubleshooting MWM
This section contains some information on possible solutions to correct some common MWM problems:
- If MWM does not come up at all:
- You did not specify the NC name correctly in the -display command line option. Recheck the value, for example:
- Your local MWM authorization key may not be entered. To check your enabled options, press Setup. Drag on Statistics and release on Options. If mwm is not there, enter the correct authorization key at the Boot Monitor. Refer to Chapter 4, Boot Monitor of the NCBridge Reference Manual.
- If you start MWM with xpsh and it fails to execute clients from the MWM menus, make sure that the path to the client is correct.
- Check the console window for a message indicating that there is not enough memory to run MWM. Increase the amount of available memory if necessary.
- If you customize a file which is read by local MWM but the changes are not reflected when you run MWM:
- If your keyboard has neither a Meta key nor an Alt key, use the xmodmap command to display and modify the values of mapped keys, including the key mapped to mod1, which MWM uses for Meta or Alt.
Setting Up XP Window Manager
XP Window Manager (XPWM) is a local window manager available with the network computer. XPWM provides a basic window manager that uses a minimum amount of network computer memory.
Accessing the XPWM Defaults File
XPWM is configured from its resource database. This database is built from the following sources, listed in the order that XPWM accesses them (the last setting takes precedence over the first).
Starting the XP Window Manager
XPWM can be started with xpsh, from the remote configuration file (xp.cnf), or from the Client Launcher.
Starting XPWM with xpsh
Enter the following command in the user's session start-up file.
- xpsh -display displayname:0.0 xpwm
This assumes that xpsh is in your search path. The default search path is /tekxp/bin/<host>.
Note: You need not specify -display displayname:0.0 if you have set the DISPLAY environment variable. Starting XPWM with the xp.cnf File
The start and preload commands in the xp.cnf file can be used to start XPWM. For details about these commands, refer to Chapter 2, Remote Configuration, in the NCBridge Reference Manual.
Starting XPWM with the Client Launcher
The Client Launcher can be customized to include those clients that you use most often. The XPWM is listed on the Client Launcher by default as part of the Window Managers submenu. To start XPWM, move the mouse pointer to XPWM and click the mouse button. For information about the Client Launcher, refer to the Client Launcher topic in Chapter 4, Local Clients.
Using XPWM
You use XPWM much like any other window manager. The windows have many of the same elements as the Motif Window Manager. Figure 5-1 shows a sample XPWM window and its elements.
You can move and resize windows using either the mouse alone, or the commands located on the XPWM menu. Table 5-2 shows the mouse interface.
To access the XPWM menu, position the mouse pointer outside of a window, and click. First select a command, and then move the mouse pointer to the window you want the command to affect. Table 5-3 shows the commands available on the XPWM menu.
Customizing XPWM
You can change the appearance of XPWM using the resource settings listed in Table 5-4. XPWM does not allow user-defined bindings or user-defined menus.
![]() |
![]() |
![]() |
![]() |