In most cases, the Red Hat Enterprise Linux installer configures a machine to boot into a graphical login environment, known as runlevel 5. It is possible, however, to boot into a text-only multi-user mode called runlevel 3 and begin an X session from there.
When in runlevel 3, the best way to start an X session is to log in and type
command is a front-end to the
command, which launches the X server (
) and connects X client applications to it. Because the user is already logged into the system at runlevel 3,
does not launch a display manager or authenticate users. See Section C.5.2, “Runlevel 5”
for more information about display managers.
startx command is executed, it searches for the
.xinitrc file in the user's home directory to define the desktop environment and possibly other X client applications to run. If no
.xinitrc file is present, it uses the system default
/etc/X11/xinit/xinitrc file instead.
xinitrc script then searches for user-defined files and default system files, including
.Xkbmap in the user's home directory, and
Xkbmap in the
/etc/X11/ directory. The
Xkbmap files, if they exist, are used by the
xmodmap utility to configure the keyboard. The
Xresources file is read to assign specific preference values to applications.
After setting the above options, the
xinitrc script executes all scripts located in the
/etc/X11/xinit/xinitrc.d/ directory. One important script in this directory is
xinput.sh, which configures settings such as the default language.
xinitrc script attempts to execute
.Xclients in the user's home directory and turns to
/etc/X11/xinit/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 in the
.Xclients-default file. If
.Xclients does not exist in the user's home directory, the standard
/etc/X11/xinit/Xclients script attempts to start another desktop environment, trying GNOME first, then KDE, followed by
When in runlevel 3, the user is returned to a text mode user session after ending an X session.