User Commands XRDB(1)
NAME
xrdb - X server resource database utility
SYNOPSIS
/usr/bin/xrdb [-option ...] [filename]
DESCRIPTION
Xrdb is used to get or set the contents of theRESOURCE_MANAGER property on the root window of screen 0, or
the SCREEN_RESOURCES property on the root window of any or
all screens, or everything combined. You would normally run this program from your X startup file.Most X clients use the RESOURCE_MANAGER and SCREEN_RESOURCES
properties to get user preferences about color, fonts, and so on for applications. Having this information in the server (where it is available to all clients) instead of on disk, solves the problem in previous versions of X that required you to maintain defaults files on every machine that you might use. It also allows for dynamic changing of defaults without editing files.The RESOURCE_MANAGER property is used for resources that
apply to all screens of the display. The SCREEN_RESOURCES
property on each screen specifies additional (or overriding) resources to be used for that screen. (When there is onlyone screen, SCREEN_RESOURCES is normally not used, all
resources are just placed in the RESOURCE_MANAGER property.)
The file specified by filename (or the contents from stan-
dard input if - or no filename is given) is optionally
passed through the C preprocessor with the following symbols defined, based on the capabilities of the server being used: SERVERHOST=hostname the hostname portion of the display to which you are connected.SRVR_name
the SERVERHOST hostname string turned into a legalidentifier. For example, "my-dpy.lcs.mit.edu"
becomes SRVR_my_dpy_lcs_mit_edu.
HOST=hostname the same as SERVERHOST.DISPLAY_NUM=num
the number of the display on the server host. CLIENTHOST=hostnamethe name of the host on which xrdb is running.
X Version 11 Last change: xrdb 1.0.6 1
User Commands XRDB(1)CLNT_name
the CLIENTHOST hostname string turned into a legal identifier. For example, "expo.lcs.mit.edu" becomesCLNT_expo_lcs_mit_edu.
RELEASE=num the vendor release number for the server. The interpretation of this number will vary depending on VENDOR. REVISION=num the X protocol minor version supported by this server (currently 0). VERSION=num the X protocol major version supported by this server (should always be 11). "" VENDOR="vendor" a string literal specifying the vendor of the server.VNDR_name
the VENDOR name string turned into a legal identif-
ier. For example, "MIT X Consortium" becomesVNDR_MIT_X_Consortium.
EXT_name
A symbol is defined for each protocol extension sup-
ported by the server. Each extension string name isturned into a legal identifier. For example, "X3D-
PEX" becomes EXT_X3D_PEX.
NUM_SCREENS=num
the total number of screens.SCREEN_NUM=num
the number of the current screen (from zero).BITS_PER_RGB=num
the number of significant bits in an RGB color specification. This is the log base 2 of the number of distinct shades of each primary that the hardware can generate. Note that it usually is not related to PLANES. CLASS=visualclassone of StaticGray, GrayScale, StaticColor, Pseu-
doColor, TrueColor, DirectColor. This is the visual class of the root window.CLASS_visualclass=visualid
X Version 11 Last change: xrdb 1.0.6 2
User Commands XRDB(1) the visual class of the root window in a form youcan #ifdef on. The value is the numeric id of the
visual.COLOR defined only if CLASS is one of StaticColor, Pseu-
doColor, TrueColor, or DirectColor.CLASS_visualclass_depth=num
A symbol is defined for each visual supported for the screen. The symbol includes the class of the visual and its depth; the value is the numeric id of the visual. (If more than one visual has the same class and depth, the numeric id of the first one reported by the server is used.) HEIGHT=num the height of the root window in pixels. WIDTH=num the width of the root window in pixels. PLANES=num the number of bit planes (the depth) of the root window.X_RESOLUTION=num
the x resolution of the screen in pixels per meter.Y_RESOLUTION=num
the y resolution of the screen in pixels per meter.SRVR_name, CLNT_name, VNDR_name, and EXT_name identifiers
are formed by changing all characters other than letters anddigits into underscores (_).
Lines that begin with an exclamation mark (!) are ignored and may be used as comments.Note that since xrdb can read from standard input, it can be
used to the change the contents of properties directly from a terminal or from a shell script. OPTIONSxrdb program accepts the following options:
-help This option (or any unsupported option) will cause a
brief description of the allowable options and parameters to be printed.-display display
This option specifies the X server to be used; see X(5). It also specifies the screen to use for theX Version 11 Last change: xrdb 1.0.6 3
User Commands XRDB(1)-screen option, and it specifies the screen from
which preprocessor symbols are derived for the -glo-
bal option.-all This option indicates that operation should be per-
formed on the screen-independent resource property
(RESOURCE_MANAGER), as well as the screen-specific
property (SCREEN_RESOURCES) on every screen of the
display. For example, when used in conjunction with-query, the contents of all properties are output.
For -load, -override and -merge, the input file is
processed once for each screen. The resources which occur in common in the output for every screen arecollected, and these are applied as the screen-
independent resources. The remaining resources areapplied for each individual per-screen property.
This the default mode of operation.-global This option indicates that the operation should only
be performed on the screen-independent
RESOURCE_MANAGER property.
-screen This option indicates that the operation should only
be performed on the SCREEN_RESOURCES property of the
default screen of the display.-screens
This option indicates that the operation should beperformed on the SCREEN_RESOURCES property of each
screen of the display. For -load, -override and
-merge, the input file is processed for each screen.
-n This option indicates that changes to the specified
properties (when used with -load, -override or
-merge) or to the resource file (when used with
-edit) should be shown on the standard output, but
should not be performed.-quiet This option indicates that warning about duplicate
entries should not be displayed.-cpp filename
This option specifies the pathname of the C prepro-
cessor program to be used. Although xrdb was
designed to use CPP, any program that acts as afilter and accepts the -D, -I, and -U options may be
used.-nocpp This option indicates that xrdb should not run the
input file through a preprocessor before loading it into properties.X Version 11 Last change: xrdb 1.0.6 4
User Commands XRDB(1)-symbols
This option indicates that the symbols that are defined for the preprocessor should be printed onto the standard output.-query This option indicates that the current contents of
the specified properties should be printed onto thestandard output. Note that since preprocessor com-
mands in the input resource file are part of the input file, not part of the property, they won'tappear in the output from this option. The -edit
option can be used to merge the contents of proper-
ties back into the input resource file without damaging preprocessor commands.-load This option indicates that the input should be
loaded as the new value of the specified properties, replacing whatever was there (i.e. the old contents are removed). This is the default action.-override
This option indicates that the input should be added to, instead of replacing, the current contents ofthe specified properties. New entries override pre-
vious entries.-merge This option indicates that the input should be
merged and lexicographically sorted with, instead of replacing, the current contents of the specified properties.-remove This option indicates that the specified properties
should be removed from the server.-retain This option indicates that the server should be
instructed not to reset if xrdb is the first client.
This should never be necessary under normal condi-
tions, since xdm and xinit always act as the first client.-edit filename
This option indicates that the contents of the specified properties should be edited into the given file, replacing any values already listed there. This allows you to put changes that you have made toyour defaults back into your resource file, preserv-
ing any comments or preprocessor lines.-backup string
This option specifies a suffix to be appended to thefilename used with -edit to generate a backup file.
X Version 11 Last change: xrdb 1.0.6 5
User Commands XRDB(1)-Dname[=value]
This option is passed through to the preprocessorand is used to define symbols for use with condi-
tionals such as #ifdef.
-Uname This option is passed through to the preprocessor
and is used to remove any definitions of this sym-
bol.-Idirectory
This option is passed through to the preprocessor and is used to specify a directory to search forfiles that are referenced with #include.
FILES Generalizes ~/.Xdefaults files.SEE ALSO
X(5), appres(1), listres(1), Xlib Resource Manager documen-
tation, Xt resource documentation ENVIRONMENT DISPLAY to figure out which display to use.BUGS
The default for no arguments should be to query, not to overwrite, so that it is consistent with other programs. AUTHORS Bob Scheifler, Phil Karlton, rewritten from the original by Jim GettysATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | x11/x11-server-utilities |
|_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
X Version 11 Last change: xrdb 1.0.6 6