Section 0: startx
This page was been converted automatically, from Debian GNU/Linux
man pages.
STARTX(1) STARTX(1)
NAME
startx - initialize an X session
SYNOPSIS
startx [ [ client ] options ... ] [ -- [ server ] options
... ]
DESCRIPTION
The startx script is a front end to xinit that provides a
somewhat nicer user interface for running a single session
of the X Window System. It is typically run with no argu-
ments.
One important exception is the case when a different color
depth is being selected. Since this is involves passing
an argument to the server, the option has to be prefixed
with two dashes, with spaces to either side `--' (see the
xinit(1) manual page for more details on the arguments).
In order to start the server in 16bpp use
startx -- -bpp 16
Note that in the Debian GNU/Linux system, what many people
traditionally put in the .xinitrc file should go in .xses-
sion instead; the idea is that the user's X environment
should look and act the same whether startx, xdm, or xinit
is used to start the X session. All discussion of .xini-
trc below applies equally well to .xsession. Keep in
mind, however, that X sessions started from xdm will com-
pletely disregard the .xinitrc file.
To determine the client to run, startx first looks for a
file called .xinitrc in the user's home directory. If
that is not found, it uses the file xinitrc in the xinit
library directory. If command line client options are
given, they override this behavior. To determine the
server to run, startx first looks for a file called
.xserverrc in the user's home directory. If that is not
found, it uses the file xserverrc in the xinit library
directory. If command line server options are given, they
override this behavior. Users rarely need to provide a
.xserverrc file. See the xinit(1) manual page for more
details on the arguments.
In the Debian system, the system-wide xinitrc file is
found in the /etc/X11/xinit directory, and no system
xserverrc file is present. Site administrators may create
one, however, in /etc/X11/xinit.
The .xinitrc is typically a shell script which starts many
clients according to the user's preference. When this
shell script exits, startx kills the server and performs
any other session shutdown needed. Most of the clients
started by .xinitrc should be run in the background. The
X Version 11 Release 6.3 1
STARTX(1) STARTX(1)
last client should run in the foreground; when it exits,
the session will exit. People often choose a session man-
ager, window manager, or xterm as the ``magic'' client.
EXAMPLE
Below is a sample .xinitrc that starts several applica-
tions and leaves the window manager running as the
``last'' application. Assuming that the window manager
has been configured properly, the user then chooses the
``Exit'' menu item to shut down X.
xrdb -load $HOME/.Xresources
xsetroot -solid gray &
xbiff -geometry -430+5 &
oclock -geometry 75x75-0-0 &
xload -geometry -80-0 &
xterm -geometry +0+60 -ls &
xterm -geometry +0-100 &
xconsole -geometry -0+0 -fn 5x7 &
exec twm
ENVIRONMENT VARIABLES
DISPLAY This variable gets set to the
name of the display to which
clients should connect. Note
that this gets set, not read.
FILES
$(HOME)/.xinitrc Client to run. Typically a shell
script which runs many programs
in the background.
$(HOME)/.xserverrc Server to run. The default is X.
/etc/X11/xinit/xinitrc Client to run if the user has no
.xinitrc file.
/etc/X11/xinit/xserverrc Client to run if the user has no
.xserverrc file. This file is
not present by default in the
Debian GNU/Linux system.
SEE ALSO
xinit(1), xdm(1), Xserver(1), XFree86(1), Xsession(5)
X Version 11 Release 6.3 2