deliberate.codes

Practical AI for data & software engineers. What works, no hype.

Configure XRDP and XFCE on Debian 13

A minimal recipe for a working XRDP + XFCE desktop on Debian 13 that holds up for any user, not just the one you happened to set up first.

1. Install the packages#

sudo apt update
sudo apt install xrdp xfce4 xfce4-goodies

2. Use the stock startwm.sh#

Custom startwm.sh scripts are the most common reason fresh users fail to get a desktop while the admin account works. Keep /etc/xrdp/startwm.sh at the package default:

#!/bin/sh
if test -r /etc/profile; then
    . /etc/profile
fi
if test -r ~/.profile; then
    . ~/.profile
fi
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession
sudo chmod 755 /etc/xrdp/startwm.sh

3. Set the system X session manager to XFCE#

XRDP hands off to whatever x-session-manager resolves to. Point it at XFCE explicitly:

sudo update-alternatives --config x-session-manager
# pick xfce4-session

4. Skip per-user .xsession files#

Don’t drop .xsession into new users’ home directories. The system default Xsession path picks the right session manager on its own, and a hand-edited .xsession shadows it.

5. Start XRDP#

sudo systemctl enable --now xrdp

Connect from any RDP client to port 3389. If a fresh account still can’t get a desktop while the original works, the desktop session is failing rather than the RDP transport. Check journalctl -u xrdp-sesman for the exit code, then switch that user to VNC if you don’t want to keep debugging the X handoff.