xresedit(1) X11 R4.11MU05 xresedit(1)
NAME
xresedit - customize X applications resources
SYNOPSIS
xresedit [options]
DESCRIPTION
XResedit Make_VERSION (X RESource EDITor) is an interactive,
graphics-based program that allows users with minimal understanding
of the DG/UX X Windows system, Motif, or the DG/UX operating system
to customize resources for their X applications.
OVERVIEW OF X OPTIONS
Most standard X Toolkit options apply to XResedit. These include the
following: -display, -name, -geometry, -title, -iconic, -xrm, -fg and
-bg. See X(1) for more information about these options.
XRESEDIT COMMAND LINE OPTIONS
Start XResedit with the command:
xresedit [options]
Valid options are:
-sys Permit the user to edit resources that are reserved for
system managers. The -sys option requires the user to have
write privileges for the /usr/lib/X11/app-defaults resource
file.
-edit Lets the user edit the application's system resource file,
rather than his or her local copy of this file. The -edit
option requires the user to have write privileges for the
/usr/lib/X11/app-defaults resource file.
+dr Display a list of an application's resources using the
description (dsc) field defined in its config file (the
default action). For example, entering the command xresedit
-class Mterm +dr causes XResedit to display a list of
Mterm's resources in a format similar to the following:
Emulation mode: d216
Define window size and placement: 81x23+239+511
<and so on...>
-dr Display a list of an application's resources using the
resources (res) field defined in its config file. For
example, entering the command xresedit -class Mterm -dr
causes XResedit to display a list of Mterm's resources in a
format similar to the following:
.emulationMode: d216
.geometry: 81x23+239+511
<and so on...>
-ver Display version information.
-iconName Specify the name of the icon for XResedit.
-name Specify the instance of XResedit. This option also sets
XResedit's icon name and window title to the instance name.
-title Specify the title of the XResedit window.
-className
Specify the application whose class name resources you want
to create or modify. The class name for an application
usually is the program name spelled with an initial
uppercase letter (for example, Mterm).
-instanceName
Specify the instance of a class whose resources you want to
create or modify.
-display Specify the display XResedit should use.
-geometry [CxR+X+Y]
Specify the screen location and size of the XResedit window
for this session of XResedit. For example, the command
xresedit -class Mterm -geo 81x23+0-0 displays an 81-column
by 23-row XResedit window in the lower left corner of your
screen.
-fg Specify the foreground color for this session of XResedit.
-bg Specify the background color for this session of XResedit.
+debug Do not display debugging information (the default action).
This option is reserved for DG development.
-debug Display debugging information (DG development only).
+xrDebug Do not display XResedit resource debugging information (the
default action). This option is reserved for DG
development.
-xrDebug Display XResedit resource file debugging information (DG
development only).
OPTION EXAMPLES
The following examples illustrate how certain options affect the
execution of XResedit:
xresedit -version
Display the version of XResedit. Information similar to the
following appears:
Executable path: /usr/bin/X11/xresedit
Date built: Fri June 11, 1993 at 03:46 PM
Executable version: 5.4R2.10A_4.2_dn
Resource file version: 5.4R2.10A_4.2_dn
Help file version: 5.4R2.10A_4.2_dn
xresedit -class XResedit -geometry +0-0 -fg blue -bg black -sys
Start XResedit in the lower left screen corner with system
manager privileges. The XResedit window displays blue
characters on a black background.
xresedit -name Teton -icon Solitude -bg white
Start an instance of XResedit named Teton with the icon named
Solitude. XResedit's background is white.
NOTE: In all the examples in this man page, "XResedit" is the
class name and "Teton" is the instance name. Thus, an example
in which a resource is Teton*background:blue implicitly
identifies it as belonging to an instance, not a class.
xresedit -class XResedit -in Teton -dr
Specifies that resources for the instance Teton are listed by
the resource (res) field rather than by the description (des)
field. Thus, in this example, when the user starts XResedit,
the field for the resource that determines the foreground
color appears as *foreground: blue. If the user had specified
the +dr option, this field might contain Set foreground color:
blue (that is, a description of the resource rather than the
actual resource setting).
CONCEPTS AND TERMINOLOGY
The ability to customize an application by changing its resources is
a powerful feature of X. But because this process often is complex,
considerable development, support and user time is spent managing X
resources. One has only to peruse some of the resource files in
/usr/lib/X11/app-defaults to appreciate the potential for errors.
Problems caused by improperly defined resources can range from
undesirable screen colors to program crashes.
In the past, only those possessing expert knowledge of DG/UX, X,
Motif and the application itself have been able to take full
advantage of resources. XResedit overcomes this limitation by, in
effect, conferring expert knowledge upon novice users. Now all the
user need do to configure resources for a particular application is
make simple choices from XResedit's pull-down menus and double-click
on selected resource values. XResedit then makes the necessary
modifications to the user's resource files automatically; the user
need never explicitly edit resource files. Moreover, XResedit's
config file feature lets system managers control exactly which
resources users are able to modify. As a result, users are shielded
from errors by virtue of being afforded fewer opportunities for
making them. In turn, user aggravation and support costs associated
with incorrectly configured resources files are reduced.
Resources
A resource file defines data values for an application. These data
values are maintained in an ASCII file. An example of a resource is
*foregroundColor: white. An application's primary resource file
resides in /usr/lib/X11/app-defaults. When an application is
started, X reads its associated resource file(s) and creates a
database that the application uses to access the values stored in the
resource file.
Applications may use resource files containing thousands of
resources. Additional resource files may reside in the ~/app-
defaults directory for individual users. When users run XResedit to
modify the resources for a particular application, these
modifications are written to their local copy of the application's
resource file. For example, when the user runs XResedit to modify the
resources for Mterm, the modifications are written to, for example,
/udd/my-system/jones/app-defaults/Mterm, rather than to
/usr/lib/X11/app-defaults/Mterm. System managers, however, can edit
the system resource files directly.
XResedit supports the following resource types: number, color,
string, list, Boolean, font, file, and geometry.
The resources available to a given application are managed by its
class and instance. The resources associated with a given class are
the application's default resources. Instances, on the other hand,
are like flavors of ice cream: They let you customize your X
application's resources according to your individual tastes and
preferences.
Class name
The class name is used to locate the correct resource file for a
given application. The class name usually is identical to the program
name, except the initial character is entered in uppercase (for
example, XResedit). Thus, the resource name XResedit*foregroundColor:
blue sets the foreground color for XResedit, but not for Xterm.
Note: The class names of many applications whose names begin with "X"
capitalize the second character as well: for example, XTerm and
XClock.
Instance name
The resources associated with an instance name override the class
name resources. The instance name is used within a resource file to
define separate resource settings for a particular session, or
'instance,' of an application. The instance name is passed to the
application at startup by the option -name. For example, if you
start XResedit with the option -name Rosa and the resource
Rosa*foregroundColor: red is set in one of your resource files for
XResedit, this particular session of XResedit displays a red
foreground rather than the blue one associated with the class name.
Config file
Config (configuration) files, which are located in
/usr/lib/X11/xresedit, define an application's resources. Config
files allow system administrators to designate which resources will
be available to their user population for specific X applications. A
config file for a given application comprises an ASCII text file
describing the resources that can be modified by users. Normally,
only the system administrator should create or modify config files.
The filename format for a config file is Classname.cfg.
XResedit reads a config file from /usr/lib/X11/xresedit (the default
location for config files), much like X reads the resource file from
/usr/lib/X11/app-defaults. If XResedit detects a corrupt config
file, it exits and displays the line that caused the error.
A base level of resources is supported for all applications, even if
a config file is absent. These basic resources comprise *foreground,
*background, .geometry, .title, .mouseCursor, and .iconName, and are
defined in the file /usr/lib/X11/xresedit/XReseditDefault.cfg. See
X(1) for a description of these and other standard X Toolkit
resources.
Paths
Normally, the resource settings for applications are located in
XFILESEARCHPATH/Classname and XUSERFILESEARCHPATH/Classname. Note
that the XFILESEARCHPATH environment variable must include the
following path entry: /usr/lib/X11/%T/%N%S.
The XUSERFILESEARCHPATH must include a path to the user's own ~/app-
defaults directory, as well as the %N pathname element. An example of
XUSERFILESEARCHPATH is:
/udd/smith/app-defaults/%N
XRESEDIT RESOURCES
Note that many of the following resources can be invoked from the
XResedit command line. Command line options take precedence over
resource file settings maintained in the application's resource
file(s).
XResedit.geometry: [geom]
Allows you to define the size of the XResedit window and
its screen location. (See the -geometry option.)
XResedit*background: [color]
Sets the default color of the XResedit screen. (See the
-bg option.)
XResedit*foreground: [color]
Sets the default color of the characters on the XResedit
screen. (See the -fg option.)
XResedit.title: [title]
Sets the window title of an XResedit window. This resource
also sets the icon name if you have not set the iconName
resource. (See the -title and -name options.)
XResedit.iconName: [icon]
Sets the icon title, which appears at the bottom of the
icon for XResedit. (See the -iconName option.)
XResedit.iconPixmap: [pixmap]
Defines the bitmap used for XResedit's icon.
XResedit*mouseCursor: [cursor]
Defines the appearance of the mouse cursor.
XResedit.displayRes: [Boolean]
If Boolean is true, lists resources by resource names
instead of resource descriptions. The default value is
false. (See the -dr option.)
XResedit.sysManager: [Boolean]
If Boolean is true, confers system manager privileges.
System managers can then edit the /usr/lib/X11/app-defaults
resource files and the system manager resources in the
specified config file (that is, those resources that appear
after the sys directive in the application's config file).
This option requires write access to /usr/lib/X11/app-
defaults. The default value is false: Editing these
resource files or a config file's system manager resources
is disabled. (See the -sys option.)
XResedit.editSystem: [Boolean]
When Boolean is true, you edit the application's
/usr/lib/X11/app-defaults resource file directly, instead
of your local copy of this resource file as specified by
XUSERFILESEARCHPATH. This option requires write access to
/usr/lib/X11/app-defaults. (See the -sys option.)
XResedit.debug: [Boolean]
If Boolean is true, XResedit executes in debug mode. This
mode is useful in the development and testing of config
files, and is provided mainly for DG developers. If Boolean
is false, debugging information is not displayed: The
default value is false. (See the options -debug and
+debug.)
RESOURCE EXAMPLES
The examples below illustrate the effects of XResedit commands,
assuming the application's resource file contains the following
resources:
XResedit*background: black
XResedit*foreground: blue
XResedit*geometry: +0-0
XResedit.sysManager: true
Teton*background: green
Teton*foreground: yellow
Teton.sysManager: false
Example 1: Starting XResedit with its class (default) resources
$ xresedit
Explanation:
This command starts XResedit using its default resources:
The XResedit screen will appear in the lower left corner of
the screen, displaying blue characters on a black
background. The sysManager resource gives the user
permission to edit the system manager resources (that is,
those resources listed below the sys directive) in
XResedit's config file.
Example 2: Starting XResedit with resources for an instance
$ xresedit name -Teton
Explanation:
This command overrides resources specified for the class
name (XResedit) with the resources associated with the
instance named Teton. Thus, the XResedit screen will
appear in the same location as in the preceding example
(the lower left corner of the screen), but now displaying
yellow characters on a green background. Also, because the
-sys option is not specified on the command line, this
instance of XResedit revokes system manager privileges: the
resource Teton.sysManager: false takes effect.
CONFIG FILE FORMAT
The config file is an ASCII text file comprising directives, resource
definitions, list definitions and data definitions for an X
application. Many X clients and applications are delivered with
predefined config files. Normally, the system manager creates or
modifies config files to define which resources users can change.
Anyone, however, can create a config file for an X application.
The definitions may appear in any order within the config file. Each
definition consists of two or more fields and is terminated by a
blank line, a res field, a def field or a directive. Only the first
field of each definition is place-dependent; the remaining fields may
appear in any order. Fields must adhere to the format:
field_name<SPACE>field value<NL>
Use a single backslash character (\) at the end of a field to
continue it on the next line. Use two backslash characters (\\) at
the end of a field when the last character must be a single backslash
character (\). When a backslash character (\) is not the last
character in a field, it is interpreted literally (that is, as a
backslash character).
An example of a config file appears below.
Directives
Directives (optional) consist of the following:
sys Instructs XResedit to permit only system managers to modify
the resources specified after the sys directive. The sys
directive does not require arguments.
rem (or !)
Remark. An exclamation mark (!) in the first column has the
same meaning. The entire line comprises the remark.
Resource definitions
Each resource definition contains three fields:
res Specifies a resource template. This must be the first field
for a definition. A resource template must contain one or
more references to a data definition label. The reference
follows the form [def_label].
dsc Briefly describes a data or resource definition. This
field also is used to prompt the user for input.
exp Describes the purpose of a data or resource definition in
more detail; the length of this field is unlimited.
List definitions
Each list definition can comprise two required fields and two
optional fields. A list definition must include the def field and at
least one of the option fields:
def Data definition label. This must be the first field for
this definition. It is referenced by the [lst_label] in the
lst fields.
dsc Description of this resource value (optional). If it is
not supplied, the def field is the default value.
val Value for this description (optional).
exp Explanation (optional). If the exp field is not supplied,
the dsc field appears as the explanation.
Data definitions
Each data definition consists of at least two fields. Additional
fields may be used, depending on the data type. The default values
for the optional fields are reset whenever a resource is selected for
editing. A table of data types and their optional fields appears
later in this document. The two required data definition fields are:
def Data definition label. This must be the first field for the
definition. It is referenced by the [def_label] in the res
field.
typ This field defines the required data type. Valid values
are:
+----------------------------------------------+
|Data type Description |
+----------------------------------------------+
|Boolean True/False |
+----------------------------------------------+
|numeric Integers and floats |
+----------------------------------------------+
|string Strings of one or more characters |
+----------------------------------------------+
|list A predefined list |
+----------------------------------------------+
|font Fonts |
+----------------------------------------------+
|path Pathname |
+----------------------------------------------+
|directory Directory |
+----------------------------------------------+
|color Colors |
+----------------------------------------------+
|geometry Geometry |
+----------------------------------------------+
Optional fields
The optional data definition fields are:
min Minimum value. The default is 0; omit the decimal point.
max Maximum value. The default is 999999; omit the decimal
point.
dec Number of decimal places permitted during numeric input. If
dec > 0, adjust min and max accordingly. If dec = 2 and a
minimum value of 79.85 is desired, set min to 7985.
len Maximum number of characters to enter; the default is
999999.
rxp Regexp to use as part of validation; the default action is
to accept all input. See the regex(3G) man page for an
explanation of regular expressions.
Important notes:
· You usually should preface each rxp field with a
caret (^), thereby forcing the validation to start
with the first character in the field.
· If you want to allow a null entry, enclose the rxp
field in parentheses and append {0,1} to it. For
example, the expression ^([A-Z][a-z]+){0,1} accepts
any word with an initial uppercase character
followed by any number of lowercase characters. A
minimum of 0 and a maximum of 1 such entries is
allowable.
lst Defines the list of valid entries. The default is an empty
list. The format for the lst value is:
lst_def,lst_def ...
mlt Allow multiple selections from the list.
sep Define the separator to be used between multiple
selections. The default separator character is the comma
(,). The separator may be defined by a single ASCII-
displayable character or its numeric representation. The
numeric representation must exceed one character, or it is
treated as an ASCII representation. For example, if the
desired separator is a comma (,), the argument for the data
definition field can comprise any of the following:
sep , /* ascii representation */
or
sep 0x2c /* hex representation */
or
sep 054 /* octal representation */
or
sep 44 /* decimal representation */
fnt Specifies the font template to pass to xfontsel The default
action is to accept any installed font.
wrt Specifies that the user must have write access to the file
or directory entered.
xst Specifies that the file or directory must exist, and that
the user must have read access to it.
pmx Specifies that the path to the file or directory must
exist.
dir Specifies that the argument will be prepended to the path
or directory before its existence is verified.
pth Allows complete pathnames to be entered. If this field is
absent, only simple pathnames are accepted.
mnw Defines the minimum window width; the default is 0.
mxw Defines the maximum window width; the default is 999999.
chr Specifies that the window is sized in character cells.
atb Allows the user to include trailing blanks.
tld Allows the tilde (~) character in pathnames.
req Makes the field required. When this field is present, the
Delete button is deactivated.
nul Allows a null entry: for example, XResedit*resourceValue:
The following table lists the data types and their valid optional
fields:
+---------------------------------------------------------+
| Numeric String List Boolean Color Font Path Geom Dir |
+---------------------------------------------------------+
|nul x x x x x x x x x |
+---------------------------------------------------------+
|req x x x x x x |
+---------------------------------------------------------+
|min x |
+---------------------------------------------------------+
|max x |
+---------------------------------------------------------+
|dec x |
+---------------------------------------------------------+
|len x x x |
+---------------------------------------------------------+
|rxp x x x x x x |
+---------------------------------------------------------+
|atb x |
+---------------------------------------------------------+
|lst x |
+---------------------------------------------------------+
|mlt x |
+---------------------------------------------------------+
|sep x |
+---------------------------------------------------------+
|fnt x |
+---------------------------------------------------------+
|xst x x |
+---------------------------------------------------------+
|pth x x |
+---------------------------------------------------------+
|pmx x x |
+---------------------------------------------------------+
|tld x x |
+---------------------------------------------------------+
|dir x x |
+---------------------------------------------------------+
|wrt x x |
+---------------------------------------------------------+
|mnw x |
+---------------------------------------------------------+
|mxw x |
+---------------------------------------------------------+
EXAMPLE CONFIG FILE:
res *title: [title]
dsc Window title
exp Name you want to label this window with. This will also\
set the icon name unless you have set the Icon Name resource.\
This resource is overridden by the -title\
command-line option.
def title
typ string
len 8
res *[icon_app_name]*iconImage: [icon_image_name]
dsc Icon
exp Define an icon for a specific application.
def icon_app_name
dsc Enter the name of the application.
typ string
rxp ^c*
def icon_image_name
dsc Enter the path to the desired icon for your window.
typ file
xst true
path /usr/lib/X11/icons
res .geometry: [geom]
dsc Define window size and placement
exp This resource allows you to define the size & location of the mterm window
def geom
typ geometry
mnw 6
mxw 246
mnh 1
mxh 98
chr
res .boldFont: [bold]
dsc Bold font
exp Define the bold font. If no bold font is specified, the default bold font will be used.
def bold
typ font
fnt -*-*-*-*-*-*-*-*-75-75-m-*-iso8859-1
res *background: [color]
dsc Background color
exp Define the default color of the mterm screen.
res *foreground: [color]
dsc Foreground color
exp Define the default color of the characters.
res *scrollMode: [scroll_mode]
dsc Scroll mode
exp Set scrolling method to slow, smooth or fast.
def scroll_mode
dsc Select desired scroll mode
typ list
lst scroll_smooth,scroll_slow,scroll_jump
def scroll_smooth
dsc Smooth Scroll
exp Scroll the screen smoothly
val SMOOTH
def scroll_jump
dsc Fast Scroll
exp Allow the screen to scroll as quickly as\
possible. This may cause the screen to appear to 'jump.'
val JUMP
def slow_scroll
dsc Slow Scroll
val SLOW
exp Slow scrolling down to allow for reading.\
The scroll rate can be set by setting the Scroll Rate\
resource.
sys
res activeUsers: [users]
dsc Active Users
exp Define how many users may be active at the same time.
def users
typ numeric
min 0
max 10
res usernamePrompt: [username]
dsc Username Prompt
exp Define the user name prompt.
def username
typ string
atb true
len 8
FILES
/usr/opt/X11/bin/xresedit
The executable.
/usr/opt/X11/lib/app-defaults/XResedit
The resource file for XResedit.
/usr/opt/X11/lib/xresedit
The directory containing the config files that ship with
XResedit.
/usr/lib/X11/xresedit
The directory containing links to all config files.
/usr/opt/X11/lib/xresedit/XResedit.cfg
The config file for XResedit.
/usr/opt/X11/lib/xresedit/XReseditDefault.cfg
Defines the default resources for applications without
config files.
/usr/opt/X11/catman/M_man/man1/xresedit.1.z
This man page.
/usr/opt/X11/xhelp/C/XResedit/helpfile
ASCII text and help for XResedit.
/usr/opt/X11/xhelp/C/XResedit/helpfile.inx
Index file for help.
/usr/opt/X11/xhelp/C/XResedit/helpfile.toc
Table of contents for help.
/usr/lib/xhelp/C/XResedit
Link to /usr/opt/X11/xhelp/C/XResedit.
DIAGNOSTICS
None
SEE ALSO
X(1), Xdefaults(5)
Licensed material--property of copyright holder(s)