18.2 The X Window System 277
Red Hat Linux system.
In order to get X started, you’ll first need to log in. Do so (using your non-root account), and then
enter the startx command. The screen should go blank, and (after a short delay) you should see
a graphical desktop with one or more windows. The appearance of the desktop you’ll see will vary,
depending on the packages you installed and other variables.
Starting X Automatically
Please Note: Make sure you verify that your X configuration works properly before making X start
automatically. Failure to do so can make it difficult to log into your Red Hat Linux system. If you
haven’t done so already, review the previous section before continuing.
It is possible to configure your Red Hat Linux system such that X will start automatically whenever
the system is booted. When configured in this manner, xdm will run, which will present a graphically-
oriented login screen. After logging in, you will have a regular X session running, just as if you had
issued a startx command manually.
Here’s a quick overview of how it’sdone:
Test xdm using telinit.
Edit /etc/inittab.
Reboot.
Let’s look at each step in more detail.
Testing xdm Using telinit – The telinit command is used to change your Red Hat Linux
system’s “run level.” It is the run level that controls various aspects of system operation, including
whether xdm should be started or not. Since xdm is started at run level 5, you’ll need to issue the
command:
/sbin/telinit 5
Please Note: You will need to be logged in as root in order to use telinit. Also note that you
should not be running anything else on your Red Hat Linux system when you change run levels, as
any running programs may be killed by the run level change.
If everything is configured properly, after a short delay you should see an xdm login screen. Log in,
verifying that an X desktop appears. Then log out to make sure that xdm reappears. If it does, your
system is configured properly to automatically start X. If there are problems, you can go back to run
level 3 using telinit (ie, “/sbin/telinit 3”), or by rebooting.
Commenti su questo manuale