XRDP Linux server setup

Sometimes it’s convenient to have a server with a gui in a datacentre, for instance when you need to generate large images from an internal sysops web gui, and process those later.

When it’s a mostly Linux datacenter, you could deploy a minimal XWindow server on CentOS 7 like we usually do these days.

To connect to it, RDP can be most convenient, if like me, most of your other sysops stuff is done through RDP.

So setup XRDP.  Here goes.

(assuming minimal XWindows is already up and running)


Install EPEL releas repo which has XRDP, and install needed packages

yum -y install epel-release
yum -y install xrdp tigervnc-server


Default settings are usually fine for me

vim /etc/xrdp/xrdp.ini


need to slip the RDP tcp port though the firewall

firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload


If you haven’t set SELinux to permissive mode, you’ll need this as well:

chcon -t bin_t /usr/sbin/xrdp
chcon -t bin_t /usr/sbin/xrdp-sesman


start service and check if its listening, any other status messages

systemctl start xrdp
netstat -antup | grep xrdp
systemctl status xrdp


If you’ve set your server to start XWindows at boot, you might as well enable the XRDP service

systemctl enable xrdp