If you want to remotely access your Debian 12 desktop using Remote Desktop Protocol (RDP), XRDP is a great choice. Here’s a quick guide to get it up and running with the lightweight XFCE desktop.
1. Install XRDP and XFCE dependencies
Open a terminal and run:
sudo apt update && sudo apt install xrdp xfce4 xfce4-goodies -y
2. Enable and start XRDP
sudo systemctl enable xrdp --now
Check status:
systemctl status xrdp
It should be active (running).
3. Add xrdp user to ssl-cert group
sudo adduser xrdp ssl-cert
4. Create a new user for XRDP
For example:
sudo adduser rdpuser
(set password when prompted).
5. Configure session for XRDP
Create/edit .xsession for your new user (rdpuser):
sudo -u rdpuser bash -c "echo 'startxfce4' > /home/rdpuser/.xsession"
Also ensure .xsession is executable:
sudo chmod +x /home/rdpuser/.xsession
6. Allow XFCE as default for XRDP
Edit the startwm.sh:
sudo nano /etc/xrdp/startwm.sh
Before the lines:
. /etc/X11/Xsession
add:
startxfce4
exit 0
So it looks like:
# Start xfce for xrdp sessions
startxfce4
exit 0
. /etc/X11/Xsession
7. Restart XRDP
sudo systemctl restart xrdp