1XRDB(1)                     General Commands Manual                    XRDB(1)
2
3
4

NAME

6       xrdb - X server resource database utility
7

SYNOPSIS

9       xrdb [-option ...] [filename]
10

DESCRIPTION

12       Xrdb  is  used to get or set the contents of the RESOURCE_MANAGER prop‐
13       erty on the root window of screen 0, or the  SCREEN_RESOURCES  property
14       on  the root window of any or all screens, or everything combined.  You
15       would normally run this program from your X startup file.
16
17       Most X clients use the RESOURCE_MANAGER and SCREEN_RESOURCES properties
18       to get user preferences about color, fonts, and so on for applications.
19       Having this information in the server (where it  is  available  to  all
20       clients) instead of on disk, solves the problem in previous versions of
21       X that required you to maintain defaults files on  every  machine  that
22       you might use.  It also allows for dynamic changing of defaults without
23       editing files.
24
25       The RESOURCE_MANAGER property is used for resources that apply  to  all
26       screens  of  the display.  The SCREEN_RESOURCES property on each screen
27       specifies additional (or overriding) resources  to  be  used  for  that
28       screen.   (When  there is only one screen, SCREEN_RESOURCES is normally
29       not used, all resources are just placed in the  RESOURCE_MANAGER  prop‐
30       erty.)
31
32       The  file specified by filename (or the contents from standard input if
33       - or no filename is given) is optionally  passed  through  the  C  pre‐
34       processor with the following symbols defined, based on the capabilities
35       of the server being used:
36
37       SERVERHOST=hostname
38               the hostname portion of the display to which you are connected.
39
40       SRVR_name
41               the SERVERHOST hostname string turned into a legal  identifier.
42               For         example,        "my-dpy.lcs.mit.edu"        becomes
43               SRVR_my_dpy_lcs_mit_edu.
44
45       HOST=hostname
46               the same as SERVERHOST.
47
48       DISPLAY_NUM=num
49               the number of the display on the server host.
50
51       CLIENTHOST=hostname
52               the name of the host on which xrdb is running.
53
54       CLNT_name
55               the CLIENTHOST hostname string turned into a legal  identifier.
56               For example, "expo.lcs.mit.edu" becomes CLNT_expo_lcs_mit_edu.
57
58       RELEASE=num
59               the  vendor  release number for the server.  The interpretation
60               of this number will vary depending on VENDOR.
61
62       REVISION=num
63               the X protocol minor version supported  by  this  server  (cur‐
64               rently 0).
65
66       VERSION=num
67               the  X  protocol major version supported by this server (should
68               always be 11).
69
70       VENDOR="vendor"
71               a string literal specifying the vendor of the server.
72
73       VNDR_name
74               the VENDOR name string turned into  a  legal  identifier.   For
75               example, "MIT X Consortium" becomes VNDR_MIT_X_Consortium.
76
77       EXT_name
78               A  symbol  is  defined for each protocol extension supported by
79               the server.  Each extension string name is turned into a  legal
80               identifier.  For example, "X3D-PEX" becomes EXT_X3D_PEX.
81
82       NUM_SCREENS=num
83               the total number of screens.
84
85       SCREEN_NUM=num
86               the number of the current screen (from zero).
87
88       BITS_PER_RGB=num
89               the  number  of significant bits in an RGB color specification.
90               This is the log base 2 of the number of distinct shades of each
91               primary  that  the hardware can generate.  Note that it usually
92               is not related to PLANES.
93
94       CLASS=visualclass
95               one of StaticGray, GrayScale, StaticColor,  PseudoColor,  True‐
96               Color,  DirectColor.  This is the visual class of the root win‐
97               dow.
98
99       CLASS_visualclass=visualid
100               the visual class of the root window in a form  you  can  #ifdef
101               on.  The value is the numeric id of the visual.
102
103       COLOR   defined only if CLASS is one of StaticColor, PseudoColor, True‐
104               Color, or DirectColor.
105
106       CLASS_visualclass_depth=num
107               A symbol is defined for each visual supported for  the  screen.
108               The  symbol includes the class of the visual and its depth; the
109               value is the numeric id of the visual.  (If more than one  vis‐
110               ual  has  the same class and depth, the numeric id of the first
111               one reported by the server is used.)
112
113       HEIGHT=num
114               the height of the root window in pixels.
115
116       WIDTH=num
117               the width of the root window in pixels.
118
119       PLANES=num
120               the number of bit planes (the depth) of the root window.
121
122       X_RESOLUTION=num
123               the x resolution of the screen in pixels per meter.
124
125       Y_RESOLUTION=num
126               the y resolution of the screen in pixels per meter.
127
128       SRVR_name, CLNT_name, VNDR_name, and EXT_name identifiers are formed by
129       changing  all characters other than letters and digits into underscores
130       (_).
131
132       Lines that begin with an exclamation mark (!) are ignored  and  may  be
133       used as comments.
134
135       Note  that  since  xrdb can read from standard input, it can be used to
136       the change the contents of properties directly from a terminal or  from
137       a shell script.
138

OPTIONS

140       xrdb program accepts the following options:
141
142       -help   This  option  (or  any  unsupported  option) will cause a brief
143               description of the  allowable  options  and  parameters  to  be
144               printed.
145
146       -display display
147               This  option  specifies  the X server to be used; see X(7).  It
148               also specifies the screen to use for the -screen option, and it
149               specifies  the  screen  from  which  preprocessor  symbols  are
150               derived for the -global option.
151
152       -all    This option indicates that operation should be performed on the
153               screen-independent  resource  property  (RESOURCE_MANAGER),  as
154               well as  the  screen-specific  property  (SCREEN_RESOURCES)  on
155               every  screen  of  the display.  For example, when used in con‐
156               junction with -query, the contents of all properties  are  out‐
157               put.   For  -load, -override and -merge, the input file is pro‐
158               cessed once for each screen.  The resources which occur in com‐
159               mon in the output for every screen are collected, and these are
160               applied as the  screen-independent  resources.   The  remaining
161               resources  are applied for each individual per-screen property.
162               This the default mode of operation.
163
164       -global This option indicates that the operation should  only  be  per‐
165               formed on the screen-independent RESOURCE_MANAGER property.
166
167       -screen This  option  indicates  that the operation should only be per‐
168               formed on the SCREEN_RESOURCES property of the  default  screen
169               of the display.
170
171       -screens
172               This option indicates that the operation should be performed on
173               the SCREEN_RESOURCES property of each screen  of  the  display.
174               For  -load,  -override  and -merge, the input file is processed
175               for each screen.
176
177       -n      This option indicates that changes to the specified  properties
178               (when  used with -load, -override or -merge) or to the resource
179               file (when used with -edit) should be  shown  on  the  standard
180               output, but should not be performed.
181
182       -quiet  This  option  indicates  that  warning  about duplicate entries
183               should not be displayed.
184
185       -cpp filename
186               This option specifies the pathname of the C  preprocessor  pro‐
187               gram  to  be  used.  Although xrdb was designed to use CPP, any
188               program that acts as a filter and accepts the -D,  -I,  and  -U
189               options may be used.
190
191       -nocpp  This  option  indicates that xrdb should not run the input file
192               through a preprocessor before loading it into properties.
193
194       -symbols
195               This option indicates that the symbols that are defined for the
196               preprocessor should be printed onto the standard output.
197
198       -query  This  option  indicates that the current contents of the speci‐
199               fied properties should be printed  onto  the  standard  output.
200               Note  that  since  preprocessor  commands in the input resource
201               file are part of the input file, not part of the property, they
202               won't  appear in the output from this option.  The -edit option
203               can be used to merge the contents of properties back  into  the
204               input resource file without damaging preprocessor commands.
205
206       -load   This  option  indicates  that the input should be loaded as the
207               new value of the specified properties, replacing  whatever  was
208               there  (i.e.   the  old  contents  are  removed).   This is the
209               default action.
210
211       -override
212               This option indicates  that  the  input  should  be  added  to,
213               instead  of  replacing,  the  current contents of the specified
214               properties.  New entries override previous entries.
215
216       -merge  This option indicates that the input should be merged and lexi‐
217               cographically  sorted  with,  instead of replacing, the current
218               contents of the specified properties.
219
220       -remove This option indicates that the specified properties  should  be
221               removed from the server.
222
223       -retain This  option indicates that the server should be instructed not
224               to reset if xrdb is the first client.  This never be  necessary
225               under  normal conditions, since xdm and xinit always act as the
226               first client.
227
228       -edit filename
229               This option indicates that the contents of the specified  prop‐
230               erties should be edited into the given file, replacing any val‐
231               ues already listed there.  This allows you to put changes  that
232               you  have  made  to your defaults back into your resource file,
233               preserving any comments or preprocessor lines.
234
235       -backup string
236               This option specifies a suffix to be appended to  the  filename
237               used with -edit to generate a backup file.
238
239       -Dname[=value]
240               This  option  is passed through to the preprocessor and is used
241               to define symbols for use with conditionals such as
242
243       -Uname  This option is passed through to the preprocessor and  is  used
244               to remove any definitions of this symbol.
245
246       -Idirectory
247               This  option  is passed through to the preprocessor and is used
248               to specify a directory to search for files that are  referenced
249               with #include.
250

FILES

252       Generalizes ~/.Xdefaults files.
253

SEE ALSO

255       X(7),  appres(1x), listres(1x), Xlib Resource Manager documentation, Xt
256       resource documentation
257

ENVIRONMENT

259       DISPLAY to figure out which display to use.
260

BUGS

262       The default for no arguments should be to query, not to  overwrite,  so
263       that it is consistent with other programs.
264

AUTHORS

266       Bob Scheifler, Phil Karlton, rewritten from the original by Jim Gettys
267
268
269
270X Version 11                      xrdb 1.0.2                           XRDB(1)
Impressum