FreeBSD, Debian RDP server setup using xrdp

So.
Some time ago I’m used VNC for remote connection to GUI interface of my FreeBSD, Debian computer machines.
Today I decide to try microsoft RDP using xRDP.
“xRDP is Microsoft’s free and open-source implementation of RDP (Remote Desktop Protocol) which allows non-Microsoft Windows operating systems (such as Linux and BSD) to provide a fully functional RDP-compatible remote desktop.”
Let start.

FreeBSD variant:
Quick variant:
pkg install xrdp
Or if you prefer to build it from ports:
cd /usr/ports/net/xrdp/ && make install clean
Once that’s done, you’ll need to edit /etc/rc.conf and add the following lines:
xrdp_enable="YES"
xrdp_sesman_enable="YES"
Let’s start xrdp and xrdp_sesman
/usr/local/etc/rc.d/xrdp start
/usr/local/etc/rc.d/xrdp-sesman start
Configuring your Window Manager.
If we connect now, you’ll go to Xterm. Not ideal. So if you open up /usr/local/etc/xrdp/startwm.sh as root, you’ll see your options.
I’m using KDE so my variant it’s:

#!/bin/sh
exec startplasma-x11

Debian variant:
apt-get update
apt-get dist-upgrade
apt-get install xrdp
systemctl status xrdp
If something not Okay:
sudo systemctl enable --now xrdp
Add XRDP user to SSL-Cert group:
sudo adduser xrdp ssl-cert
Also I need to add my user account to xrdp group.
Because without these actions I have problems with establishing connection to xRDP.

sudo adduser username xrdp
Restart XRDP server
sudo systemctl restart xrdp

That’s all fokls.

Thanks to:
Jeremy Morgan

Setting up Remote Desktop in FreeBSD

Heyan Maurya
Commands to Install Xrdp Server on Debian 11 Bullseye Linux


Leave a comment