Skip to content

Ubuntu Desktop — Enable Remote Desktop (RDP)

Two approaches depending on your Ubuntu version:

Situation Method
Ubuntu 24.04 LTS GNOME Remote Desktop — built-in, no extra software
Ubuntu 22.04 LTS xrdp + Xfce — reliable, battle-tested

Desktop required

Both methods require a desktop environment (GUI) to be installed. Ubuntu Desktop ISOs include GNOME by default — Ubuntu Server does not.


Pre-requisites

  • Ubuntu 22.04 or 24.04 LTS Desktop
  • sudo access
  • UFW installed (default on Ubuntu Desktop)

Method 1: GNOME Remote Desktop (Ubuntu 24.04)

Ubuntu 24.04 ships with gnome-remote-desktop which speaks RDP natively. No extra packages needed.

Install (if missing)

sudo apt install gnome-remote-desktop

System-level mode shows a login screen when you connect — no user needs to be pre-logged in.

Run as root:

Create a self-signed TLS certificate (valid 10 years):

sudo mkdir -p /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop
cd /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop

sudo openssl req -new -x509 -nodes \
  -newkey ec:<(openssl ecparam -name secp384r1) \
  -keyout tls.key -out tls.crt -days 3650 \
  -subj "/CN=gnome-remote-desktop"

sudo chown -R gnome-remote-desktop:gnome-remote-desktop \
  /var/lib/gnome-remote-desktop/.local

Register the certificate, set credentials, and enable RDP (replace rdpuser and YourPassword):

sudo grdctl --system rdp set-tls-key \
  /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.key
sudo grdctl --system rdp set-tls-cert \
  /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.crt
sudo grdctl --system rdp set-credentials rdpuser YourPassword
sudo grdctl --system rdp enable

Apply:

sudo systemctl daemon-reload
sudo systemctl enable --now gnome-remote-desktop
sudo systemctl restart gnome-remote-desktop

Verify — the output should show Status: enabled under RDP:

sudo grdctl --system status

Configure — user-level (GUI)

If you're always logged in at the desktop and just need remote control:

  1. Open SettingsSystemRemote Desktop
  2. Enable Remote Desktop and Remote Control
  3. Set a username and password under Authentication

The service starts automatically when you log in.


Method 2: xrdp (Ubuntu 22.04)

xrdp is a standalone RDP server. It requires an X11-based desktop session — Xfce works best here because it avoids GNOME/Wayland complications.

Install

sudo apt update
sudo apt install xrdp xfce4 xfce4-goodies -y

Configure

echo xfce4-session > ~/.xsession
sudo adduser xrdp ssl-cert
sudo systemctl restart xrdp
sudo systemctl enable xrdp

Verify:

sudo systemctl status xrdp

One session at a time

Do not be logged in locally on the same user account while connecting via RDP — you will get a black screen. Log out of the local session first, or use a dedicated RDP-only user account.


Firewall (UFW)

Allow RDP from your network only (replace with your subnet):

sudo ufw allow from 192.168.1.0/24 to any port 3389
sudo ufw reload

To allow from anywhere (not recommended):

sudo ufw allow 3389/tcp

Connect

From any RDP client:

Host: <machine IP>
Port: 3389 (default)
User: <your Ubuntu username>  or  rdpuser (if set via grdctl)
  • Windows: mstsc → enter IP → connect
  • Linux: remmina or xfreerdp3 /v:<ip> /u:<user>
  • macOS: Microsoft Remote Desktop (App Store)

Find the IP

ip a | grep "inet " | grep -v 127

Common Issues

Symptom Cause Fix
Black screen after login (xrdp) Local session still active on same user Log out locally, then connect via RDP
Black screen after login (xrdp) .xsession missing or wrong Re-run echo xfce4-session > ~/.xsession, restart xrdp
"Unable to connect" Firewall blocking 3389 sudo ufw allow 3389/tcp && sudo ufw reload
"Authentication failed" Wrong credentials For xrdp: use your Linux login. For GNOME RD system-level: use the credentials set via grdctl
GNOME Remote Desktop not found Ubuntu 22.04 / older GNOME Use xrdp (Method 2) instead
grdctl command not found Package not installed sudo apt install gnome-remote-desktop