How to Install Desktop Environment on CentOS 7 Oracle Cloud Instance
Installation and Difference between GNOME, MATE and XFCE
This guide shows how to install Desktop Environment on CentOS 7 the same procedure is also applicable if you have CentOS 7 instance installed on Oracle Cloud Always Free, Amazon AWS Free Tier, Google Cloud Always Free and Microsoft Azure Free Tier, IBM Cloud Free Tier, etc see the comparison between all the cloud service providers here.
There are several Desktop Environments available for the CentOS 7 for example GNOME, MATE, XFCE, etc.
All the desktop environments are having different requirements for the resources, if I rate with respect to resources XFCE is the least resource requiring Desktop as per my experience. I will rate MATE on second position. GNOME is a heavy resource desktop environment.
Similarly their look also depends on how much resource these environments use. I would rate GNOME as a best out of these three due to its look and graphics.
Before you install any desktop environment you will need to install XRDP to connect with your remote desktop.
How to Install XRDP
sudo yum install -y epel-release
yum -y install xrdp tigervnc-server
sudo systemctl enable xrdp
sudo systemctl start xrdp
chcon --type=bin_t /usr/sbin/xrdp
chcon --type=bin_t /usr/sbin/xrdp-sesman
How to Open firewall ports
sudo firewall-cmd --add-port=3350/tcp --permanent
sudo firewall-cmd --add-port=3389/tcp --permanent
How to Install GNOME Desktop Environment
Better to start with
yum -y update
Install GNOME
yum -y groupinstall "GNOME Desktop" "Graphical Administration Tools" -y
or
sudo yum groupinstall "GNOME DESKTOP" "Graphical Administration Tools" -y
echo "gnome-session" > ~/.Xclients
chmod +x ~/.Xclients
sudo systemctl restart xrdp.service
Setting GUI target
Since VPS are mostly with the command line interface you will need to set GUI as a boot target so that every time you restart the VPS the OS should boot in GUI environment:
systemctl get-default
if the output says multi-user.target than you will need to run below command:
sudo systemctl set-default graphical.target
and than reboot by below command
reboot
DONE!
Now you can start Remote Desktop in Windows
If you can’t find remote desktop in the start menu you can use
Window Key + R and type mstsc.exe
Now go to your Oracle Cloud Infrastructure Console on the left menu Compute > Instance and select your instance

Copy your public IP and paste in Compute: box of Remote Desktop and connect.
XRDP login menu will popup you will need to login with the “root” user and the password you set for the “root” user

This is how GNOME looks:

How to Install XFCE Desktop Environment
This is preferred desktop environment if you are using VPS system with less resources for example if you are using Oracle Cloud Always Free account this environment recommended.
However if you are a graphics fan you can stick to GNOME.
To Install XFCE start with
sudo yum -y install epel-release
sudo yum -y groupinstall "X Window system"
sudo yum groupinstall -y "Xfce"
and to add in XRDP sessions XFCE environment run below command:
echo "xfce4-session" > ~/.Xclients
chmod a+x ~/.Xclients
sudo systemctl restart xrdp.service
and reboot
reboot
How to Install MATE Desktop Environment
To install MATE its better to uninstall XFCE or GNOME environment.
To uninstall XFCE:
sudo yum groupremove -y "Xfce"
sudo yum remove -y libxfce4*
Install MATE by following command:
sudo yum -y groupinstall "X Window system"
sudo yum -y groupinstall "MATE Desktop"
echo "mate-session" > ~/.Xclients
chmod +x ~/.Xclients
sudo systemctl restart xrdp.service
Reboot using this command:
init 6
How to Install KDE Desktop Environment
To install KDE you will need X Window system as well to install both in one command use below command:
sudo yum groupinstall 'KDE' 'X Window System'
echo "startkde" > ~/.Xclients
chmod +x ~/.Xclients
sudo systemctl restart xrdp.service
Connect with Remote Desktop as explained above.
KDE environment looks like as shown below:
If you like this post please share with your friends.
Please post your questions or comments below.
If you are not sure how to Install CentOS 7 on Oracle Cloud or Amazon AWS Instance follow this guide:
How to Install CentOS 7 on Oracle Cloud or Amazon AWS – Coming Soon
How to Create Account on Oracle Cloud and Launch VM Instance – Coming Soon