Remote control Centos 7 Server with XRDP

It saves time and money, if you can configure a server remotely. Most of this work can be done over the ssh protocol. In some situations it’s helpful, also to have a desktop environment available on the system. I’ve tried VNC in the past, but it was very slow.
1 answer

HowTo install XRDP on Centos 7

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