How to install a graphical desktop on Linux

Home > Search > How-to
  by

When first installing Linux, the installer will have an option to install a graphical desktop environment. If you have already installed a minimal version of Linux that lacks a graphical desktop environment, install X Server and Xorg. X server is a display server. A display server is what makes it possible to display a graphical display manager, desktop environment, and window manager.

[root@server1 ~]# yum groupinstall "X Window System"
[root@server1 ~]# yum install xorg*

 

Some distributions, such as CentOS and Red Hat, will require EPEL.

[root@server1 ~]# yum install epel-release

 


INSTALL DISPLAY MANAGER

apt-get or yum can be used to install your preferred display manager (aka login manager). A display manager starts the greeter. A greeter displays the graphical login screen. You would probably only install one display manager.

Install Gnome Display Manager.

[root@server1 ~]# yum install gdm

 

Install KDE Display Manager.

[root@server1 ~]# yum install kdm

 

Install Mint Display Manager.

[root@server1 ~]# yum install mdm

 

Install Light Display Manager.

[root@server1 ~]# yum install lightdm

 

Install X Display Manager.

[root@server1 ~]# yum install xdm

 

GNOME greeter

 

LightDM greeter. Refer to how to configure LightDM for additional things that must be done to use LightDM.

 

X greeter. The X Display Manager is very limited. All you can do is to sign into the default Desktop Environment. The X Display Manager greeter does not have an option to choose a session. In a greeter, a session is the Desktop Environment you would like to use.

 


INSTALL DESKTOP ENVIRONMENT

  • Gnome is the default desktop used by Centos and Fedora.
  • KDE.
  • XFCE

 

Use one of the following commands to install the GNOME Desktop Environment:

[root@server1 ~]# yum groupinstall "GNOME desktop environment"
[root@server1 ~]# yum groupinstall gnome-desktop
[root@server1 ~]# apt-get install gnome gnome-shell

GNOME Desktop Environment:

 

Install KDE:

[root@server1 ~]# yum groups install "KDE Plasma Workspaces"


Ubuntu Destkop

 

Install XFCE:

[root@server1 ~]# yum -y install epel-release
[root@server1 ~]# yum --enablerepo=epel -y groups install "Xfce" 

 

Install Cinnamon:

[root@server1 ~]# yum -y install epel-release
[root@server1 ~]# yum --enablerepo=epel -y install cinnamon*

 

Use the following command to verify the appropriate desktop environment is being used (kde in this example).

[root@server1 ~]# echo $DESKTOP_SESSION
kde

 


SET DEFAULT DISPLAY MANAGER AND DESKTOP ENVIRONMENT

If you have more than one display manager or desktop environment installed, you may need to configure your default display manager or default desktop environment.

On some systems, the /etc/X11/default-display-manager file contains the default display manager being used by the system. Be careful editing the default-display-manager file. If there is a grammatical error, or if the alternative display manager is not properly set up or supported, the system may hang at boot.

[root@server1 ~]# cat /etc/X11/default-display-manager
/usr/sbin/gdm

 

On some systems, the /etc/sysconfig/desktop file contains the default display manager and desktop environment. 

[root@server1 ~]# cat /etc/sysconfig/desktop
DESKTOP="GNOME"
DISPLAYMANAGER="GNOME"

 

If the appropriate greeter is not showing, install the system-switch-displaymanager package.

[root@server1 ~]# yum install system-switch-displaymanager

 

Replace value with your preferred display manager.

[root@server1 ~]# system-switch-displaymanager value

 

Start the display manager. Replace value with the name of the display manager you are using. 

[root@server1 ~]# systemctl start value.service

 


ON BOOT

The system can also be configured to default to a graphical environment on boot.

If for some reason the system does not default to a graphical environment, use the startx command to start X which will produce a graphical environment. 

[root@server1 ~]# startx

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments