X Version 11 (Release 6.1)

startx(X1M)


startx -- start the X server and default clients

Synopsis

startx [ -t] [ -cde] [-- [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(X1M) 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 uses startx -t to start the X server.

-cde
starts a CDE desktop session

-- [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(X1M) 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.

Examples

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 &
   pmwm

References

X(X1M), Xsco(X1M), xinit(X1M)

Notices

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.

When startx(X1M) is used to start a pmwm(X1) session, the X session continues to run in an xterm after the pmwm session is closed.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004