Table of Contents

Name

XWinrc- XWin Server Resource Configuration File.

Description

The X Server for the X Window System on the Cygwin/X environment running on Microsoft Windows, XWin can be optionally configured with the XWinrc file. A system-wide configuration file should be placed in /usr/X11R6/lib/X11/system.XWinrc, a per-user file should be put at $HOME/.XWinrc. The system.XWinrc file is read only if no $HOME/.XWinrc exist.

With the .XWinrc configuration file it is possible to do the following:

1- To include items into the menu associated with the XWin icon which is in the Windows system tray. This feature functions in all XWin modes that have such tray icon.

2- To include items into the menu which is associated with the Windows window that XWin -multiwindow produces for each top-level X-window. That can be done both for the generic case and for particular programs.

3- To change the icon that is associated to the Windows window that XWin -multiwindow produces for each top-level X-window. Again, that can be done both for the generic case and for particular programs. The new icons associated should be Windows kind incons .ico.

File Format

Keywords are case insensitive, but in this document they will be written completely capitalized.

Comments are legal pretty much anywhere you can have an end-of-line; they begin with "#" or "//" and go to the end-of-line.

Quote marks in strings are optional unless the string has included spaces.

There are three kinds of instructions, debug, menu and icon instructions.

Debug instruction

DEBUG String
The String is printed to the XWin.log file.

Menu instructions

MENU Menu_Name {

Menu_Item_Line
Menu_Item_Line
...
}
This instruction defines a menu and asigns a Menu_Name to it. Menu_Item_Line are lines of any of the following types:
t SEPARATOR
t Item_Label EXEC Command
t Item_Label MENU previously-defined-menu-name
t Item_Label ALWAYSONTOP
t Item_Label RELOAD

The Item_Label is the string that is written in the menu item.
Command is a string with the command that will be executed. Here paths should be CYGWIN style (e.g. /usr/local/bin/myprogram). A string "%display%" appearing in the Command will be replaced with the proper display variable (i.e. 127.0.0.1:<display>.0).
ALWAYSONTOP sets the window to which the menu is associated to display above all others.
RELOAD causes the XWinrc file to be reloaded and icons and menus regenerated.
ROOTMENU previously-defined-menu-name
Includes the items in the indicated menu into the menu associated with XWin that appears in the system tray.
DEFAULTSYSMENU previously-defined-menu-name ATSTART|ATEND
Includes the items in the indicated menu into the menu associated with generic top-level X-Windows in the XWin multiwindow mode. The keywords ATSTART and ATEND indicate if such items should be included at the start or at the end of the menu.
SYSMENU {
class-or-name-of-window defined-menu-name ATSTART|ATEND

...

}

Associates a specific menu to a specific WM_CLASS or WM_NAME.

Icon Instructions

ICONDIRECTORY Windows-path-to-icon-directory
Defines the directory where the .ico files are located. It should be a Windows style path (e.g. C:\cygwin\usr\local\icons).
DEFAULTICON icon-file-name.ico
Defines a replacement for the standard X icon for applications without specified icons.
ICONS {
class-or-name-of-window icon-file-name.ico

...

}

Defines icon replacements for specific windows.

See Also

XWin(1)

Author

The XWinrc feature of XWin was written primarily by Earle F. Philhower III.


Table of Contents