xrdb(X) X Version 11 (11 July 1990) xrdb(X)
NAME
xrdb - X server resource database utility
SYNOPSIS
xrdb [-options ...] [filename]
DESCRIPTION
The xrdb utility gets or sets the contents of the
RESOURCE_MANAGER property on the root window of screen 0.
You normally run this program from your X start-up file.
The resource manager (used by the Xlib routine
XGetDefault(XS) and the X Toolkit) uses the RESOURCE_MANAGER
property 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.
For compatibility with previous versions of X, if there is
no RESOURCE_MANAGER property defined (either because xrdb
was not run or if the property was removed), the resource
manager looks for a file called .Xdefaults in your home
directory.
Based on the capabilities of your server, xrdb passes the
filename (or the standard input if you specify "-" or no
input file) through the C preprocessor with the following
symbols defined:
HOST=hostname
The hostname portion of the display to which you are
connected.
WIDTH=num
The width of the screen in pixels.
HEIGHT=num
The height of the screen in pixels.
XRESOLUTION=num
The X resolution of the screen in pixels per meter.
YRESOLUTION=num
the Y resolution of the screen in pixels per meter.
PLANES=num
The number of bit planes for the default visual.
BITSPERRGB=num
Page 1 (printed 7/3/90)
xrdb(X) X Version 11 (11 July 1990) xrdb(X)
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 is not related to the number of
planes, which is the log base 2 of the size of the
colormap.
CLASS=visualclass
One of the following: StaticGray, GrayScale,
StaticColor, PseudoColor, TrueColor, DirectColor.
COLOR
This is only defined if the default visual's type is
one of the color options.
The C preprocessor ignores lines that begin with an
exclamation mark (!), so you can use these lines for
comments.
OPTIONS
-help
Prints a brief description of the allowable options and
parameters on your screen. This list also prints to
your screen if you specify xrdb with an unsupported
option.
-display display
Specifies the X server.
-cpp filename
Specifies the path name of the C preprocessor program.
Although xrdb was designed to use CPP, you can use any
program that acts as a filter and accepts the -D, -I,
and -U options.
-nocpp
Loads the input file into the RESOURCE_MANAGER property
without running the input file through a preprocessor.
-symbols
Prints the symbols that are defined for the
preprocessor on the standard output. You can use this
option in conjunction with -query, but not with the
options that change the RESOURCE_MANAGER property.
-query
Prints the current contents of the RESOURCE_MANAGER
property on the standard output. Note that since
preprocessor commands in the input resource file are
part of the input file, not part of the property, they
won't appear in the output from this option. You can
use the -edit option to merge the contents of the
Page 2 (printed 7/3/90)
xrdb(X) X Version 11 (11 July 1990) xrdb(X)
property back into the input resource file without
damaging preprocessor commands.
-load
Loads the input as the new value of the
RESOURCE_MANAGER property and removes the old contents.
This is the default action.
-merge
Merges the input with the current contents of the
RESOURCE_MANAGER property. Since xrdb can read the
standard input, you can use this option to change the
contents of the RESOURCE_MANAGER property directly from
a terminal or from a shell script.
-remove
Removes the RESOURCE_MANAGER property from its window.
-edit filename
Edits the contents of the RESOURCE_MANAGER property
into the given file, replacing any values already
listed there. This allows you to put changes that you
have made to your defaults back into your resource
file, preserving any comments or preprocessor lines.
-backup string
Appends a suffix to the filename used with -edit to
generate a backup file.
-Dname[=value]
Defines symbols for conditionals such as #ifdef. This
option is passed through to the preprocessor.
-Uname
This option is passed through to the preprocessor and
removes any definitions of this symbol.
-Idirectory
This option is passed through to the preprocessor and
specifies a directory to search for files that are
referenced with #include.
FILES
Generalizes ~/.Xdefaults files.
ENVIRONMENT
DISPLAY
Specifies the default display.
WARNING
Do not specify xrdb on the command line with no arguments
because it overwrites the RESOURCE_MANAGER property.
Page 3 (printed 7/3/90)
xrdb(X) X Version 11 (11 July 1990) xrdb(X)
SEE ALSO
X(X)
COPYRIGHT
Copyright 1988, Digital Equipment Corporation.
AUTHOR
Phil Karlton, rewritten from the original by Jim Gettys.
Page 4 (printed 7/3/90)