Applies to: xrdp 0.9.24 on Ubuntu 24.04 (server or desktop)

xrdp lets you connect to a Linux desktop with the normal Windows Remote Desktop app (or any RDP client) on port 3389. We installed xrdp 0.9.24 on Ubuntu 24.04. A server has no desktop by default, so install a light one such as Xfce first.

1. Install a desktop (servers only)

sudo apt update
sudo apt install xfce4 xfce4-goodies

This needs about 1 to 2 GB of disk. Xfce is lighter than Ubuntu’s default GNOME and works better over RDP.

2. Install xrdp

sudo apt install xrdp
sudo adduser xrdp ssl-cert          # lets xrdp read its certificate key
sudo systemctl enable --now xrdp

In our test, the xrdp user wasn’t in the ssl-cert group after installation, so add it as shown.

3. Use Xfce for your sessions

echo "startxfce4" > ~/.xsession

Run this as the user who will log in.

4. Open the firewall, carefully

sudo ufw allow from 203.0.113.5 to any port 3389 proto tcp

Allow only your own IP address; an open RDP port is constantly attacked. Even better, keep 3389 closed and use an SSH tunnel: ssh -L 3389:localhost:3389 user@server, then connect to localhost.

5. Connect

Open Remote Desktop Connection (Windows) or Windows App (macOS), enter the server’s IP address, and log in with your Linux user name and password.

Troubleshooting

  • Black or blank screen: log out of any local desktop session for the same user, or check ~/.xsession.
  • Connection refused: systemctl status xrdp and sudo ss -ltnp | grep 3389.

On Red Hat-based systems: install xrdp on RHEL. A full Windows desktop instead: Windows VPS.

Ucartz services for this topic

Was this answer helpful? 0 Users Found This Useful (0 Votes)