XUTIL(1) — UNIX Programmer’s Manual
NAME
xutil - output information about the X server
SYNOPSIS
xutil [-screen number] [-displayid displayname] [-help [option]] [-option]
DESCRIPTION
Xutil is a utility for obtaining information about an X server. All the information which the X server gives to a client when the client first connects can be output. Information is output in a form suitable for use in shell scripts, with the option controlling which piece of information is produced.
OPTIONS
-displayid This allows the setting of the DISPLAY environment variable to be overwritten. Where the information produced by xutil depends on the screen number of the display this option can be used to obtain information about other screens.
-screen This allows the screen number of the display environment variable or of -displayid to be overridden. This makes it easy to use xutil to find out about other screens on the display.
Only one of the other possible options can be given.
-help Outputs usage information for xutil. If an argument is given it must be one of the other options (except -exec) in which case help information is output about that option, or the keyword options in which case a list of all the options is produced or all in which case full help information for all the options is output.
-exec The remainder of the arguments are treated as a command which will be executed on each screen of the X server. The DISPLAY environment variable is set to each screen in turn and the given command executed. The commands are executed in parallel. The xutil command will succeed if all commands are started successfully. Xutil makes no attempt to check the exit status of the commands.
-verbose This option functions in the same way as -exec except that the display name and the process id of the started commands are printed on the output stream.
-protocolVersion
Prints the major version number of the X protocol − since this is X11 this value should always be 11.
-protocolRevision
Prints the minor protocol revision number. Currently this is 0 (there have been no revisions to the protocol).
-serverVendor
Identification of the X server implemention − the name of the organisation which is responsible for server implementation (which need not be the same as the organisation responsible for the client side − Xlib). This name will normally be registered with the MIT X Consortium “X Register”. The name is used by some applications to work out server specific information.
-serverRelease
Prints the server release number. The meaning of this number is determined solely by the server implementor; for Acorn servers it is a simple numeric value which gets larger with later releases of our server.
-imageByteOrder
Prints the byte order expected by the server for bitmap data - the order of bytes within a scan line unit (see -scanlineUnit). For bitmaps the value is only relevant if the scan line unit is 16 or 32. The value then says whether a single scan line unit is transmitted with its least significant byte first (xutil will output LSBFirst) or the most significant first (MSBFirst). Prints the mapping of scan line units to bits on the display is determined by the bitmap bit order - see -bitmapBitOrder. Notice that the format of bitmap data is determined by the server − the server can handle one and only one format. This value also specifies the format of 4 bit-per-pixel image data (well, this is what the protocol says) − the implication is that the first (screen left most) 4 bit pixel is in the least significant bits of a byte for LSBFirst, and the most significant for MSBFirst.
-scanlineUnit
Prints the number of bits in a single unit of bitmap data provided to the server. This number will be 8, 16 or 32 (unless there is a bug in the server). Bitmap data must be transmitted to the server in chunks of this size, individual chunks will be encoded in bytes according to the bitmap byte order − see -imageByteOrder.
-scanlinePad
Prints the number of bits which a single scan line of a bitmap sent to the server must be padded to. The server expects each scan line of a bitmap or other image data to be padded to a multiple of this number of bits. The number will be 8, 16 or 32 and will be greater than or equal to the scan line unit size.
-bitmapBitOrder
Prints the bit order (screen left to right) within a single scan line unit of server image data. Xutil will output either LSBFirst (if the least significant bit of a scan line unit is left most on the screen) or MSBFirst (if the most significant bit of a scan line unit is the left most on the screen).
-pixmapFormats
Prints the image formats supported by the server are output. Each format is output on a separate line as three decimal numbers separated by tab characters. The first number is the depth of the format (which can have any value), the second is the number of bits used per pixel in the format (which must be 1, 4, 8, 16, 24 or 32). The final number gives the scan line padding required by the format; this must be 8, 16 or 32 (bits).
-motionBufferSize
Prints the size of the keyboard mouse motion buffer. If non-zero this is the approximate number of mouse motion events which the server keeps a record of.
-minimumKeycode
Prints the first keycode used by the server as a decimal number.
-maximumKeycode
Prints the last keycode used by the server as a decimal number.
-numberOfScreens
Prints the number of different screens on this display.
-screens This is the default action of xutil. It prints the display ids of all the screens of the X server, one per line, on the output.
The remaining arguments are screen specific - they output information about the default screen of the display (this will be the screen specified in the DISPLAY environment variable).
-rootWindow
Prints the root window id as a hexadecimal number (preceded by 0x).
-width Prints the width (in pixels) of the root window.
-height Prints the height (in pixels) of the root window.
-mmwidth
Prints the width (in millimetres) of the screen. This option and the -mmheight option will not be reliable on machines where the monitor can be changed!
-mmheight
Prints the height (in millimetres) of the screen.
-allowedDepths
Prints the depths supported on the screen. The depths are output as decimal numbers, one per line.
-rootDepth
Prints the depth of the root window.
-rootVisual
Prints the id of the visual of the root window.
-rootColormap
Prints the id of the colour map associated with the root visual.
-rootColormapCells
Prints the number of entries in the default colour map.
-whitePixel
Prints the pixel value of the white pixel.
-blackPixel
Prints the pixel value of the black pixel.
-minimumInstalledColormaps
Prints the minimum number of colour maps which can be installed at once. The server can guarantee to install at least this number of colour maps at once on this screen.
-maximumInstalledColormaps
Prints the maximum number of colour maps which can be installed at once. The server may install up to this number of colour maps at once − depending on the allocations of colours within the map.
-backingStore
Shows what backing store support is available on the default screen. Xutil will output one of Never (the server does not implement backing store) WhenMapped (the server can provide backing store for windows when they are mapped) or Always (the server can provide backing store for any window). Even if the server specifies Always backing storage may be limited in other ways.
-saveUnders
Shows whether save unders are supported on the default screen. Xutil will output either true or false.
-visualClass
Prints the class of the default visual of the screen. The value printed will be one of StaticGray GrayScale StaticColor PseudoColor TrueColor or DirectColor. These correspond to the constants defined in the X header file /usr/include/X11/X.h.
-redMask Prints the colour map red mask of the default visual as a hexadecimal number.
-greenMask
Prints the colour map green mask of the default visual as a hexadecimal number.
-blueMask
Prints the colour map blue mask of the default visual as a hexadecimal number.
-bitsPerRGB
Prints the number of significant bits per red, green or blue value in the colour maps of the default visual. The screen can resolve no more red green or blue intensity levels than indicated by this value.
-visuals Prints information about all the visuals of the screen. One line is output per visual supported on this screen. The information consists of a number of fields separated by tab characters (there are no other tab or space characters in the output, so the output can easily be used as input to, for example, awk(1)).Theinformationisas
hexadecimal The id of the visual.
decimal The depth of the visual.
string The visual class in the same format as the result of -visualClass.
hexadecimal The colour map red mask.
hexadecimal The colour map green mask.
hexadecimal The colour map blue mask.
decimal The size of the colour map (the number of entries).
decimal The number of significant bits in the red, green and blue values in colour map entries.
ENVIRONMENT
DISPLAY
To get the default host, display number, and (if required) screen.
ERRORS
If the result returned by the server cannot be represented (because the server has a bug in it, or because it corresponds to a protocol other than X version 11.0) xutil normally produces output of the form “∗∗∗ unknown ∗∗∗”, or (if the value is an integer) “∗∗∗ unknown (<value>) ∗∗∗”. If a visual class is incorrect the output will be InvalidClass<integer>, with <integer> replaced by the number the server returned.
SEE ALSO
X(1), xdpyinfo(1), xwininfo(1), xprop(1), xrdb(1)
COPYRIGHT
Copyright 1990 Acorn Computers Ltd
AUTHOR
JB, Acorn Computers Ltd
X Version 11 — Release 4