sudo apt update sudo apt install xfce4 xfce4-goodies xrdp -y sudo apt install xorgxrdp xserver-xorg-core -y
echo "xfce4-session" > ~/.xsession chmod +x ~/.xsession
sudo nano /etc/xrdp/startwm.sh # test -x /etc/X11/Xsession && exec /etc/X11/Xsession # exec /bin/sh /etc/X11/Xsession startxfce4 exit 0
sudo adduser xrdp ssl-cert
sudo systemctl enable xrdp sudo ufw allow 3389
sudo systemctl restart xrdp sudo ufw allow 3389
/etc/sysctl.conf:net.ipv6.conf.all.disable_ipv6=1
.cer file to your local computer.sudo make-ssl-cert generate-default-snakeoil --force-overwrite
My server Olympus does not allow to connect despite of countless attempts to find the culprit of Permission denied errors. Since it's the same debian version like my server Hestia I assume there is an incompatibility with the display hardware or it's firmware. I finally found a way to connect through the Xvnc backend (instead of Xorg).
startwm.sh configurationsudo apt-get install --reinstall xrdp
sudo apt update sudo apt install -y dbus-x11
.xsession file from scratch to hook directly into the new bus:rm -f ~/.xsession nano ~/.xsession
#!/bin/sh export XDG_SESSION_TYPE=x11 export XDG_CURRENT_DESKTOP=XFCE export XDG_MENU_PREFIX=xfce- # Spawn an isolated remote session D-Bus pipeline eval $(dbus-launch --sh-syntax --exit-with-session) exec xfce4-session
chmod +x ~/.xsession
sudo nano /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla
[Allow Colord all Users] Identity=unix-user:* Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile ResultAny=no ResultInactive=no ResultActive=yes
/etc/xrdp/xrdp.ini and change it to:autorun=Xvnc
sudo systemctl daemon-reload sudo systemctl restart xrdp sudo loginctl terminate-user $USER
@echo off :: bco, 2026-08-16 :: establish a SSH connection with tunnel to your server start wsl ssh -p <ssh-port> -L <external-rdp-port>:localhost:3389 <domain-name-or-ip> :: Wait for 5 seconds timeout /t 5 /nobreak :: open a RDP session start mstsc /v:localhost:<external-rdp-port>
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client, split into a recent history list and a permanent record of servers accessed. It also saves connection configurations and recent taskbar shortcuts in specific user folders.HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\DefaultHKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers (contains individual subkeys for each host with username hints)%USERPROFILE%\Documents\default.rdp (a hidden file storing settings for the most recent or default session)%APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\ (stores pinned and recent RDP launch history)TERMSRV/<remote-computer-name>lspci -k | grep -EA3 'VGA|3D|Display'
bash sudo nano /etc/xrdp/startwm.sh. Scroll down and insert the following two unset commands:# test -x /etc/X11/Xsession && exec /etc/X11/Xsession # exec /bin/sh /etc/X11/Xsession unset DBUS_SESSION_BUS_ADDRESS unset XDG_RUNTIME_DIR
sudo systemctl restart xrdp
rm -f ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml
sudo apt install tigervnc-standalone-server -y sudo systemctl restart xrdp
apt list --installed xrdp*
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers. Locate the subfolder matching the target server name or IP that is suppressing your prompt.Delete that specific server key/folder.Re-launch Remote Desktop and initiate a fresh connection to force the new certificate prompt to appear.sudo adduser xrdp video sudo adduser xrdp render
Xwrapper.config earlier, systemd's local display policies can still block it. Open or create the Xwrapper configuration file, ensure it contains only these two lines, removing everything else:sudo nano /etc/X11/Xwrapper.config textallowed_users=anybody needs_root_rights=no
sudo nano /etc/xrdp/startwm.sh unset DBUS_SESSION_BUS_ADDRESS unset XDG_RUNTIME_DIR export $(dbus-launch) startxfce4