XSERVER(1) — Unix Programmer’s Manual
NAME
X - X Window System server
SYNOPSIS
X displaynumber [-option ...] ttyname
DESCRIPTION
X is the window system server. On operating systems derived from 4.3bsd, it is run automatically by init(8), otherwise it is started from the xinit(1) program. The displaynumber argument is used by clients in their DISPLAY environment variables to indicate which server to contact (large machines may have several displays attached). This number is usually in the range of 0-6 and is also used in determining the names of various startup files. The ttyname argument is passed in by init and isn’t used.
The executable that is invoked when X is run is actually one of a collection of programs that depend on the hardware that is installed on the machine. Any additional features are described in the documentation for that server.
The sample server has support for the following protocols:
TCP/IP
The server listens on port htons(6000+N), where N is the display number.
Unix Domain
The file name for the socket is X_UNIX_PATH∗ where X_UNIX_PATH is a configuration parameter (/tmp/.X11-unix/X in the standard release) and "∗" is the display number.
DECnet
The server responds to connections to object “X∗”, where "∗” is the display number.
When the sample server starts up, it takes over the display. If you are running on a workstation whose console is the display, you cannot log into the console while the server is running.
OPTIONS
The following options can be given on the command line to any X server, usually when it is started by init(1) using information stored in the file /etc/ttys. (see ttys(5) for details):
−a number
sets pointer acceleration (i.e. the ratio of how much is reported to how much the user actually moved the pointer).
−c turns off key-click.
c volume sets key-click volume (allowable range: 0-8).
−f volume
sets feep (bell) volume (allowable range: 0-7).
−logo turns on the X Window System logo display in the screen-saver. There is currently no way to change this from a client.
nologo turns off the X Window System logo display in the screen-saver. There is currently no way to change this from a client.
−p minutes
sets screen-saver pattern cycle time in minutes.
−r turns off auto-repeat.
r turns on auto-repeat.
−s minutes
sets screen-saver timeout time in minutes.
−t numbers
sets pointer acceleration threshold in pixels (i.e. after how many pixels pointer acceleration should take effect).
−to seconds
sets default screensaver timeout in seconds.
v sets video-on screen-saver preference.
−v sets video-off screen-saver preference
−co filename
sets name of RGB color database
−help prints a usage message
−fp fontPath
sets the search path for fonts
−fc cursorFont
sets default cursor font
−fn font
sets the default font
Specific implementations may have other command line options.
RUNNING FROM INIT
On operating systems such as 4.3bsd and Ultrix, the server and your login window are normally started automatically by init(8).
By convention, the pseudoterminal with the highest minor device number (e.g. /dev/ttyqf and /dev/ptyqf) is renamed for the lowest display number (e.g. /dev/ttyv0 and /dev/ptyv0). Machines that have more than one display can repeat this process using ttyqe for ttyv1, and so on.
With this done, you can set up /etc/ttys to run X and xterm by adding the following entry (the \’s is to make the lines fit on this manual page, the real entries have to occupy just one line):
ttyv0 "/etc/xterm -L -geometry -1+1 -display :0" xterm on \
secure window="/etc/X :0 -c -l"
on the client machine.
Important note: some versions of init have relatively small program name buffer sizes, so you may find that you can’t list many xterm options. In addition, some init’s will treat the sharp signs that are used in specifying colors (such as for window backgrounds) as comments for the whole line. If you run into problems such as this you may want to write a small program that just exec’s xterm with the proper arguments and have init run that instead.
If all else fails, set the display up to be a dumb terminal and use the xinit program after logging in.
SECURITY
X uses an access control list for deciding whether or not to accept a connection from a given cleint. This list initially consists of the machine on which the server is running, and any hosts listed in the file /etc/X∗.hosts (where ∗ is the display number). This file should contain one line per host name, with no white space. If a name ends in “::”, it is assumed to be a DECnet host, otherwise it is interpreted as an Internet host.
The user can manipulate a dynamic form of this list in the server using the xhost(1) program from the same machine as the server.
Unlike some window systems, X does not have any notion of window operation permissions or place any restrictions on what a client can do; if a program can connect to a display, it has full run of the screen. There is support for using authentication services on connection startup beyond the simple host name check, but it is not used in the standard distribution.
SIGNALS
X will catch the SIGHUP signal sent by init(8) after the initial process (usually the login xterm(1)) started on the display terminates. This signal causes all connections to be closed (thereby “disowning” the terminal), all resources to be freed, and all defaults restored.
DIAGNOSTICS
Too numerous to list them all. If run from init(8), errors are logged in the file /usr/adm/X∗msgs,
FILES
/etc/X∗.hosts Initial access control list
/usr/lib/X11/fonts Font directory
/usr/lib/X11/rgb.txt Color database
/tmp/.X11-unix/X∗ Unix domain socket
/usr/adm/X∗msgs Error log file
SEE ALSO
X(1), xinit(1), xterm(1), xwm(1), xhost(1), xset(1), xsetroot(1), ttys(5), init(8), Xqdss(1), Xqvss(1), Xsun(1), Xapollo(1), X Window System Protocol, Definition of the Porting Layer for the X v11 Sample Server, Strategies for Porting the X v11 Sample Server, Godzilla’s Guide to Porting the X V11 Sample Server
BUGS
The option syntax is inconsistent with itself and xset(1).
The acceleration option should take a numerator and a denominator like the protocol.
If X dies before its clients, new clients won’t be able to connect until all existing connections have their TCP TIME_WAIT timers expire.
The color database is missing a large number of colors. However, there doesn’t seem to be a better one available that can generate RGB values.
COPYRIGHT
Copyright 1988, Massachusetts Institute of Technology.
See X(1) for a full statement of rights and permissions.
AUTHORS
The sample server was originally written by Susan Angebranndt, Raymond Drewry, Philip Karlton, and Todd Newman, with support from a cast of thouands. See also the doc/contributors file.
X Version 11 — 1 March 1988