Wednesday, April 2, 2008

How do I disable X from loading on start up, but start and exit the X Window System when I need to?

In order to disable X from loading during the boot sequence, it is recommended that you boot your system to runlevel 3. Booting your system to runlevel 3 will still allow you to log in as a system user but will provide a command line login instead of a graphical login. Once you are successfully logged in, you can then use the startx command to bring your system into graphical mode or runlevel 5:

startx
In order to shut down GNOME or KDE, go to your Main Menu and select the "Log Out" menu option. This should shut down Xwindows and return you to a command line or runlevel 3. In order to configure your system to boot into runlevel 3, you can modify the /etc/inittab file and change the id initdefault line to runlevel 3 as shown below:

# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:

No comments: