You can use the window manager windowMenu resource to change the menu that appears when the user clicks on the window menu button. This allows you to display a menu of your choice from the window menu button without having to extensively remodel the default Window menu.
To associate a new menu with the window menu button, create the new menu, as described in ``Adding or modifying window manager menus'', and then perform the following steps.
You can change the default Window menu so that all users
on your system access the new menu, or you can change
the Window menu for an individual user.
The majority of window manager resource settings are defined in the /usr/lib/X11/app-defaults/Pmwm (for pmwm mode) or the /usr/lib/X11/app-defaults/Mwm (for mwm mode) resource file. The resources in this file are read by the resource manager when the window manager is executed. If you want to define the new windowMenu resource for all users on your system, you should edit this file. You must have root privileges to perform this step.
Individual users can also change the Window menu that is displayed. Individual resource settings are placed in a file called .Xdefaults-hostname, where hostname is the name of the host, or machine, where the window manager is running.
If you create this file for a user from the root account, you must assign the file the correct ownership permissions. Run the chown command to assign the correct owner and the chgrp command to assign the correct group to the .Xdefaults-hostname file. If you created this file yourself, these steps are unnecessary.
When the user invokes a client, it checks to see if an .Xdefaults-hostname file exists in $HOME. If such a file does exist, the resource values specified in the user resource file take precedence over any values assigned to the same resource for the system, or in the resource database.
Use the window manager windowMenu resource to specify the menu that you would like to use instead of the default Window menu. Note that it is unlikely that this resource is actually defined in any of the window manager resource files on your system. The default value of the windowMenu resource is the name of the built-in Window menu specification, ``DefaultWindowMenu''.
Use the following format to set this resource:
menu_name is the name you assigned your menu in the menu definition section of the window manager configuration file (/usr/lib/X11/system.pmwmrc and $HOME/.pmwmrc for pmwm mode or /usr/lib/X11/system.mwmrc and $HOME/.mwmrc for mwm mode).
For example, if you created a menu that you defined
as ``MyMenu,'' and you want to use this menu in place of
the default Window menu,
set the windowMenu resource so it reads:
Window menus can also be assigned on a client class basis.
This means that the menu you specify is used as the Window
menu for the designated client(s) only, and the default
Window menu is used for all other clients. To do this,
use the following format:
client can be specified using either the application's binary or class name. menu_name is the name you assigned the menu in the menu definition section of the window manager configuration file.
For example, suppose you want to configure a particular
menu of your own creation, defined as ``EditorMenu'' in the
window manager configuration file. To have it function as the
Window menu only in a scoedit graphical editor
window, specify the following:
There are two other resources that you can set to customize the Window menu. These resources can be set on their own, or in conjunction with assigning a custom menu to the window menu button.
After you have specified the new window manager resource values, you must restart the window manager so your changes can take effect. Restart the window manager by selecting the Restart Window Manager option from the Root menu. The Root menu is accessed by pressing and holding mouse button 1 on the Desktop background or, if the Desktop is not running, in the Root window.
Verify that your new menu is now being used as the