Installing lightweight desktop environment
yum install epel-release
yum groupinstall "X Window system"
yum groupinstall xfce
Start the Window System
systemctl isolate graphical.target
Start Window System on boot
sudo systemctl set-default graphical.target
Installing xrdp deamon
yum install xrdp
Because xfce isn’t the default desktop environment in Centos there are some more configurations steps:
Create .Xclients in the Users directory
vi ~/.Xclients
add the lines
#!/bin/bash
XFCE="$(which xfce4-session 2>/dev/null)"
exec "$XFCE"
Make it executable:
chmod +x .Xclients
restart the xrdp server:
sudo service xrdp restart
In the case of a broken connection, there is an option to reconnect by
adding this to /etc/xrdp/xrdp.ini
[xrdp8]
name=Reconnect
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=5910