Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xrdb(1X) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

X(1X)

XGetDefault(3X)




xrdb(1X) xrdb(1X)
NAME xrdb - gets and sets the RESOURCE_MANAGER property SYNOPSIS xrdb [-help] [-display display] [-n] [-quiet] [-cpp path] [-nocpp] [-symbols] [-query] [-load] [-merge] [-remove] [-retain] [-edit file] [-backup string] [-D name=[value]] [-U name] [-I directory] [file] DESCRIPTION xrdb gets and sets the contents of the RESOURCE_MANAGER pro- perty on the background (root) window of screen 0. First, you run xrdb to set user preferences for colors, fonts, and so on. When you are satisfied with your xrdb command line, include it in your X startup script. The resource manager (used by the Xlib routine XGetDefault(3X) and the X Toolkit) uses the RESOURCE_MANAGER property to get your preferences for use by client applica- tions. 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 main- tain default files on every machine that you might use. You can also run xrdb to change defaults temporarily. Options The xrdb command accepts these options: -backup string Specifies a suffix to be appended to the filename used with the -edit option to generate a backup file. -cpp path Specifies the pathname of the preprocessor to be used. Although xrdb was designed to use cpp, you can use any filter that accepts the -D, -I, and -U options. -D name[=value] Specifies a value for name. This option is passed to the preprocessor and is used to define symbols for use with conditional expressions such as #ifdef. -display display Specifies the X server to connect to. See X(1X) for details. -edit file Indicates that the contents of the RESOURCE_MANAGER property should be edited into the given file, re- November, 1990 1



xrdb(1X) xrdb(1X)
placing any values already listed there. This al- lows you to put changes that you made to your de- faults back into your resource file, preserving any comments or preprocessor lines. -help Displays a summary of the command syntax. Any un- supported option also causes xrdb to display this summary. -load Indicates that the input should be loaded as the new value of the RESOURCE_MANAGER property, replacing whatever was there. The previous contents are re- moved. This is the default action. -I directory Specifies a directory to search. This option is passed to the preprocessor, which searches the directory for files that are referenced with #in- clude directives. -merge Indicates that the input should be merged with (rather than replaced by) the current contents of the RESOURCE_MANAGER property. Because xrdb can read the standard input, this option can be used to change the contents of the RESOURCE_MANAGER property directly from a terminal or from a shell script. Note that xrdb performs a lexicographic sorted merge of the two inputs, which is almost certainly not what you want, but remains for downward compatibili- ty. -n Indicates that changes to the property (when used with -load) or to the resource file (when used with -edit) should be shown on the standard output, but should not be performed. -nocpp Indicates that xrdb should not run the input file through a preprocessor before loading it into the RESOURCE_MANAGER property. -query Indicates that the current contents of the RESOURCE_MANAGER property should be printed on the standard output. Note that preprocessor commands in the input resource file are part of the input file (and not part of the property), so they do not ap- pear in the output. The -edit option can be used to merge the contents of the property back into the in- put resource file without damaging preprocessor com- mands. -quiet Suppresses warnings about duplicate entries. 2 November, 1990



xrdb(1X) xrdb(1X)
-symbols Indicates that the symbols that are defined for the preprocessor should be printed on the standard out- put. It can be used in conjunction with -query, but not with the options that change the RESOURCE_MANAGER property. -remove Indicates that the RESOURCE_MANAGER property should be removed from its window. -retain Causes xrdb to instruct the server not to reset if xrdb is the first client. -U name Specifies a name that is to be undefined. This op- tion is passed to the preprocessor and is used to remove any definitions of the symbol name. For com- patibility, if no RESOURCE_MANAGER property is de- fined (either because xrdb was not run or the pro- perty was removed), the resource manager looks for the .Xdefaults file in your home directory. The file specified by the file argument (or the standard in- put if - or no input file is given) is optionally passed through a preprocessor with the following symbols defined, based on the capabilities of the server being used: BITS_PER_RGB=number Specifies 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 BITS_PER_RGB usu- ally is not related to PLANES. CLASS=visual-class Specifies the visual class of the root window for the default screen. The visual-class argument can be one of StaticGray, GrayScale, StaticColor, PseudoColor, TrueColor, or DirectColor. CLIENTHOST=host Specifies the name of the host on which xrdb is run- ning. COLOR Is only defined if the default visual's type is one of the color options. HEIGHT=pixels Specifies the height of the screen in pixels. HOST=host Specifies the host-name portion of the display to November, 1990 3



xrdb(1X) xrdb(1X)
which you are connected. PLANES=bit-planes Specifies the number of bit planes (the depth) of the root window of the default screen. RELEASE=number Specifies the vendor release number for the server. The interpretation of this number varies depending on VENDOR. REVISION=number Specifies the X protocol minor version number sup- ported by this server. Currently, the value of number is 0. SERVERHOST=host Specifies the host-name portion of the display to which you are connected. VENDOR=vendor Specifies the vendor of the server. VERSION=number Specifies the X protocol major version number sup- ported by this server. The value of number should always be 11. WIDTH=pixels Specifies in pixels the width of the screen. X_RESOLUTION=pixels-per-meter Specifies in pixels per meter the x (horizontal) resolution of the screen. Y_RESOLUTION=vertical-pixels Specifies in pixels per meter the y (vertical) reso- lution of the screen. Lines that begin with an exclamation mark (!) are ignored and may be used as comments. Environment variables The xrdb command uses this environment variable: DISPLAY Specifies the default host, display number, and screen. LIMITATIONS When no arguments are given, xrdb should query, rather than overwrite; such behavior would be consistent with other com- 4 November, 1990



xrdb(1X) xrdb(1X)
mands. NOTES Copyright 1988, Digital Equipment Corporation. Authors: Phil Karlton, rewritten from the original by Jim Gettys, Digital Equipment Corporation and MIT Project Athena FILES ~/.Xdefaults Specifies user preferences. SEE ALSO X(1X) XGetDefault(3X) in X11 Programmer's Reference for A/UX The section, ``Using the Resource Manager,'' in Chapter 10, ``Application Utility Functions,'' in Xlib - C Language In- terface November, 1990 5

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026