Understanding resources

Specifying values in resource specifications

The type of text string that you supply for a resource_value depends on the nature of the resource variable. Resources tend to fall into eight categories, each requiring a different type of value.

These basic categories are described below:

Color resources require a color value, as specified in the color database, /usr/lib/X11/rgb.txt. For example:
   XClock*foreground:  magenta
   XCalc*background:   aquamarine
Because the Graphical Environment provides scocolor, a color editor that allows you to create palettes of colors, it is recommended that you refrain from using actual color values with resources and instead assign palette resource variables. These variables are then assigned actual color values through scocolor. The following example shows how several color resources have been assigned appropriate palette resource variables instead of actual color values:
   ScoEdit*background:  scoBackground
   ScoMail*foreground:  scoForeground
For information on the color database, the scocolor client and its interaction with palette resource variables, and for details on how to specify color resources, see ``Changing colors''.

Font resources require the name of an available font. You can use either a full name, a wildcarded specification, or a font alias. For example:
   ScoTerm*Font: -adobe-courier-bold-r-normal--14-140-75-75-m-90-iso8859-1
   ScoTerm*Font: *courier-bold-r*140*
   ScoTerm*Font: courierB14						
For information on fonts and specifying font resources, see ``Changing fonts''.

Geometry resources require information to determine the size of the client's window and/or x and y grid coordinates to determine the location of the window. For example:
   XCalc*geometry:   180x240-0-0
   XClock*geometry:  -0+5
For information on specifying geometry resources, see ``Configuring window size and location''.

Cursor names:
Cursor resources require the name of the file in /usr/include/X11/bitmaps that contains the cursor you want to use. For example:
   ScoTerm*pointerShape: gumby
For information on specifying a different cursor pixmap for the scoterm client, see ``Changing cursor appearance''.

Pixmaps are patterns, like bitmaps, that are used to texture or color an area on your display. Pixmap resources are specified like cursors or bitmaps. For example:
   Pmwm*scocolor*backgroundPixmap:  scales
   *bottomShadowPixmap:             mensetmanus

Numeric quantities:
Some resources require a numeric value. For example:
   XClock*update:      30
   XLoad*update:       60
   XLogo*borderWidth:  10

Boolean values:
Some resources require a boolean value, such as ``true'' or ``false'', ``yes'' or ``no'', or ``on'' or ``off''. For example:
   ScoTerm*scrollBar:  false
   Pmwm*focusAutoRaise:  true

Some resources assign particular strings to keys, or assign actions to keys or mouse buttons. These resources are fairly complex and the meaning behind the values may be hard to understand from a simple example. See ``Configuring the keyboard for the server'' and ``Mapping mouse triggers for the Desktop'' for more information on specifying these types of resources.

Next topic: Precedence rules for resource specifications
Previous topic: Using delimiters in resource specifications

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003