Red Hat LINUX 7.2 Reference Manual page 122

Hide thumbs Also See for LINUX 7.2:
Table of Contents

Advertisement

122
Chapter 6:X Servers and Clients
provide any services utilized by most users. Runlevel 5 is similar to 3, except that it automatically
starts X and provides a graphical login screen. Many workstation users prefer this method, because it
never forces them to see a command prompt.
The default runlevel used when your system boots can be found in the /etc/inittab file. If you
have a line in that file that looks like id:3:initdefault:, then your system will boot to runlevel
3. If you have a line that looks like id:5:initdefault:, your system is set to boot into runlevel
5. As root, change the runlevel number in this file to set a different default. Save the file and restart
your system to verify that it boots to the correct runlevel. More information on runlevels can be found
in Section 3.4, Init Runlevels.
Each of these runlevels start X in a slightly different way.
6.4.1 Runlevel 3: startx
When in runlevel 3, the preferred way to start an X session is to type the startx command. startx
is a front-end to the xinit program, which launches the XFree86 server and connects the X clients
to it. Because you must already be logged into the system at runlevel 3 to be able to type commands,
startx is only designed to bring up certain X clients, such as a desktop environment, in a particular
manner. It does not provide any user authentication.
When startx begins, it looks for a user-defined .xinitrc file in the user's home directory
to define the X clients to run. If it does not find that file present, it will run the system default
/etc/X11/xinit/xinitrc script instead. The startx script then does the same thing with
the .xserverrc file, looking for it in the user's home directory and then running the default
/etc/X11/xinit/xserverrc script if it cannot be found. Since many different X clients
exist, the xinitrc files are very important. The xserverrc script is less important. It only sets
the X server to connect to the X clients. Since the default X server is already configured with the
/etc/X11/X link, Red Hat Linux does not install a default xserverrc.
The default xinitrc script then looks for user-defined files and default system files, including
.Xresources, .Xmodmap, and .Xkbmap in the user's home directory and Xresources,
Xmodmap, and Xkbmap in the /etc/X11 directory. The Xmodmap and Xkbmap files, if they
exist, are used by the xmodmap utility to configure the keyboard. The Xresources files are read
to assign specific preference values to particular applications.
After setting these options, the xinitrc script executes all scripts in /etc/X11/xinit/xini-
trc.d. One important script in this directory is xinput, which configures settings such as the
default language to use and the desktop environment to start (from /etc/sysconfig/desktop).
Next, the xinitrc script tries to execute .Xclients in the user's home directory, and turns to
/etc/X11/init/Xclients if it cannot be found. The purpose of the Xclients file is to
start the desktop environment or, possibly, just a basic window manager. The .Xclients script
in the user's home directory starts the user-specified desktop environment or window manager in

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the LINUX 7.2 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Linux 7.2

Table of Contents