xrdp implements the Microsoft RDP protocol so a standard Windows/Mac Remote Desktop client can connect to a Linux machine.
sudo dnf install xrdp # or apt-get install xrdp
sudo systemctl enable --now xrdp
sudo firewall-cmd --add-port=3389/tcp --permanent && sudo firewall-cmd --reload # see the firewalld guide
Connect with any RDP client (Microsoft Remote Desktop, xfreerdp, Remmina) to <host>:3389 using a local username and password.
Common gotchas¶
- Desktop environment mismatch: xrdp starts its own session (
~/.xsessionor theXsessionconfigured in/etc/xrdp/), which does not always match the desktop you use at the console. GNOME under Wayland is a frequent source of blank or crashing xrdp sessions; installing a lighter, X11-based desktop (XFCE, MATE) for RDP use, or specifically enabling Xorg, resolves most of these. - Session already active at the console: logging in via RDP as the same user who is logged in locally can conflict. xrdp normally starts a new session rather than sharing the console one.
- Black screen after login: usually a
.xsessionerror; check/var/log/xrdp-sesman.logand~/.xsession-errors.
For occasional GUI access to a headless Linux box, a lightweight desktop plus xrdp is usually simpler to get working reliably than trying to RDP into a full GNOME/Wayland desktop.