What xRDP actually gives you
xRDP is an open-source implementation of Microsoft’s RDP protocol for Linux. Installed on Ubuntu, it listens on the standard RDP port (3389) and serves a graphical desktop session to any RDP client — including the mstsc built into every Windows PC. You log in with your Ubuntu username and password and get a Linux desktop in a window.
Set expectations correctly: xRDP gives you Ubuntu with a remote desktop, not Windows. You’ll run Linux applications (Firefox, VS Code, LibreOffice, terminals) — it won’t run Windows-only software. If you need actual Windows applications remotely, you need a Windows RDP server, not xRDP. For everything Linux can do, though, xRDP is the most convenient remote access method available.
Installing xRDP on Ubuntu: step by step
You need an Ubuntu machine — 22.04 LTS or 24.04 LTS are the sane choices in 2026 — with sudo access and SSH. Run these commands in order:
- Update the package lists:
sudo apt update && sudo apt upgrade -y— start from a current system. - Install xRDP:
sudo apt install xrdp -y— pulls xRDP from Ubuntu’s official repositories, no third-party sources needed. - Enable and start the service:
sudo systemctl enable --now xrdp— starts xRDP now and on every boot. - Verify it’s listening:
sudo ss -tlnp | grep 3389— you should see xRDP bound to port 3389. - Open the firewall:
sudo ufw allow 3389/tcp— if UFW is active. On cloud VMs, also open 3389 in the provider’s security group / firewall panel. - Check the service status:
sudo systemctl status xrdp— look for active (running) before you try connecting. - Test the login. From your Windows PC, open
mstsc, enter the Ubuntu machine’s IP, and sign in with your Ubuntu username and password.
That’s the core install. The next two sections — desktop environment and the black-screen fix — are what separate a working setup from a frustrating one, so don’t skip them.
Picking a desktop environment that behaves
Here’s the thing the quick-start guides gloss over: xRDP’s happiness depends heavily on which desktop environment Ubuntu runs. The default GNOME desktop on modern Ubuntu can work over xRDP, but it’s finicky — session conflicts and rendering quirks are common. The reliable choices:
| Desktop environment | xRDP behavior | Install command |
|---|---|---|
| Xfce | The gold standard for xRDP — light, fast, trouble-free | sudo apt install xfce4 |
| MATE | Very reliable; familiar classic layout | sudo apt install ubuntu-mate-desktop |
| GNOME (default) | Works but fussy; needs session care on 22.04+ | Preinstalled on Ubuntu Desktop |
| KDE Plasma | Heavier; usable but not ideal over slow links | sudo apt install kde-plasma-desktop |
If you installed Ubuntu Server (no GUI) and added xRDP, install Xfce — it’s the path of least resistance and sips resources, which matters on small VMs. After installing a new desktop, tell xRDP to use it by adding startxfce4 (for Xfce) to ~/.xsession in your user’s home directory, then restart xRDP with sudo systemctl restart xrdp.
Connecting from Windows, Mac, and Linux
From Windows: press Win + R, type mstsc, enter the Ubuntu machine’s IP address, and log in with your Ubuntu credentials. On the xRDP login screen, leave the session type at Xorg (the default) unless you have a reason to change it. Save the connection as an .rdp file for one-click reconnects.
From macOS: Microsoft’s free Remote Desktop app from the Mac App Store connects to xRDP exactly like it connects to Windows — add a PC with the Ubuntu IP, save, double-click.
From Linux: Remmina (usually preinstalled or one apt install remmina away) speaks RDP natively; create an RDP connection profile with the server IP. The command-line xfreerdp client works too: xfreerdp /u:username /v:server-ip.
Whichever client you use, the practical tips are the same as Windows-to-Windows RDP: full-screen for immersion, 32-bit color on decent connections, and clipboard sharing on so you can copy-paste between local and remote.
Fixing the xRDP black screen
The infamous xRDP black screen — you authenticate successfully, then stare at nothing — has two usual causes, both fixable:
- Cause 1: you’re already logged in locally. xRDP can’t attach to a desktop session that’s active on the machine’s physical console (or in another xRDP session for the same user). Log out of the local session first, then connect remotely. One user, one active graphical session at a time.
- Cause 2: the desktop session failed to start. Check
~/.xsession-errorsfor clues, confirm your~/.xsessionpoints at an installed desktop (e.g.startxfce4), and restart the service:sudo systemctl restart xrdp. A missing or misspelled session command is the classic culprit after a fresh desktop install. - Also check: disk full on the server (sessions won’t start with zero free space —
df -h), and stale sessions in/tmp/.X11-unixafter a crash.
Quick diagnostic order: can you SSH in? Is xrdp running (systemctl status xrdp)? Is anything already logged in as your user? Does ~/.xsession name a desktop that’s actually installed? Nine times out of ten, the answer is in that sequence.
xRDP vs VNC: which to use
| xRDP | VNC (e.g. TigerVNC) | |
|---|---|---|
| Protocol | RDP — efficient, compresses well | RFB — simpler, often heavier |
| Windows clients | Built in (mstsc), zero install | Needs a VNC viewer download |
| Session model | Separate login sessions per user | Usually mirrors the console session |
| Performance | Generally snappier over slow links | Can lag on constrained bandwidth |
| Best for | Multi-user remote Linux desktops | Sharing one screen, remote assistance |
Rule of thumb: if people connect from Windows PCs to do their own work, xRDP wins on convenience and performance. If you need to see exactly what’s on the machine’s screen — remote support, kiosk monitoring — VNC’s screen-mirroring model fits better.
Honest limitations of xRDP
xRDP is excellent at what it does, but know the edges: audio redirection exists but is fiddly compared to Windows-to-Windows RDP; GPU acceleration doesn’t pass through meaningfully, so don’t plan on remote gaming or heavy 3D; and some GNOME integrations (like the Ubuntu dock’s finer behaviors) can act oddly in an xRDP session, which is another vote for Xfce. Security-wise, treat it like any RDP service — strong passwords, firewall rules, and consider a VPN rather than exposing 3389 to the whole internet.
And when your needs outgrow a self-managed Linux box — you want Windows applications, guaranteed uptime, and someone else handling the infrastructure — that’s the point of a managed RDP server. RDP Temple’s plans (Shared $6/month, Virtual $28/month featured, Dedicated $165/month, each with dedicated IP, full admin RDP, 24/7 support, and a 3-day money-back guarantee) cover the Windows side; the plan page lays out the tiers. For Linux remote desktops you build yourself, though, xRDP on Ubuntu remains the simplest path from zero to a working remote GUI.
Ready for your own RDP server?
Full admin access, dedicated IP, 24/7 support and a 3-day money-back guarantee on every plan. Pay by credit/debit card, bank transfer, Bitcoin or altcoins.
3-day money-back guarantee · Instant setup · 30+ server locations · 99% uptime SLA
xRDP on Ubuntu: FAQ
Run sudo apt update, then sudo apt install xrdp -y, then sudo systemctl enable --now xrdp to start it on boot. Open TCP port 3389 in your firewall (sudo ufw allow 3389/tcp, plus your cloud provider's security group if applicable), and connect from Windows with mstsc using the machine's IP and your Ubuntu credentials.
The two common causes are: you are already logged in to a graphical session as the same user (log out locally first — one active session per user), or the desktop session failed to start (check that ~/.xsession names an installed desktop like startxfce4, then run sudo systemctl restart xrdp). Also verify the disk is not full.
Xfce is the most reliable choice — lightweight, fast, and trouble-free over xRDP. MATE is a close second. The default GNOME desktop can work but is fussier about session handling on recent Ubuntu releases, so most guides recommend Xfce for remote setups.
Yes. The built-in Remote Desktop Connection (mstsc) on Windows connects to xRDP with no extra software — enter the Ubuntu machine's IP address and sign in with your Ubuntu username and password. Leave the xRDP login screen's session type at Xorg unless you have a specific reason to change it.
Treat it like any remote desktop service: use strong unique passwords, restrict port 3389 at the firewall to known IPs where possible, keep the system patched, and strongly consider a VPN in front of xRDP rather than exposing it directly. Automated scanners probe port 3389 constantly.
xRDP speaks Microsoft's RDP protocol, so Windows PCs connect with the built-in mstsc client, performance is generally better over slow links, and each user gets a separate login session. VNC mirrors the machine's actual screen, which suits remote assistance better. For multi-user remote Linux desktops from Windows clients, xRDP is usually the better pick.
