DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Customizing startup of the Graphical Environment

Running the startx script

If you want to start a Graphical Environment session from the command line, you must run the startx script:

startx &

If you started a session by logging in through the scologin window, scologin's Xsession-SHELL file also runs the startx script, with the -t option. See ``Defining X server sessions'' for more information on the Xsession-SHELL file.

If the startx script is run without any options, it:

If the startx script is executed with the -t option, as it is from the scologin Xsession-SHELL file, the script does all of the tasks above, including modifying the $PATH environment variable. However, the -t option does not run xinit to start the X server. In the case of the scologin display manager, it is unnecessary to start the server because it is already running. The -t option is also useful if you want to run a Graphical Environment session on an X terminal, which uses its own internal server. For more information on using the Graphical Environment with X terminals, see ``Using X terminals''.


NOTE: If you run the startx script with the -t option, you must set the $DISPLAY environment variable before you run startx. Otherwise, you see the error message:
   DISPLAY environment variable not set

For information on the $DISPLAY environment variable, see ``Using environment variables''.


The /usr/lib/X11/sys.startxrc file specifies the clients and commands that are run by default in X server sessions for all users on the system. Because the default configuration uses the session manager to control Graphical Environment sessions, scosession is the only client that is run by the sys.startxrc file. This file contains the following line:

   exec scosession 2> /dev/null

If you want your system to use scosession to manage Graphical Environment sessions, you should not modify this file.

The startx script also looks for a local .startxrc file, located in a user's home directory. If a user wants to use the session manager, there is no need to put a .startxrc file in $HOME. The sys.startxrc file is used to run scosession.

If, however, a user does not want to run scosession, a .startxrc file is needed in $HOME to start the desired clients, particularly the window manager. The .startxrc file is not placed in a user's home directory by default. To create this file, copy /usr/lib/X11/sys.startxrc to .startxrc in your home directory.


NOTE: You are strongly urged to use scosession to control the clients you want to run automatically in a Graphical Environment session, instead of adding clients to either $HOME/.startxrc or /usr/lib/X11/sys.startxrc. If you do not use the session manager, you may accidentally overlook starting an important element of the Graphical Environment, resulting in the loss of some functionality.

See also:


© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 26 May 2005