How to set up Ubuntu remote desktop and connect from Windows
You can set up Ubuntu remote desktop four ways: the built-in Remote Desktop, which uses RDP; xrdp; a VNC server such as TigerVNC; or a remote access tool such as Chrome Remote Desktop or DeviceView. On Ubuntu 24.04 and 26.04, start with the built-in one: turn it on in Settings > System > Remote Desktop and connect from Windows with Remote Desktop Connection. Use xrdp or VNC for separate sessions on servers, and an agent for many unattended machines on networks you do not run.
Free on 5 devices. No card.
Key facts
- Ubuntu 24.04 and 26.04 have remote desktop built in, under Settings > System > Remote Desktop. It uses RDP on port 3389, so the Remote Desktop Connection app built into Windows can connect.
- Desktop Sharing shows a session someone is signed in to. Remote Login, added in 24.04, lets you sign in at Ubuntu's login screen over RDP when nobody is using the machine.
- Ubuntu 26.04's default desktop is Wayland only. GNOME no longer runs on Xorg there, so x11vnc cannot share it, and xrdp or TigerVNC sessions need an X11 desktop such as Xfce.
- xrdp (port 3389) and TigerVNC (5900 plus the display number) start separate sessions, not the screen on the monitor. A black xrdp screen often means the same user is still signed in at the machine.
- Do not forward 3389 or 5900 from the internet. Use a VPN, an SSH tunnel, or a tool that connects out.
- DeviceView gives unattended access to Ubuntu's GNOME desktop, including the GDM login screen, with no inbound port. It runs on Ubuntu 18.04 and later, and on Wayland from Ubuntu 22.04. It is free on 5 devices.
Which Ubuntu remote desktop method should you use?
Pick by what you need to see and whether anyone is at the machine. DeviceView's row comes from its coverage page.
| Method | Best for | Wayland | From Windows | Unattended or login screen | Cost |
|---|---|---|---|---|---|
| Desktop Sharing (built in) | The desktop someone is using | Yes | Remote Desktop Connection | No. Someone must be signed in, and the screen not locked | Free |
| Remote Login (built in, 24.04 and later) | Your account, with nobody at the machine | Yes | Remote Desktop Connection | Yes. Ubuntu's login screen | Free |
| xrdp | Servers, and a separate session per user | No. Its own Xorg session | Remote Desktop Connection | Yes. Its own login screen | Free |
| TigerVNC | VNC clients and VNC-only tools | No. Its own X11 session | A VNC viewer | Yes, as a service | Free |
| Chrome Remote Desktop | One PC over the internet | Not in its standard setup | Chrome browser | Yes, in its own session | No price listed by Google |
| DeviceView | Fleets, unattended, on other networks | Yes, GNOME from 22.04 | A browser | Yes, including the GDM login screen | Free on 5 devices. Then $20 a month for the first 20, and $1.00 per device per month after |
TeamViewer and AnyDesk also run on Ubuntu, with limits on Wayland: see TeamViewer on Linux Wayland and AnyDesk on Linux Wayland.
How does remote desktop differ on Ubuntu 22.04, 24.04, and 26.04?
These differences change the steps.
| What changes | 22.04 LTS | 24.04 LTS | 26.04 LTS |
|---|---|---|---|
| Built-in settings | Settings > Sharing > Remote Desktop | Settings > System > Remote Desktop | Settings > System > Remote Desktop |
| Built-in protocols | RDP, plus a legacy VNC option | RDP only | RDP only |
| Sign in with nobody at the machine | Not built in | Remote Login | Remote Login. The session survives a disconnect |
| GNOME on X11 | Ubuntu on Xorg, chosen at login | Ubuntu on Xorg, chosen at login | None. Wayland only |
| xrdp in the archive | 0.9.17 | 0.9.24 | 0.10.1 |
sudo adduser xrdp ssl-cert | Needed | Needed | Not needed |
| GNOME inside xrdp or VNC | Possible | Possible, with extra setup | No. Use Xfce or MATE |
On 22.04, the switch called Remote Login in the Sharing panel turns on SSH, not RDP.
How do you turn on remote desktop in Ubuntu 24.04 and 26.04?
The built-in server is GNOME Remote Desktop, and its two tabs do different jobs.
Desktop Sharing: the screen someone is using
- Open Settings > System > Remote Desktop and choose the Desktop Sharing tab.
- Turn on Desktop Sharing, and Remote Control too if the other side should use the mouse and keyboard.
- Under Login Details, note the username and password. They are separate from your Ubuntu password.
- Under How to Connect, note the hostname and port.
- Stay signed in, and keep the screen from locking. Desktop Sharing does not accept connections while the screen is locked, and it keeps your screen's resolution.
Remote Login: sign in when nobody is at the machine
- Open Settings > System > Remote Desktop and choose the Remote Login tab.
- Authenticate as an administrator when Settings asks, then turn on Remote Login.
- Note its username, password, and port.
- Sign out. If you stay signed in, whoever connects can choose to end your session.
- Connect with an RDP client and those credentials, then sign in at Ubuntu's login screen with your normal account. The desktop takes the size of your client window.
On 26.04, a Remote Login session keeps running after you disconnect. With both tabs on, Remote Login keeps port 3389 and Desktop Sharing moves to 3390. If you have turned on the ufw firewall, open both:
sudo ufw allow 3389:3390/tcp
sudo ufw reload
From a terminal, grdctl status shows Desktop Sharing and sudo grdctl --system status shows Remote Login. Setting up Remote Login over SSH on a machine with no screen is covered in our guide to GNOME remote desktop on Wayland.
On Ubuntu 22.04
Open Settings > Sharing, turn on the Sharing switch at the top of the window, then choose Remote Desktop and turn it on, with Remote Control if the other side should use the mouse and keyboard. It speaks RDP, with its own login details. 22.04 has no Remote Login over RDP, so someone must stay signed in. For a machine nobody is using, install xrdp.
How do you remote desktop to Ubuntu from Windows?
Windows 10 and 11 come with the client: Remote Desktop Connection, also called mstsc. GNOME's help recommends it with its default settings.
- On Ubuntu, turn on Desktop Sharing or Remote Login, or install xrdp, and note the address, port, and credentials.
- On Windows, press Windows+R, type
mstsc, and press Enter. - Enter the IP address or hostname, with the port if it is not 3389, as in
192.168.1.20:3390. On many home networks a hostname needs.localon the end. - Accept the certificate warning the first time. The certificate is self-signed, so GNOME suggests checking that the fingerprint your client shows matches the one in Settings > System > Remote Desktop.
- Enter the username and password from Ubuntu's Remote Desktop settings. With Remote Login, you then sign in at Ubuntu's login screen. With xrdp, its login screen takes your Ubuntu username and password.
From a Mac or another Linux PC
On a Mac, use an RDP client such as Thincast, which GNOME's help lists, or Microsoft's Windows App from Apple's App Store. On Linux, use Remmina, the RDP and VNC client Ubuntu's documentation recommends. It comes with Ubuntu's extended installation, or run sudo apt install remmina remmina-plugin-rdp remmina-plugin-vnc. GNOME Connections (gnome-connections) and the FreeRDP client also work.
How do you set up xrdp on Ubuntu?
xrdp is an open source RDP server. Like Remote Login, it starts a separate session for each person who signs in, not the screen on the monitor. Unlike Remote Login, that session runs on Xorg with a desktop such as Xfce, so it also works on Ubuntu Server without GNOME. It listens on port 3389 too, so do not run it beside the built-in Remote Desktop on the same port.
These steps follow Microsoft's setup for Ubuntu 24.04, with Xfce as the desktop:
sudo apt update
sudo apt install xrdp xfce4 xfce4-session
sudo adduser xrdp ssl-cert # 22.04 and 24.04 only
echo xfce4-session > ~/.xsession # as the user who will connect
sudo systemctl restart xrdp
sudo ufw allow 3389/tcp # only if ufw is on
Then connect with Remote Desktop Connection and sign in at the xrdp login screen with your Ubuntu account.
- Why the ssl-cert step: on 22.04 and 24.04, Ubuntu's xrdp service runs as the
xrdpuser, which cannot read its default TLS key until it joins thessl-certgroup. Without the step, xrdp still accepts connections, but without TLS. On 26.04 the service runs as root. - GNOME instead of Xfce: on 24.04 it needs extra environment settings before the Ubuntu layout and snap apps such as Firefox behave. See the xrdp wiki's guide for Ubuntu Desktop 24.04. On 26.04, GNOME cannot run in an xrdp session.
Why does xrdp show a black screen?
- The same user is signed in at the machine. On systemd distributions such as Ubuntu, one user's graphical sessions share a session bus, and xrdp's FAQ says a second session for that user does not work. It often shows as a black screen or an instant disconnect. Sign out at the machine first, or use another account. To see the session already on the screen, use Desktop Sharing.
- The desktop cannot start on Xorg. On 26.04, GNOME Shell no longer runs on Xorg, so a session that starts the default Ubuntu desktop closes at once. Use Xfce, as above.
Logs are in /var/log/xrdp.log, /var/log/xrdp-sesman.log, and ~/.xsession-errors.
How do you set up a VNC server on Ubuntu?
First check that you need VNC. On 24.04 and 26.04 the built-in Remote Desktop is RDP only, and every major OS has an RDP client.
A separate virtual desktop: TigerVNC. It runs its own X server, independent of the monitor, so it works on every release as long as the desktop inside supports X11. Use Xfce. On 26.04, GNOME is not an option.
sudo apt install tigervnc-standalone-server tigervnc-tools xfce4 xfce4-session
vncpasswd # set the VNC password
vncserver :1 -- xfce # display :1, port 5901
Started this way, it listens only on localhost. Reach it through an SSH tunnel, then point a VNC viewer at localhost:5901:
ssh -L 5901:localhost:5901 you@ubuntu-host
On a network you trust, vncserver :1 -localhost no -- xfce listens on every address; if ufw is on, also run sudo ufw allow 5901/tcp. To start a desktop at boot, add :1=yourname to /etc/tigervnc/vncserver.users, set $session="xfce"; in that user's TigerVNC config (~/.vnc/tigervnc.conf on 24.04, ~/.config/tigervnc/config.pl on 26.04), and run sudo systemctl enable --now tigervncserver@:1.service.
The screen on the monitor: x11vnc, X11 only. x11vnc shares an existing X11 display. On 24.04 that means choosing Ubuntu on Xorg at the login screen. On 26.04 the default desktop has no X11 session to share.
Why X11 VNC servers fail on Wayland: GNOME's compositor draws the screen, and only its own screen-sharing interfaces can read it. Xwayland, which runs X11 apps on Wayland, does not expose the desktop, while the built-in Remote Desktop goes through GNOME itself. TigerVNC 1.16 added a Wayland server, w0vncserver, but Ubuntu 26.04 packages TigerVNC 1.15. See X11 vs Wayland for remote desktop.
Does Chrome Remote Desktop work on Ubuntu?
Yes, but by default it does not show the desktop on your monitor. Google's Linux host starts a separate virtual X11 session for your account.
- Download Google's Debian package and install it with
sudo apt install ./chrome-remote-desktop_current_amd64.deb. - Turn on remote access from Google's remote access site in Chrome, as Google's help describes.
- Pick the session's desktop from the chooser on your first connection, or name it in
~/.chrome-remote-desktop-sessionas Google's help shows.
Limits on Ubuntu:
- It is an X11 session, so on 26.04 it cannot be GNOME. Use Xfce or another X11 desktop.
- One desktop, one session: Google notes that a desktop may not run two sessions at once. Use a different desktop for the remote session, or sign out of it at the machine first.
- Wayland: Google's Linux steps do not cover Wayland or the desktop on the screen.
How do you get a remote desktop on Ubuntu Server?
Ubuntu Server has no desktop, so there is nothing to share until you add one. For most jobs, SSH is enough:
sudo apt install openssh-server # if the installer did not add it
ssh you@server
For a graphical desktop:
- xrdp with Xfce. Light, and the setup Microsoft documents for Ubuntu 24.04 VMs. Each user gets their own session.
- TigerVNC with Xfce, reached through an SSH tunnel.
- GNOME with Remote Login. Install
ubuntu-desktop-minimal. With no screen attached, turn on Remote Login over SSH with thesudo grdctl --system rdpcommands, after giving it a TLS certificate and key. Our GNOME guide covers that mode.
If SSH covers the job, skip the desktop: it is more to patch.
How do you reach Ubuntu from outside your network?
Do not forward port 3389 or 5900 on your router. Ubuntu's documentation calls port forwarding a security risk, and xrdp's FAQ and TigerVNC's service file both warn against untrusted networks. Instead:
- A VPN, such as WireGuard. Connect to the machine's VPN address as if you were on the LAN.
- An SSH tunnel, as in the VNC example. SSH itself must be reachable.
- A tool that connects out, such as Chrome Remote Desktop or DeviceView, so the router needs no forwarding rule.
What does DeviceView do on Ubuntu?
DeviceView is remote monitoring and management (RMM) with remote support built in. One agent per machine gives you the desktop, a terminal, and fixes that run without a session. It fits many unattended machines on networks you do not run. For one PC at home, the built-in Remote Desktop is enough. For several people with their own desktops on one server, use Remote Login on a GNOME machine, or xrdp.
| Capability | Ubuntu Desktop (GNOME) | Ubuntu Server, no desktop |
|---|---|---|
| Live view and remote control | Yes, on X11, and on Wayland from 22.04 | No display to show |
| Unattended access | Yes, with no prompt | Terminal, files, and tools at any time |
| Login and lock screens | GDM login screen, including after a reboot. GNOME lock screen | No display server |
| No monitor plugged in | Graphical access on GNOME on Wayland, from 22.04 | Terminal and tools instead |
| Virtual displays | Add one, or start on one | No display server |
| Remote terminal | As the signed-in user | As root or any login account |
| Files | With the signed-in user's permissions | Full filesystem |
| Processes | Ends the signed-in user's | Yes |
| Scripts, systemd services, health telemetry, and runbooks | Yes | Yes |
| TCP tunnels and journald log viewer | On request | On request |
The agent connects out, so the machine needs no inbound port. Sessions are peer-to-peer by default, with an encrypted TURN relay as the fallback. It runs on Ubuntu 18.04 and later, on x86_64 and arm64. On Wayland it needs GNOME 40 or later (Ubuntu 22.04 and later), so on 18.04 and 20.04 it works in an Xorg session; for the login screen there, set WaylandEnable=false in /etc/gdm3/custom.conf. Ubuntu 26.04 details are on unattended remote control on Ubuntu 26.04 Wayland, other distributions on the Linux platform page, and every condition on the coverage page.
DeviceView is free on 5 devices, with no card. After that, $20 a month covers the first 20 devices, then $1.00 per device per month. SSO, SCIM, RBAC, and audit log in every tier, including the free Pilot. The same console covers Linux, Android, Windows, macOS, iOS, and iPadOS devices.
How do you set up DeviceView on Ubuntu?
- Start free and create your organization. The Pilot plan covers 5 devices, with no card.
- In the console, copy the one-line install command. It carries your enrollment token.
- Paste it into a terminal on the Ubuntu machine. The installer asks for your sudo password. The agent is a .deb package, not a snap.
- The machine appears in the console. Open a session, at the login screen if nobody is signed in, or open a terminal.
For a fleet, push the server address and enrollment token as a config file with your configuration management tool.
Frequently asked questions
Does Ubuntu have remote desktop built in?
Yes. Ubuntu 22.04 and later include GNOME Remote Desktop, which uses RDP. On 24.04 and 26.04 it is in Settings > System > Remote Desktop. On 22.04 it is in Settings > Sharing > Remote Desktop.
What is the best remote access software for Ubuntu?
It depends on the job. For one machine on your network, the built-in Remote Desktop: free, works on Wayland, nothing to install. For servers, xrdp. From outside, a VPN in front of either, or a tool that connects out. For many unattended machines that need login screen access and an audit log, an agent such as DeviceView.
Is VNC or RDP better on Ubuntu?
RDP, in most cases. It is what the built-in Remote Desktop and xrdp speak, both encrypt it with TLS (xrdp on 22.04 and 24.04 only after the ssl-cert step), and Windows includes a client. VNC suits clients and devices that only speak VNC. Its encryption depends on the security type, and TigerVNC listens only on localhost by default.
What port does Ubuntu remote desktop use?
TCP 3389. With Desktop Sharing and Remote Login both on, Desktop Sharing moves to 3390. xrdp also uses 3389, and VNC uses 5900 plus the display number, so display :1 is port 5901.
Why does Ubuntu remote desktop stop working after a reboot or a network drop?
After a reboot, Desktop Sharing has nothing to share until someone signs in; Remote Login and xrdp do not need that. Desktop Sharing also refuses connections while the screen is locked, so if the screen locks after a drop, you cannot reconnect until someone at the machine enters their password. For a machine nobody is watching, use Remote Login. The IP address can also change, so connect by hostname or reserve the address on your router. After a network drop, xrdp sessions wait for you to reconnect, and on 26.04 so do Remote Login sessions.
Why does Ubuntu remote desktop show a black screen?
With xrdp, it often means the same user is still signed in at the machine, and two graphical sessions for one user conflict. Sign out there first. On 26.04 it can also mean xrdp tried to start GNOME, which no longer runs on Xorg.
How do you set up a VNC server on Ubuntu 24.04?
Install tigervnc-standalone-server, tigervnc-tools, and Xfce, run vncpasswd, then vncserver :1 -- xfce. The built-in Remote Desktop on 24.04 is RDP only, and x11vnc works only in an Ubuntu on Xorg session.
Can you remote desktop to Ubuntu from Windows without signing in at the machine first?
Yes, on 24.04 and 26.04. Turn on Remote Login, sign out, and connect with Remote Desktop Connection, then sign in at Ubuntu's login screen. xrdp also works with nobody signed in; Desktop Sharing does not. DeviceView reaches the GDM login screen unattended, on Wayland from 22.04.
Does Ubuntu 26.04 still support X11?
Not for its default desktop: GNOME Shell no longer runs on Xorg. Xfce and MATE can still use Xorg, and X11 apps run through Xwayland. See unattended remote control on Ubuntu 26.04.
Sources
- Share your desktop remotely, Ubuntu Desktop documentation: current, 24.04 LTS, and 26.04 LTS
- Access a remote desktop, Ubuntu Desktop documentation, 26.04 LTS
- Ubuntu 26.04 LTS summary for LTS users, Ubuntu release notes
- Ubuntu 25.10 drops support for GNOME on Xorg, Ubuntu Discourse
- Share your desktop and Log in remotely to your device, GNOME Help
- GNOME 46 release notes, GNOME
- Connection fails when GNOME lock screen is active, gnome-remote-desktop issue tracker
- grdctl(1), Ubuntu manpages, 26.04 LTS, and Configure GNOME Remote Desktop on Oracle Linux, Oracle Linux tutorial, for
grdctl --system - How to use Remote Desktop, Microsoft Support, and mstsc, Microsoft Learn
- xrdp and its Tips and FAQ, neutrinolabs on GitHub
- Install and configure xrdp to use Remote Desktop with Ubuntu, Microsoft Learn
- xrdp needs to be in ssl-cert group to read server private key, Launchpad
- tigervncsession(8), Ubuntu manpages, for 24.04 LTS and 26.04 LTS
- TigerVNC, project site, and TigerVNC releases
- x11vnc, LibVNC on GitHub
- Access another computer with Chrome Remote Desktop, Google Chrome Help
- DeviceView platform coverage
Ubuntu is a registered trademark of Canonical Ltd. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. GNOME is a trademark of the GNOME Foundation. Windows is a trademark of the Microsoft group of companies, Chrome is a trademark of Google LLC, and Mac and macOS are trademarks of Apple Inc. Other names are trademarks of their respective owners. DeviceView is not affiliated with Canonical Ltd. or the other owners named here.