desk-plus › Blog

Remote desktop on Ubuntu: step-by-step setup

Published · desk-plus

Ubuntu has shipped with an RDP server since version 22.04. In many cases you need no extra software for a remote desktop connection to Ubuntu.

Step 1: enable remote desktop

  • Ubuntu 24.04: Settings → System → Remote Desktop. "Desktop Sharing" shares the running session. "Remote Login" lets you connect when nobody is signed in at the machine.
  • Ubuntu 22.04: Settings → Sharing → Remote Desktop.

Switch it on and set a user name and a separate password for the connection.

Step 2: find the machine's address

hostname -I

The first address in the output is normally the one on your local network.

Step 3: connect

  • From Windows: open Remote Desktop Connection, enter the address and sign in.
  • From Linux: start Remmina and choose the RDP protocol.
  • From macOS: use Microsoft's remote desktop app ("Windows App").

Ubuntu Server and other desktop environments

On a server without GNOME, or with Xfce, xrdp is the usual RDP server on Ubuntu:

sudo apt update
sudo apt install xrdp
sudo systemctl enable --now xrdp

The details are in our xrdp guide.

Common problems

  • Connection refused: the firewall blocks port 3389. On a local network, sudo ufw allow from 192.168.0.0/16 to any port 3389 helps.
  • Black screen with xrdp: the same user is already signed in locally. Sign out locally and connect again.
  • Session ends when the screen locks: desktop sharing needs an unlocked session. Use remote login for unattended access.

Connecting safely over the internet

Do not forward port 3389 on your router. Use a VPN or an SSH tunnel:

ssh -L 3389:localhost:3389 user@your-server

The alternative without a machine of your own

If the Ubuntu machine only runs so that you can reach it remotely, a rented Linux desktop can be simpler: it is always reachable, backed up, and opens directly in the browser. At desk-plus that starts at €9.74 a month.

A Linux desktop in your browser from €9.74 a monthKDE Plasma, GNOME or Xfce. Cancel monthly, no setup fee.
Configure your desktop