


XRDB(1)							  XRDB(1)


NNAAMMEE
       xrdb - X server resource database utility

SSYYNNOOPPSSIISS
       xxrrddbb [-option ...] [_f_i_l_e_n_a_m_e]

DDEESSCCRRIIPPTTIIOONN
       _X_r_d_b   is   used	 to  get  or  set  the	contents  of  the
       RESOURCE_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  nor-
       mally 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 previ-
       ous versions of X that required you to  maintain	 _d_e_f_a_u_l_t_s
       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	 overrid-
       ing) resources to be used for that screen.  (When there is
       only one screen, SCREEN_RESOURCES is  normally  not  used,
       all  resources  are  just  placed  in the RESOURCE_MANAGER
       property.)

       The file specified by _f_i_l_e_n_a_m_e (or the contents from stan-
       dard  input  if	-  or no filename is given) is optionally
       passed through the C preprocessor with the following  sym-
       bols  defined,  based  on  the  capabilities of the server
       being used:

       SSEERRVVEERRHHOOSSTT==_h_o_s_t_n_a_m_e
	       the hostname portion of the display to  which  you
	       are connected.

       SSRRVVRR___n_a_m_e
	       the SERVERHOST hostname string turned into a legal
	       identifier.   For  example,   "my-dpy.lcs.mit.edu"
	       becomes SRVR_my_dpy_lcs_mit_edu.

       HHOOSSTT==_h_o_s_t_n_a_m_e
	       the same as SSEERRVVEERRHHOOSSTT.

       DDIISSPPLLAAYY__NNUUMM==_n_u_m
	       the number of the display on the server host.

       CCLLIIEENNTTHHOOSSTT==_h_o_s_t_n_a_m_e
	       the name of the host on which _x_r_d_b is running.




X Version 11		    Release 6				1





XRDB(1)							  XRDB(1)


       CCLLNNTT___n_a_m_e
	       the CLIENTHOST hostname string turned into a legal
	       identifier.    For   example,   "expo.lcs.mit.edu"
	       becomes CLNT_expo_lcs_mit_edu.

       RREELLEEAASSEE==_n_u_m
	       the  vendor  release  number  for the server.  The
	       interpretation of this number will vary	depending
	       on VENDOR.

       RREEVVIISSIIOONN==_n_u_m
	       the  X  protocol	 minor	version supported by this
	       server (currently 0).

       VVEERRSSIIOONN==_n_u_m
	       the X protocol major  version  supported	 by  this
	       server (should always be 11).

       VVEENNDDOORR==""_v_e_n_d_o_r""
	       a  string  literal  specifying  the  vendor of the
	       server.

       VVNNDDRR___n_a_m_e
	       the VENDOR name string turned into a legal identi-
	       fier.   For  example,  "MIT  X Consortium" becomes
	       VNDR_MIT_X_Consortium.

       EEXXTT___n_a_m_e
	       A symbol is defined for	each  protocol	extension
	       supported  by  the  server.  Each extension string
	       name is turned into a legal identifier.	For exam-
	       ple, "X3D-PEX" becomes EXT_X3D_PEX.

       NNUUMM__SSCCRREEEENNSS==_n_u_m
	       the total number of screens.

       SSCCRREEEENN__NNUUMM==_n_u_m
	       the number of the current screen (from zero).

       BBIITTSS__PPEERR__RRGGBB==_n_u_m
	       the  number  of	significant  bits in an RGB color
	       specification.  This is the log base 2 of the num-
	       ber  of	distinct  shades of each primary that the
	       hardware can generate.  Note that  it  usually  is
	       not related to PLANES.

       CCLLAASSSS==_v_i_s_u_a_l_c_l_a_s_s
	       one of StaticGray, GrayScale, StaticColor, Pseudo-
	       Color, TrueColor, DirectColor.  This is the visual
	       class of the root window.

       CCLLAASSSS___v_i_s_u_a_l_c_l_a_s_s==_v_i_s_u_a_l_i_d
	       the  visual class of the root window in a form you
	       can _#_i_f_d_e_f on.  The value is the numeric id of the



X Version 11		    Release 6				2





XRDB(1)							  XRDB(1)


	       visual.

       CCOOLLOORR   defined only if CLASS is one of StaticColor, Pseu-
	       doColor, TrueColor, or DirectColor.

       CCLLAASSSS___v_i_s_u_a_l_c_l_a_s_s___d_e_p_t_h==_n_u_m
	       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.)

       HHEEIIGGHHTT==_n_u_m
	       the height of the root window in pixels.

       WWIIDDTTHH==_n_u_m
	       the width of the root window in pixels.

       PPLLAANNEESS==_n_u_m
	       the  number  of bit planes (the depth) of the root
	       window.

       XX__RREESSOOLLUUTTIIOONN==_n_u_m
	       the x resolution	 of  the  screen  in  pixels  per
	       meter.

       YY__RREESSOOLLUUTTIIOONN==_n_u_m
	       the  y  resolution  of  the  screen  in pixels per
	       meter.

       SRVR__n_a_m_e, CLNT__n_a_m_e, VNDR__n_a_m_e, and EXT__n_a_m_e  identifiers
       are  formed  by changing all characters other than letters
       and digits into underscores (_).

       Lines that begin with an exclamation mark (!) are  ignored
       and may be used as comments.

       Note  that since _x_r_d_b 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.

OOPPTTIIOONNSS
       _x_r_d_b program accepts the following options:

       --hheellpp   This option (or any unsupported option) will cause
	       a brief description of the allowable  options  and
	       parameters to be printed.

       --ddiissppllaayy _d_i_s_p_l_a_y
	       This option specifies the X server to be used; see
	       _X_(_1_).  It also specifies the screen to use for the
	       _-_s_c_r_e_e_n	option,	 and it specifies the screen from
	       which preprocessor symbols  are	derived	 for  the



X Version 11		    Release 6				3





XRDB(1)							  XRDB(1)


	       _-_g_l_o_b_a_l option.

       --aallll    This  option  indicates	that  operation should be
	       performed on the screen-independent resource prop-
	       erty  (RESOURCE_MANAGER),  as  well as the screen-
	       specific	 property  (SCREEN_RESOURCES)  on   every
	       screen  of the display.	For example, when used in
	       conjunction with _-_q_u_e_r_y, the contents of all prop-
	       erties  are  output.   For  _-_l_o_a_d,  _-_o_v_e_r_r_i_d_e  and
	       _-_m_e_r_g_e, the input file is processed once for  each
	       screen.	 The  resources	 which occur in common in
	       the output for every  screen  are  collected,  and
	       these   are   applied  as  the  screen-independent
	       resources.  The remaining  resources  are  applied
	       for each individual per-screen property.	 This the
	       default mode of operation.

       --gglloobbaall This option indicates that  the	operation  should
	       only   be   performed  on  the  screen-independent
	       RESOURCE_MANAGER property.

       --ssccrreeeenn This option indicates that  the	operation  should
	       only be performed on the SCREEN_RESOURCES property
	       of the default screen of the display.

       --ssccrreeeennss
	       This option indicates that the operation should be
	       performed on the SCREEN_RESOURCES property of each
	       screen of the display.  For _-_l_o_a_d,  _-_o_v_e_r_r_i_d_e  and
	       _-_m_e_r_g_e,	the  input  file  is  processed	 for each
	       screen.

       --nn      This option indicates that changes to  the  speci-
	       fied  properties	 (when used with _-_l_o_a_d, _-_o_v_e_r_r_i_d_e
	       or _-_m_e_r_g_e) or to the resource file (when used with
	       _-_e_d_i_t) should be shown on the standard output, but
	       should not be performed.

       --qquuiieett  This option indicates that warning about duplicate
	       entries should not be displayed.

       --ccpppp _f_i_l_e_n_a_m_e
	       This  option  specifies the pathname of the C pre-
	       processor program to be used.  Although	_x_r_d_b  was
	       designed	 to  use  CPP, any program that acts as a
	       filter and accepts the -D, -I, and -U options  may
	       be used.

       --nnooccpppp  This option indicates that _x_r_d_b should not run the
	       input file through a preprocessor  before  loading
	       it into properties.

       --ssyymmbboollss
	       This  option  indicates	that the symbols that are



X Version 11		    Release 6				4





XRDB(1)							  XRDB(1)


	       defined for the	preprocessor  should  be  printed
	       onto the standard output.

       --qquueerryy  This option indicates that the current contents of
	       the specified properties should	be  printed  onto
	       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.   The
	       --eeddiitt  option can be used to merge the contents of
	       properties back into the input resource file with-
	       out damaging preprocessor commands.

       --llooaadd   This  option  indicates	that  the input should be
	       loaded as the new value of the  specified  proper-
	       ties,  replacing whatever was there (i.e.  the old
	       contents	 are  removed).	  This	is  the	  default
	       action.

       --oovveerrrriiddee
	       This  option  indicates	that  the input should be
	       added to, instead of replacing, the  current  con-
	       tents  of  the  specified properties.  New entries
	       override previous entries.

       --mmeerrggee  This option indicates that  the	input  should  be
	       merged  and lexicographically sorted with, instead
	       of replacing, the current contents of  the  speci-
	       fied properties.

       --rreemmoovvee This  option  indicates that the specified proper-
	       ties should be removed from the server.

       --rreettaaiinn This option indicates that the  server  should  be
	       instructed  not	to  reset  if  _x_r_d_b  is the first
	       client.	This never be necessary under normal con-
	       ditions,	 since	_x_d_m  and  _x_i_n_i_t always act as the
	       first client.

       --eeddiitt _f_i_l_e_n_a_m_e
	       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 to your defaults back into your resource
	       file,  preserving  any  comments	 or  preprocessor
	       lines.

       --bbaacckkuupp _s_t_r_i_n_g
	       This option specifies a suffix to be  appended  to
	       the  filename used with --eeddiitt to generate a backup
	       file.





X Version 11		    Release 6				5





XRDB(1)							  XRDB(1)


       --DD_n_a_m_e_[_=_v_a_l_u_e_]
	       This option is passed through to the  preprocessor
	       and  is used to define symbols for use with condi-
	       tionals such as

       --UU_n_a_m_e  This option is passed through to the  preprocessor
	       and is used to remove any definitions of this sym-
	       bol.

       --II_d_i_r_e_c_t_o_r_y
	       This option is passed through to the  preprocessor
	       and  is	used to specify a directory to search for
	       files that are referenced with _#_i_n_c_l_u_d_e_.

FFIILLEESS
       Generalizes _~_/_._X_d_e_f_a_u_l_t_s files.

SSEEEE AALLSSOO
       X(1), Xlib Resource  Manager  documentation,  Xt	 resource
       documentation

EENNVVIIRROONNMMEENNTT
       DDIISSPPLLAAYY to figure out which display to use.

BBUUGGSS
       The  default  for  no arguments should be to query, not to
       overwrite, so that it is consistent with other programs.

AAUUTTHHOORRSS
       Bob Scheifler, Phil Karlton, rewritten from  the	 original
       by Jim Gettys


























X Version 11		    Release 6				6


