xguess − determine information about your X server |
xguess [-s n] -xyzmnrvkhV |
All flags except -s are exclusive. |
−h |
prints a simple description of legal syntax and functions. |
||
−V |
prints the version number of the program. |
||
−k |
attempts to determine the type of keyboard attached to the X server for the default display and screen. Returns an identification string in the format layout−vendor−model |
Currently supported keyboard layouts |
lk201 |
Digital LK-201 used on DECStation 3100’s and other older machines. |
||
lk401 |
Digital LK-401 used on DECStation 5000’s and early Alpha’s. |
||
pc84 |
IBM PC and PC/XT layout |
||
pc101 |
Standard PC layout (introduced with IBM PC/AT) |
||
type3 |
Sun Type 3 layout used for later Sun3 systems |
||
type4 |
Sun Type 4 layout used on early Sun4 systems |
||
type5 |
Sun Type 5 layout used on current Sun4 systems |
Currently supported vendors |
dec |
Digital Equipment Corporation. Models include lk201, lk401, pcxal, pc7xl. |
|
sun |
Sun Microsystems. Models include type3, type4, type5 (with various national variations). |
|
ncd |
Network Computing Devices. Models include n97, n101, n102, n107, n108. |
|
ibm |
International Business Machines. Model 5168572M only. |
|
xfree86 |
XFree86, Incorporated. A huge variety of models and national variations. |
|
−m |
returns the manufacturer string from the X server for the default display and screen. |
−n |
returns the number of screens (heads) attached to the specified display. See also -s. |
||
−r |
returns the manufacturer’s release number from the X server for the default display and screen. For X Consortium servers, this is the release number of X11 (eg. 6000 == X11R6), but this does not apply to all vendors. |
−s select a screen for a multi-head display. By default, the -x -y |
-z operations apply to screen 0. |
−v |
returns protocol major and minor versions supported by the X server for the default display and screen. Note that this is 11.0 for X11R[456]. |
||
−x |
returns the horizontal resolution of the default display and screen. |
||
−y |
returns the vertical resolution of the default display and screen. |
||
−z |
returns the maximum pixel depth of the default display and screen. |
xguess attempts to determine information about an X server. It is designed to be used in a .xsession file (see xdm(1X) ) to enable display configuration on a platform-independent basis. Results are printed to stdout and can then be used in environment variables, etc. |
0 |
Returned a result with no errors detected. |
||
1 |
Returned after detecting an error. The result could be unreliable. |
An extract from a sample .xsession file showing some uses of xguess #!/bin/bash ## what sort of X Server am I using? export XRES="‘xres -x‘" export YRES="‘xres -y‘" export XSERVER="‘xres -m‘" export XKEYBOARD="‘xres -k‘" ## run appropriate XMODMAPRC if [ -e $HOME/.xmodmaprc.$XKEYBOARD ]; then xmodmap $HOME/.xmodmaprc.$XKEYBOARD else xmodmap $HOME/.xmodmaprc.unknown fi ## biff next to TVTWM panner ## (virtual WM: can't use geometry -300+0) xbiff -geometry +‘expr $XRES - 300‘+0 & tvtwmrc -f $HOME/.tvtwmrc |
DISPLAY |
To get the default host, display number, and screen. |
xdpyinfo(1X), xdm(1X), xkbcomp(1X), |
David Arnold, (davida@pobox.com) |