Skip to content

Instantly share code, notes, and snippets.

@mayurah
Created February 26, 2025 17:41
Show Gist options
  • Save mayurah/48b6ee43fe60b8c32226bc1eba2f2198 to your computer and use it in GitHub Desktop.
Save mayurah/48b6ee43fe60b8c32226bc1eba2f2198 to your computer and use it in GitHub Desktop.
xRDP (Remote Desktop) on Ubuntu 24.04 LTS

How To Enable Remote Desktop Protocol (RDP) Using xrdp on Ubuntu 24.04

Setup

Step 1: Install xfce4 (Light Desktop Environment) on Ubuntu

Tip: You should be able to run both Qt (KDE) and GtK (Gnome) based apps.

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

Step 2: Install xRDP on Ubuntu

$ sudo apt install xrdp -y

Step 3: Xsession setup for auto-init of GUI

Switch to the user you intend to login as: (i.e. I had k8s as user)

# sudo systemctl status xrdp
# sudo systemctl start xrdp
# sudo su - k8s
$ echo "xfce4-session" | tee .xsession
# sudo systemctl restart xrdp

On Ubuntu Server:

sudo sudo ss -pnl | grep 3389 or `sudo netstat -tunpl | grep 3389' to verify listening port.

Step 4: Verify connectivity (Testing the RDP Connection)

Install RDP Client on Client side

  • macOS: App Store: Windows Apps (Renamed from Remote Desktop Client)
  • Windows: Microsoft Remote Desktop
  • Linux: Remmina

Use ip:3389 format to login and linux username/password.

rdp://full%20address=s:ip:3389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment