Table of Contents

XRDP

Debian Host

Windows 11 Client

Self-signed certificates

Trust the Existing Self-Signed Certificate

Hostname changed

Using Xvnc backend

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).

  1. Completely Wipe the Modified Global Scripts. Overwriting global configuration structures can trap xRDP in an infinite loop. Reverting the global script to its native behavior allows you to handle everything safely within your specific user profile.
    • Run this over SSH to restore the stock startwm.sh configuration
      sudo apt-get install --reinstall xrdp
  2. Isolate the D-Bus Session Daemon. Standard users under Debian 12 require an isolated message bus instance (dbus-launch) when launching a graphical interface inside an unprivileged virtual frame. Without it, the environment crashes silently into a black void and drops the connection.
    • Install the missing D-Bus utility core package via SSH:
      sudo apt update
      sudo apt install -y dbus-x11
    • Next, rewrite your user account's personal .xsession file from scratch to hook directly into the new bus:
      rm -f ~/.xsession
      nano ~/.xsession
    • Paste this explicit configuration sequence:
      #!/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
    • Save the file (Ctrl+O, Enter, Ctrl+X) and set the execution flag:
      chmod +x ~/.xsession
  3. Change Polkit Permissions for Remote Standard Users. Debian's local security policy (Polkit) blocks remote non-root users from claiming network or display profiles managed by systemd.
    • Create a dedicated exception rule file:
      sudo nano /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla
    • Paste this exact permission block inside:
      [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
    • Save and close the file.
  4. Set backend default. Find the line autorun= in file /etc/xrdp/xrdp.ini and change it to:
    autorun=Xvnc
  5. Restart services and Test the Xvnc Path. Flush the underlying active sessions and trigger a complete daemon reload
    sudo systemctl daemon-reload
    sudo systemctl restart xrdp
    sudo loginctl terminate-user $USER
  6. Open the Windows 11 Remote Desktop Client (mstsc) and connect. Choose Xvnc on the drop-down menu and type your standard username. The isolated D-Bus pipeline will now safely bypass systemd's local hardware locks and successfully display your XFCE desktop environment.

Automatically start session on Windows client

Fix registry entries of RDP client

Trouble Shooting