Install XWindows (Graphical mode) in Linux

 

If you recently installed linux (CentOS/Fedora/RedHat) with text mode and now want to use its Graphical GUI which was left unchecked during the installation, you can install it from Internet very easily.

If you are not already root, switch users to the root account:

su -

install the X Window System and a graphical desktop environment. For example, to install the GNOME desktop environment, use this command

yum groupinstall "X Window System" "Desktop"

That will install necessary files for XWindows and default Desktop (GNome), for install KDE as desktop environment type:

yum groupinstall "X Window System" "KDE Desktop"

OR if you want to install Sound/Video Applets to be install, type this:

yum groupinstall "X Window System" '"Desktop" "Sound and Video"

This step may take some time as your Fedora/CentOS system downloads and installs additional software. You may be asked to provide the installation media depending on your original installation source.

But if you think GUI is already installed, check by typing:

startx

Now if your system is showing text mode when boot even you have XWindows Installed, you can change login preference from :

vi /etc/inittab

By default it will show 3 for text mode like this

id:3:initdefault:

Change it to 5:

# 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:5:initdefault: