xguess is a small utility intended for use in
initialisation scripts to determine the capabilities of the host
machine's X server. if you use multiple machines with different
capabilities, you might find this useful. In particular, it can
report the screen resolution, pixel depth, number of screens,
server vendor and keyboard layout, in simple formats designed for
use in configuring the position of application windows, etc.
See the man page.