.\" $Header: /afs/dev.mit.edu/source/repository/athena/bin/xversion/xversion.man,v 1.2 1989-06-10 11:48:46 probe Exp $ .TH XVERSION 1 "10 June 1989" .UC 4 .SH NAME xversion \- determine which version of X is running .SH SYNOPSIS .B xversion [ -r ] .SH DESCRIPTION .I Xversion prints to standard output the major version number of the X server running on screen 0 of the workstation. If the .B -r flag is specified, .I xversion will also print out the minor protocol revision number associated with the X server. If .I xversion cannot make a connection to the server, it prints the text '?unknown'. .PP The format of the output string depends on whether the .B -r flag is specified. If it is not, the output string will just be a number representing the major protocol revision. If the .B -r flag is specified, the output string is XnRn. For example, if the X server that is currently running on display 0 is X11R3, the output string will be "X11R3". .PP .I xversion is intended principally as a tool to be used within shell scripts, such as .I xswitch. .SH BUGS The display name is hard-coded as 'unix:0'; i.e. the value of the DISPLAY environment variable is ignored. .PP The output of the minor protocol revision number is only supported if the current server is X11. If an X10 server is currently running, only the major protocol revision number is printed.