.TH X "" "" "X Utility"
.PC "X Window System server"
\fBX [:\fIdisplaynumber\^\fB] [\-\fIoption ...\^\fB] [\fIttyname\^\fB]\fR
.PP
.II "X server"
.II server
.B X
is the generic name for the X Window System server.
It usually is a link to
the appropriate server binary for driving the screen on your machine:
.B /usr/X11/bin/X386color
for VGA color, or
.B /usr/X11/bin/X386mono
for monochrome graphics systems.
.SH "Starting the Server"
.\" The server is usually started from the X Display Manager program
.\" .BR xdm .
.\" This utility is run from the system's boot files and takes care of keeping
.\" the server running, prompts for user names and passwords,
.\" and starting up the user sessions.
.\" It is easily configured for sites that wish to provide a
.\" consistent interface for novice users.
.\" .PP
.\" Installations that run more than one window system still need to use the
.\" X utility
.\" .BR xinit .
.\" However,
.\" .B xinit
.\" is to be considered a tool for building startup scripts,
.\" and is not intended for use by end users.
.\" Site administrators are
.\" .I strongly
.\" urged to use
.\" .BR xdm ,
.\" or build other interfaces for novice users.
.\" .PP
To launch the server, invoke the script
.BR /usr/X11/bin/startx .
This script in turn invokes the X utility
.B xinit
with the appropriate configuration files.
.\" .PP
When the X server starts up, it takes over the
console.
.\" display.
.\" If you are running on a workstation whose console is the display,
.\" you cannot log into the console while the server is running.
You cannot log into the console while the server is running, although
you can use the X client
.B xterm
to create a terminal within a window on your screen, and so
give commands to your machine.
.SH "Network Connections"
The X server by design supports connections via TCP/IP, DECnet,
and the local UNIX domain.
However, the \*(CO implementation of X does not yet support networking.
The server at this point can interact only with one display:
your machine's console.
.\" The X server supports connections made using the following reliable
.\" byte-streams:
.\" .IP "TCP\/IP"
.\" The server listens on port 6000+\fIn\fR,
.\" where \fIn\fP is the display number.
.\" .IP "\fBUnix Domain\fR"
.\" The X server uses \fB/tmp/.X11-unix/X\fBn\fR as the file name for
.\" the socket, where \fIn\fP is the display number.
.\" .IP "\fBDECnet\fR"
.\" The server responds to connections to object \fBX$X\fIn\fR, where
.\" .I n
.\" is the display number.
.\" This is not supported in all environments.
.SH Options
All X servers accept the following command-line options.
Note that the ones that apply to networking do not yet apply to the
\*(CO implementation of X, and therefore you should ignore them.
.II xset
You can use the X utility
.B xset
to change many of these parameters while
.B X
is in operation:
.IP "\fB\-a \fInumber\fR" 0.75i
Set pointer acceleration, i.e., the ratio of how much
the mouse cursor moves to how much the user actually moved the mouse.
.IP \fB\-ac\fR
Disable host-based access-control mechanisms.
This enables access by any host,
and permits any host to modify the access-control list.
Use this option with extreme caution.
It exists primarily for running test suites remotely.
.IP "\fB\-auth \fIfile\fR"
.I file
contains a collection of authorization records used
to authenticate access.
.IP \fBbc\fR
Disable certain kinds of error checking.
This re-enables certain bugs that have been fixed in this release of
the server, to support applications that need those bugs to run correctly.
.IP \fB\-bs\fR
Disable backing storage on all screens.
.IP \fB\-c\fR
Turn off key-click.
.IP "\fBc \fIvolume\fR"
Set the volume of the key-click.
.I volume
is a percent of the maximum volume.
.IP "\fB\-cc \fIclass\fR"
Set to
.I class
the visual class for the root window of color screens.
The class numbers are as specified in the X protocol.
Not every server obeys this option.
.IP "\fB\-co \fIfilename\fR"
Read the RGB color data base from
.IR filename .
The default is
.BR /usr/X11/lib/rgb.txt .
.IP "\fB\-dpi \fIresolution\fR"
Set the resolution of the screen, in dots per inch.
Use this option when the server cannot derive the screen size
from the hardware.
.IP "\fB\-f \fIvolume\fR"
Set the volume of the bell.
This is a percent of the maximum volume.
.IP "\fB\-fc \fIcursorfont\fR"
Set the font for the mouse cursor.
The default is
.BR cursor .
.IP "\fB\-fn \fIfont\fR"
Use
.I font
as the default text font.
.IP "\fB\-fp \fIfontPath\fR"
Set the search path for fonts.
This path is a comma-separated list of
directories that the X server searches for font data bases.
.IP "\fB\-help\fR"
Print a usage message.
.IP "\fB\-I\fR"
Ignore all remaining command-line arguments.
.\".IP "\fB\-ld \fIkilobytes\fR"
.\"Limit the server's data space to
.\".IR kilobytes .
.\"A value of zero makes the data size as large as possible.
.\"The default value of \-1 leaves the data space limit unchanged.
.\"This option is not available under all operating systems.
.\".IP "\fB\-lf \fIfiles\fR"
.\"Set to
.\".I files
.\"the number of files that the server have open at any one time.
.\"A value of zero makes the limit as large as possible.
.\"The default value of \-1 leaves the limit unchanged.
.\"This option is not available in all operating systems.
.\"Under \*(CO, a process can have no more than 60 files open at any one time.
.\".IP "\fB\-ls \fIkilobytes\fR"
.\"Set to
.\".I kilobytes
.\"the stack space available to the server.
.\"A value of zero makes the stack as large as possible.
.\"The default value of \-1 leaves the stack unchanged.
.\"This option is not available in all operating systems.
.\"\*(CO uses a dynamically allocated stack, so this option should never be
.\"necessary.
.IP "\fB\-logo\fR"
Turn on display of the X Window System's logo in the screen saver.
This cannot be changed from within a client.
.IP "\fBnologo\fR"
Do not display the X Window System's logo in the screen saver.
This cannot be changed from within a client.
This is the default.
.IP "\fB\-p \fIminutes\fR"
Set to
.I minutes
the screen-saver's time of cycling its pattern.
.IP "\fB\-probeonly\fR"
Interrogate the video card to discover its chip set and amount of
video RAM, but do not bring up X.
.IP "\fB\-r\fR"
Turn off auto-repeat.
.IP "\fBr\fR"
Turn on auto-repeat.
.IP "\fB\-s \fIminutes\fR"
Invoke the screen-saver
.I minutes
after receiving the last input from the keyboard or mouse.
.IP "\fB\-su\fR"
Disable save-under support on all screens.
.IP "\fB\-t \fInumber\fR"
Set the threshhold of mouse-cursor (pointer) acceleration, in pixels:
that is, let acceleration take effect after the user has moved the
mouse cursor
.I number
pixels.
.IP "\fB\-to \fIseconds\fR"
Set the default connection's timeout
.IR seconds .
.\" .IP "\fBtty\fIxx\fR"
.\" Tell the server to think that it was started on TTY
.\" .IR xx .
.\" Normally, this is ignored.
.IP "\fBv\fR"
When the screen saver is invoked, turn off video.
.IP "\fB\-v\fR"
When the screen saver is invoked, leave video on.
.IP "\fB\-wm\fR"
Force the default backing-store of all windows to be
.BR WhenMapped .
This is one way to get backing-store to apply to all windows.
.IP "\fB\-x \fIextension\fR"
Load
.I extension
at the time of initialization.
.\".PP
.\" You can also have the X server connect to
.\" .B xdm
.\" using XDMCP.
.\" Although this is not typically useful as it does not allow
.\" .B xdm
.\" to manage the server process,
.\" it can be used to debug XDMCP implementations, and serves as a sample
.\" implementation of the server side of XDMCP.
.\" The following options control the behavior of XDMCP.
.\" .IP "\fB\-query \fIhost-name\fR"
.\" Enable XDMCP and send Query packets to the specified host.
.\" .IP "\fB\-broadcast\fR"
.\" Enable XDMCP and broadcast BroadcastQuery packets to the network.
.\" The first responding display manager will be chosen for the session.
.\" .IP "\fB\-indirect \fIhost-name\fR"
.\" Enable XDMCP and send IndirectQuery packets to the specified host.
.\" .IP "\fB\-port \fIport-num\fR"
.\" Use an alternate port number for XDMCP packets.
.\" Must be specified before the options
.\" .BR \-query ,
.\" .BR \-broadcast ,
.\" or
.\" .BR \-indirect options .
.\" .IP "\fB\-once\fR"
.\" Normally, the server keeps starting sessions, one after the other.
.\" This option makes the server exit after the first session is over.
.\" .IP "\fB\-class \fIdisplay-class\fR"
.\" XDMCP has an additional display qualifier used in resource lookup for
.\" display-specific options.
.\" This option sets that value, by default it
.\" is
.\" .IR MIT-Unspecified .
.\" .IP "\fB\-cookie \fIxdm-auth-bits\fR"
.\" When testing XDM-AUTHENTICATION-1, a private key is shared between the
.\" server and the manager.
.\" This option sets the value of that private
.\" data.
.\" (Not that it is very private, being on the command line!)
.\" .IP "\fB\-displayID \fIdisplay-id\fR"
.\" Yet another XDMCP specific value, this one allows the display manager to
.\" identify each display so that it can locate the shared key.
.\".PP
.\" Many servers also have device-specific command line options.
.\" See the manual pages for the individual servers for more details.
.SH Security
.II security
.II MIT-MAGIC-COOKIE-1
The X server implements a simplistic authorization protocol,
.BR MIT-MAGIC-COOKIE-1 ,
which uses data private to authorized clients and the server.
This is a trivial scheme:
if the client passes authorization
data that are the same as those possessed by the server, it is allowed access.
This scheme is worse than the host-based access control mechanisms
in environments with unsecure networks as it allows any host to connect,
given that it has discovered the private key;
but in many environments, this level of
security is better than the host-based scheme as it allows access control
per user instead of per host.
.PP
.II XDM-AUTHORIZATION-1
In addition, the server provides support for a DES-based authorization
scheme,
.BR XDM-AUTHORIZATION-1 ,
which is more secure (given a secure key distribution mechanism).
This authorization scheme can be used in conjunction with XDMCP's
authentication scheme (\fBXDM-AUTHENTICATION-1\fR) or in isolation.
.PP
The authorization data are passed to the server in a private file named by
the command-line option
.BR \-auth .
Each time the server is about to accept the first connection
after a reset (or when the server is starting), it reads this file.
If this file contains any authorization records,
the local host is not automatically allowed access to the server,
and only clients which send one of the authorization records contained
in the file in the connection setup information will be allowed access.
.\" See the \fBXau\fR
.\" manual page for a description of the binary format of this file.
.\" Maintenance of this file, and distribution of its contents to remote sites
.\" for use there is left as an exercise for the reader.
.\" .PP
.\" The server also provides support for SUN-DES-1, using Sun's Secure RPC.
.\" It involves encrypting data with the X server's public key.
.\" See the \fIXsecurity\fP manual page for more information.
.\" .PP
.\" The X server also uses a host-based access control list for deciding
.\" whether to accept connections from clients on a particular machine.
.\" If no other authorization mechanism is being used,
.\" this list initially consists of the host on which the server is running, as
.\" well as any machines listed in the file
.\" \fB/etc/X\fBn\fI.hosts\fR, where \fBn\fR is the display number of the server.
.\" Each line of the file should contain either an Internet host name
.\" (e.g., \fBexpo.lcs.mit.edu\fR) or a DECnet
.\" host name in double colon format (e.g. \fBhydra::\fR).
.\" There should be no leading or trailing spaces on any lines.
.\" For example:
.\" .DM
.\" 	joesworkstation
.\" 	corporate.company.com
.\" 	star::
.\" 	bigcpu::
.\" .DE
.\" .PP
.\" Users can add or remove hosts from this list and enable or disable access
.\" control using the command
.\" .B Ixhost
.\" from the same machine as the server.
.PP
The X protocol intrinsically 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.
Sites that have better authentication and authorization systems
(such as Kerberos) might wish to make use of the hooks in the libraries
and the server to provide additional security models.
.SH Signals
The X server attaches special meaning to the following signals:
.IP \fBSIGHUP\fR
.II SIGHUP
Close all existing connections, free all resources, and restore all defaults.
.II xterm
.II twm
It is sent by the display manager whenever the main user's main client
(usually
.B xterm
or the window manager
.BR twm )
exits.
This forces the server to clean up and prepare for its next invocation.
.IP \fBSIGTERM\fR
.II SIGTERM
Exit cleanly.
.IP \fBSIGUSR1\fR
.II SIGUSR1
This signal is used quite differently from either of the above.
When the server starts, it checks to see if it has inherited
.B SIGUSR1
as
.B SIG_IGN
instead of the usual
.BR SIG_DFL .
In this case, the server sends
.B SIGUSR1
to its parent process after it has set up the various connection schemes.
.\" .B xdm
.\" uses this feature to recognize when connecting to the server is possible.
.SH Fonts
.II fonts
Fonts usually are stored as individual files in directories.
The X server can obtain fonts from directories or from font servers.
.II Xconfig
.II FontPath
.II xset
The list of directories and font servers the X server uses when trying
to open a font is controlled by the
.BR "FontPath" ,
which is set in the file
.BR /usr/X11/lib/Xconfig .
Although most sites start up the X server
with the appropriate font path (using the option
.BR \-fp ,
mentioned above), it can be overridden using the X utility
.BR xset .
.PP
The default font path for the X server contains the following
.\" four
directories:
.IP \fB/usr/X11/lib/fonts/misc\fR
This directory contains
.\"many
miscellaneous bit-mapped fonts.
.\"that are useful on all
.\"systems.
.\"It contains a family of fixed-width fonts,
.\"a family of fixed-width fonts from Dale Schumacher,
.\"several Kana fonts from Sony Corporation,
.\"two JIS Kanji fonts,
.\"two Hangul fonts from Daewoo Electronics,
.\"two Hebrew fonts from Joseph Friedman,
.\"the standard cursor font, two cursor fonts from
.\"Digital Equipment Corporation, and cursor and glyph fonts
.\"from Sun Microsystems.
It also has various font-name aliases for the fonts.
.\" .IP \fB/usr/X11/lib/fonts/Speedo\fR
.\" This directory contains outline fonts for Bitstream's Speedo rasterizer.
.\" A single font face, in normal, bold, italic, and bold italic, is provided,
.\" contributed by Bitstream, Inc.
.IP \fB/usr/X11/lib/fonts/75dpi\fR
This directory contains bit-mapped fonts contributed by Adobe Systems, Inc.,
Digital Equipment Corporation, Bitstream, Inc.,
Bigelow & Holmes, and Sun Microsystems, Inc.,
for 75 dot-per-inch displays.
It contains integrated selection of sizes, styles,
and weights for each family of typefaces.
.\" .IP \fB/usr/X11/lib/fonts/100dpi\fR
.\" This directory contains 100 dot-per-inch versions of some of the fonts in the
.\" directory
.\" .BR 75dpi .
.PP
.II mkfontdir
The program
.B mkfontdir
create a font data base in the directory that contains the
compiled versions of the fonts (the \fB.pcf\fR files).
Whenever you add a font to a directory,
run
.B mkfontdir
so that the server can find the new font.
.SH Files
.\" \fB/etc/X*.hosts\fR \(em Initial access control list.
.\" .br
\fB/usr/X11/bin/X\fR \(em Default X server
.br
\fB/usr/X11/bin/X386color\fR \(em Color X server
.br
\fB/usr/X11/bin/X386mono\fR \(em Monochrome X server
.br
\fB/usr/X11/lib/Xconfig\fR \(em Configuration file for X server
.br
\fB/usr/X11/lib/fonts/75dpi\fR \(em Directory of bit-mapped fonts
.br
\fB/usr/X11/lib/fonts/misc\fR \(em Directory of miscellaneous fonts
.br
\fB/usr/X11/lib/rgb.txt\fR \(em Color data base
.\" .br
.\" \fB/tmp/.X11-unix/X*\fR \(em Domain socket
.\" .br
.\" \fB/usr/adm/X*msgs\fR \(em Log file of error messages
.SH "See Also"
.B
fs,
mkfontdir,
startx,
twm,
xauth,
.\" xdm,
xinit,
xset,
xsetroot,
xterm
.R
.SH Notes
.\" If
.\" .B X
.\" dies before its clients, new clients cannot connect until all
.\" existing connections have their TCP
.\" .B TIME_WAIT
.\" timers expire.
.\" .PP
Copyright \(co 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991,
Massachusetts Institute of Technology.
.PP
.II "Angebranndt, Susan"
.II "Drewry, Raymond"
.II "Karlton, Philip"
.II "Newman, Todd"
.II "Packard, Keith"
.II "Scheifler, Bob"
The sample server was originally written by Susan Angebranndt,
Raymond Drewry,
Philip Karlton,
and Todd Newman of Digital Equipment Corporation,
with support from many other persons.
It has since been
extensively rewritten by Keith Packard and Bob Scheifler of MIT.
