
AzCLI – export VMs related data to CSV
November 17, 2020
Migrate to CentOS Stream
February 17, 2022How to add a GUI on CentOS 7 and connect to it via xRDP – step by step instructions
In this tutorial we’ll cover the steps to install different Desktop Environments on your remote CentOS 7 machine and the steps to install xRDP on your remote CentOS 7 machine. We’ll also show you how to connect to your Centos 7 machine via Remote Desktop Connection.
xRDP is a a free and open source Remote Desktop Protocol Server that allows other operating systems, other than Windows, to provide a fully functional remote desktop experience. xRDP is fully compatible with rdesktop, FreeRDP and even Microsoft’s Remote Desktop Client.
Prerequisites
- Recommended (but not required): a
sudo user
when proceeding to make any major changes to your system. - A machine running CentOS 7 with recommended (not mandatory) 2GB of RAM.
1. Install the GUI of your choice
1.1. XFCE Desktop
$ sudo yum install -y epel-release $ sudo yum groupinstall -y "Xfce" $ sudo ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target $ sudo reboot
Create ~/.Xclients
$ echo "xfce4-session" > ~/.Xclients $ chmod a+x ~/.Xclients
1.2. MATE Desktop
$ sudo yum install -y epel-release $ sudo yum groupinstall -y "MATE Desktop" $ sudo ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target $ sudo reboot
Create ~/.Xclients
$ echo "mate-session" > ~/.Xclients $ chmod a+x ~/.Xclients
1.3 GNOME 3 Desktop
$ sudo yum groupinstall "GNOME Desktop" "Graphical Administration Tools" $ sudo ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target $ sudo reboot
1.4. KDE Desktop
$ sudo yum groupinstall -y "KDE Plasma Workspaces" $ sudo ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target $ sudo reboot
Create ~/.Xclients
$ echo "startkde" > ~/.Xclients $ chmod a+x ~/.Xclients
2. Install xRDP server on your CentOS 7 box
$ sudo yum install -y epel-release $ sudo yum install -y xrdp $ sudo systemctl enable xrdp $ sudo systemctl start xrdp
3. Open xRDP port in firewall
$ sudo firewall-cmd --add-port=3389/tcp --permanent $ sudo firewall-cmd --reload
Finaly, now you can connect to your Linux desktop environment via xRDP.