DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

startx(X)


startx -- start the X server and default clients

Syntax

startx [ -t] [-- [server] [display] [server_options]]

Description

startx is a script in /usr/bin that starts an X session. If executed from the console, startx sets up the appropriate environment variables, then runs xinit(X) to start the X server. startx attempts to start the server on display :0. If that display is already running, startx cycles through the displays until it finds one that is not running.

If the DISPLAY variable specifies a remote server, such as an X terminal, you can use startx to set up the appropriate environment variables and initial clients without running xinit (see the -t option below).

Options


-t
does not start up the server, but executes the rest of the startx script. The -t option can be used when running the software from remote X servers such as X terminals. scologin(XC) uses startx -t to start the X server.

-- [server] [display] [server_options]]
allows users to override or augment the default command line that starts the X server.

If an explicit server name is not given and the first argument following the double dash (--) is a colon followed by a digit, that number is interpreted as the display number. All remaining arguments are appended to the server command line. For example, to run the Xsco server with a custom color database named colors (that is, the colors.dir and colors.pag files) in your $HOME directory, execute the following command line:

startx -- -co $HOME\/colors


NOTE: If the -t option is used, the -- option is ignored.

You must set the DISPLAY environment variable to your display name prior to executing startx -t. (See X(X) for more information on display names.)

Customizing X sessions

To specify which X clients are run automatically as part of the session, startx reads /usr/lib/X11/sys.startxrc, which contains a list of command lines. If you want to start a different set of clients than those specified in /usr/lib/X11/sys.startxrc, copy this file to $HOME/.startxrc, and include the desired client command lines. startx only reads /usr/lib/X11/sys.startxrc if .startxrc is not found in your $HOME directory.

Each line in .startxrc can contain only one client name. Place an ampersand (&) after each line except for the last line in the file, so that all but the last client run in the background. Typically, the window manager, mwm, is the last client listed in the file, so that the X session is terminated when you quit the window manager.

Example

The following is an example of a .startxrc file:
   #
   # Clients started by default by startx
   # The last client should not be started in the background.
   #
   xrdb -load $HOME/.Xresources
   xsetroot -solid black &
   xterm &
   xclock &
   xeyes &
   mwm

Notes

If a client is in a directory other than /usr/bin/X11, you must give its full pathname when you list it in $HOME/.startxrc or /usr/lib/X11/sys.startxrc.

See also

X(X), Xsco(X), xinit(X)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003