Guide

How to remote desktop into Ubuntu from Windows (RDP, xrdp or SSH)

To remote desktop into Ubuntu from Windows, turn on Ubuntu's built-in Remote Desktop (in Settings on Ubuntu 24.04 and 22.04) or install xrdp, then connect with Remote Desktop Connection, which every edition of Windows includes. For a terminal only, use SSH. To reach Ubuntu from outside your home network without opening ports, install RemoteAccessApp's Linux Agent and open the desktop from the Windows app or a browser.

Here's how each one works on Ubuntu 24.04 and 22.04, which to pick, and the Wayland catch.

  • Ubuntu 24.04 and 22.04
  • From Windows 11 or 10, Home or Pro
  • RDP, SSH, or no ports at all

Updated · Works on Ubuntu 24.04 and 22.04, from Windows 10 and 11

Which way to choose

Four ways to reach Ubuntu from Windows, what each shows and what it suits
WayWhat you getBest for
Ubuntu's built-in Remote DesktopThe desktop that's signed in at the PC, over RDPA PC on your network that stays signed in
xrdpA separate desktop session over RDPA PC nobody uses in person, or a second user
SSHA terminal, no desktopCommands, updates and servers
RemoteAccessAppThe signed-in desktop, from anywhere, with no ports to openReaching it from outside, or helping someone at it

RDP (Remote Desktop Protocol) is the protocol Windows' own remote desktop uses, so Ubuntu's built-in option and xrdp both work with the Remote Desktop Connection app already on your Windows PC. On Windows, open it from the Start menu, or press Win+R and type mstsc.

Option 1: Ubuntu's built-in Remote Desktop

Ubuntu 22.04 and later can share the desktop over RDP with nothing to install. It shows the session that's signed in at the PC, and it works with Ubuntu's default Wayland desktop.

  1. Step 1: Turn on Remote Desktop in Ubuntu's Settings

    Ubuntu 24.04: open Settings → System → Remote Desktop. On the Desktop Sharing tab, switch on Desktop Sharing and Remote Control.

    Ubuntu 22.04: open Settings → Sharing, turn on the switch at the top if it's off, open Remote Desktop and switch on Remote Desktop and Remote Control.

  2. Step 2: Set a user name and password for remote connections

    Under Login Details (24.04) or Authentication (22.04), set the user name and password that Windows will use. They're separate from your Ubuntu sign-in. Note the port the page shows; it's 3389 unless it says otherwise.

  3. Step 3: Find Ubuntu's IP address

    Open a terminal on the Ubuntu PC and run:

    hostname -I

    The first address, such as 192.168.1.50, is the one to use on your network.

  4. Step 4: Connect from Windows

    Open Remote Desktop Connection, type the address (add the port if it isn't 3389, as in 192.168.1.50:3390) and click Connect. Enter the user name and password from step 2. The first time, Windows warns that it can't verify the PC's certificate: check you typed the right address and click Yes.

  • Someone has to be signed in at the PC. Desktop Sharing shows that session. On Ubuntu 24.04, the Remote Login tab on the same page covers the case where nobody is: turn it on (it asks for an administrator password) and you get Ubuntu's login screen in the remote window.
  • Stop it sleeping. In Settings → Power, turn off Automatic Suspend while it's plugged in. A suspended PC can be woken with Wake-on-LAN.

Option 2: xrdp, a separate session

xrdp is an open-source RDP server from Ubuntu's own repositories. Instead of sharing the desktop that's open at the PC, it starts a new desktop session for whoever signs in, on X11. That suits a PC nobody sits at.

  1. Step 1: Install xrdp

    sudo apt update
    sudo apt install xrdp
    sudo adduser xrdp ssl-cert
    sudo systemctl restart xrdp

    The third line lets xrdp read its encryption certificate; if it's already allowed, it just says so. xrdp then starts with the PC. systemctl status xrdp should say active (running).

  2. Step 2: Sign out at the PC

    Ubuntu's desktop can't run twice for the same user. If you're still signed in at the PC, the remote window usually stays black or closes straight away. Sign out there first, or use a different Ubuntu user for remote sessions.

  3. Step 3: Connect from Windows

    In Remote Desktop Connection, type Ubuntu's IP address and click Connect. On xrdp's login screen, keep the session type Xorg and enter your Ubuntu user name and password.

Things that trip people up

Ubuntu's built-in Remote Desktop and xrdp both listen on port 3389, so use one or the other (or change xrdp's port in /etc/xrdp/xrdp.ini). If GNOME is slow over xrdp, a lighter desktop just for remote sessions often helps: sudo apt install xfce4, then echo xfce4-session > ~/.xsession. The desktop at the PC stays the same.

Why the two behave so differently comes down to X11 and Wayland: xrdp only does X11 sessions, while the desktop at the PC runs on Wayland by default. Our post on Linux remote desktop on X11 vs Wayland explains it.

Option 3: SSH for a terminal

If you only need to run commands, install updates or edit files, SSH is lighter than any desktop. On Ubuntu, install and start the OpenSSH server:

sudo apt install openssh-server
sudo systemctl enable --now ssh

Windows 10 and 11 include an ssh command. In PowerShell or Windows Terminal, run ssh yourname@192.168.1.50 with your Ubuntu user name and address, check the key fingerprint the first time, and enter your password. The full walkthrough, with signing in by key, is in how to SSH to a Linux server from Windows. RemoteAccessApp's free SSH and SFTP client keeps your hosts and keys in one list.

Using a firewall on Ubuntu?

Ubuntu's firewall (ufw) is off unless you turned it on. If sudo ufw status says it's active, allow the port from your own network only, for example sudo ufw allow from 192.168.1.0/24 to any port 3389 proto tcp for RDP, or port 22 for SSH.

From outside your home network

RDP and SSH as set up above work on your own network. To reach them from elsewhere, you'd forward port 3389 or 22 on your router to the Ubuntu PC. That puts its sign-in on the internet, where bots try passwords around the clock, and it doesn't work at all on connections without a public address of their own. See remote desktop without port forwarding for the alternative.

Option 4: RemoteAccessApp, with no ports to open

RemoteAccessApp's Linux Agent connects out to RemoteAccessApp's relay, so the Ubuntu PC is reachable from anywhere with nothing changed on the router. Like Ubuntu's built-in option, it shows the desktop that's signed in at the PC, on Wayland or Xorg.

  1. Step 1: Install the .deb on Ubuntu

    Download it from the download page on the Ubuntu PC and run the command the page shows in your Downloads folder:

    sudo apt install ./remoteaccessapp_*_amd64.deb
  2. Step 2: Set it up with a code

    Open RemoteAccessApp Agent from Show Apps. Choose Add a PC on your dashboard at remoteaccessapp.com or in the Windows app, and type the 6-digit code into the Agent. Or sign in there with your account.

  3. Step 3: Open it from Windows

    In the RemoteAccessApp Console on your Windows PC, the Ubuntu PC is on the Devices page next to your Windows PCs: double-click it. Or sign in at remoteaccessapp.com in any browser. The person at the Ubuntu PC clicks Allow, unless you've turned on unattended access there.

  4. Step 4: The first time on Wayland, approve screen sharing

    Ubuntu shows its own Remote Desktop dialog at the PC once: turn on Allow Remote Interaction, keep Remember This Selection ticked and click Share. Later sessions start without it, even with nobody there.

  • It runs on 64-bit (x86-64) PCs whose desktop uses X11 (Xorg) or Wayland, such as Ubuntu, Debian, Linux Mint and Fedora. ARM computers aren't supported yet.
  • If a Wayland desktop can't share its screen with apps, the Agent says so; choose an Xorg session at the login screen there.
  • Sessions from the Windows app are end-to-end encrypted, with a bash terminal, file transfer and clipboard sync. In a browser they're encrypted, but not end to end.
  • The Ubuntu PC is one of the 5 PCs on the free plan. Sound and every monitor are part of Pro.

The step-by-step for Ubuntu is in how to access an Ubuntu desktop remotely, and everything the Console can do with a Linux PC is in controlling a Linux PC from Windows. Fixes for a missing tray icon or a black screen are in the RemoteAccessApp on Linux help article, and the overview is remote desktop for Linux.

Going the other way: Windows from Ubuntu

The same package includes the RemoteAccessApp Console for Linux, so Ubuntu can open your Windows PCs too. It also keeps saved Remote Desktop (RDP) hosts and opens them with FreeRDP (sudo apt install freerdp2-x11), so it works as an RDP client on Linux. See how to control a Windows PC from Linux.

Questions, answered

More on RemoteAccessApp for Linux

Related