Remote Desktop to Linux from Windows: GNOME RDP, xrdp or TigerVNC

To access a Linux desktop from Windows remotely, you have three routes that work today, and most of the Windows side is already installed. GNOME Remote Desktop and xrdp speak RDP, so mstsc, the Remote Desktop Connection client in Windows, connects to both. TigerVNC needs a VNC viewer on Windows and belongs behind an SSH tunnel. Which one fits depends on whose session you want: the desktop someone is already using, your own login on an idle machine, or a separate desktop per user. The commands are for Ubuntu 26.04 LTS, and a Fedora 45 section lists what changes there.

Pick the route by whose session you want

A laptop connects through three dashed lines to a shared monitor, a server rack and a virtual display.

Every route is a listener on the Linux machine that a Windows client dials:

  • GNOME Desktop Sharing (TCP 3389): you see the session of the person logged in at the machine, and control it if they allow that. They have to stay logged in, and you get their screen size, so the picture can look small, large or blurry in your window.
  • GNOME Remote Login (TCP 3389): you get the GDM login screen and start your own GNOME session. The account has to be logged out at the machine, and the screen follows the size of your client window.
  • xrdp (TCP 3389): every RDP login gets its own X11 session on its own display, whoever sits at the console.
  • TigerVNC (TCP 5901 for display :1): a virtual X11 desktop that listens on localhost only. You reach it through an SSH tunnel and a VNC viewer.

The last two have a catch on current releases. GNOME 50 dropped X11 sessions, so GNOME on Ubuntu 26.04 and Fedora 45 runs on Wayland only and can't start inside xrdp or Xvnc. Those two routes get Xfce instead, and the steps below install it.

Which one to use:

  • Help someone at the Ubuntu desktop, or watch what's on their screen: Desktop Sharing.
  • Work in your own GNOME session on a machine nobody is using: Remote Login.
  • Several people need desktops at once, or you want a session that is still there after a dropped connection: xrdp.
  • SSH is the only port you can reach, or you want VNC: TigerVNC through a tunnel.

GNOME Remote Desktop and xrdp both default to port 3389. Run one of them on a given machine, or move xrdp to another port with port= in /etc/xrdp/xrdp.ini.

Share the Ubuntu desktop with GNOME Remote Desktop

A laptop views the same screen that a person is using on a desktop monitor, shown by a dashed line and an eye marker.

Remote desktop sharing works on Ubuntu Desktop 24.04 LTS or later with GNOME, and the ubuntu-desktop metapackage already pulls in gnome-remote-desktop. On a trimmed install, add it:

share the ubuntu desktop with gnome remote desktop
sudo apt update
sudo apt install gnome-remote-desktop

Open Settings ‣ System ‣ Remote Desktop and switch on Desktop Sharing. Switch on Remote Control as well if you want to type and click, not just watch. The same panel shows a remote user name and password. They are separate from the Linux login and only work for remote desktop, so you can change them without touching the account.

On the same network, the host name from the panel usually works once you add the .local suffix. If it doesn't resolve, use the IPv4 address from the inet line of:

share the ubuntu desktop with gnome remote desktop
ip -4 address

Desktop Sharing and Remote Login each listen on 3389. Switch both on and Desktop Sharing moves to 3390 while Remote Login keeps 3389. Ubuntu ships ufw disabled; if you have turned it on, open both ports:

share the ubuntu desktop with gnome remote desktop
sudo ufw allow 3389:3390/tcp
sudo ufw status

ufw status lists 3389:3390/tcp with ALLOW. On Windows, start the built-in client against the machine:

share the ubuntu desktop with gnome remote desktop
mstsc /v:<linux-host>.local:3389

The /v parameter takes the host and an optional port; use 3390 when Remote Login is on too. Log in with the remote user name and password from the panel, not your Linux password. mstsc asks you to accept a certificate it can't verify the first time. Once you're in, a screen-sharing icon appears in Ubuntu's top bar.

From outside the local network, put the machine behind a VPN rather than forwarding 3389 on the router: port forwarding opens the login to the whole internet.

Remote Login for your own session

Remote Login hands you a login screen instead of someone's live desktop. In the same panel, open Remote Login, unlock it with an administrator password and switch it on. mstsc first authenticates with the system-wide credentials you set there, then GDM shows its login screen for your own account. Log out at the machine first; if you're still logged in, Ubuntu offers to end that session when you connect.

Check it and turn it off

check it and turn it off
grdctl status
grdctl --system status
journalctl --user -u gnome-remote-desktop.service
journalctl -u gnome-remote-desktop.service

grdctl status covers Desktop Sharing. Under RDP: it prints Status, Port, and the TLS certificate, fingerprint and key; under Overall: it prints the Unit status. grdctl --system status does the same for Remote Login. The first journal is the user unit behind Desktop Sharing, the second the system unit behind Remote Login.

To end a session from the Ubuntu side, click the screen-sharing icon in the top bar. Switch Desktop Sharing off in Settings to stop listening, or run grdctl rdp disable. Then close the firewall again:

check it and turn it off
sudo ufw delete allow 3389:3390/tcp

Give each login its own desktop with xrdp

A server rack feeds three monitors, each with its own person working at a different screen layout.

Ubuntu 26.04 ships xrdp 0.10.1 in universe, and it recommends xorgxrdp, the Xorg module xrdp sessions run on. Install both with Xfce:

give each login its own desktop with xrdp
sudo apt update
sudo apt install xrdp xorgxrdp xfce4 xfce4-screensaver

Keep xfce4-screensaver on that line. Without it, apt fills Xfce's screen-locker recommendation with light-locker, which drags the LightDM display manager in next to GDM.

xrdp starts each session through /etc/X11/Xsession, and on an Ubuntu desktop that picks gnome-session as the default session manager, which no longer runs on X11. Point every user who will log in over RDP at Xfce. Run this as that user:

give each login its own desktop with xrdp
cat > ~/.xsession <<'EOF'
#!/bin/sh
exec startxfce4
EOF
chmod +x ~/.xsession

Start xrdp and check the listener:

give each login its own desktop with xrdp
sudo systemctl enable --now xrdp
systemctl status xrdp xrdp-sesman
sudo ss -ltnp 'sport = :3389'

xrdp.service requires xrdp-sesman.service, so one start brings up both, and both show active (running). ss lists xrdp on *:3389, every address, and /var/log/xrdp.log has the line listening to port 3389 on 0.0.0.0. If ufw is on, open the port with sudo ufw allow 3389/tcp.

From Windows, 3389 is the default, so the host is enough:

give each login its own desktop with xrdp
mstsc /v:<linux-host>

xrdp's login box takes your normal Linux user name and password. xrdp-sesman checks them through PAM and starts Xorg with the xorgxrdp driver, on display :10 for the first session. TLS works out of the box: /etc/xrdp/cert.pem and key.pem link to the system's snakeoil certificate, so expect mstsc's certificate warning on the first connection.

When the session dies or never logs in

Follow both units while you connect:

when the session dies or never logs in
sudo journalctl -f -u xrdp -u xrdp-sesman
  • Window manager (pid …, display …) exited quickly (… secs). This could indicate a window manager config problem: the session script ended straight away. On 26.04 that is GNOME being started on X11. Check that ~/.xsession exists, is executable and runs startxfce4; the session's own errors land in ~/.xsession-errors.
  • pam_authenticate failed: Authentication failure: a wrong password, or PAM refused the account.
  • No X displays are available or Max session limit reached: sesman ran out of display numbers or hit MaxSessions, which is 50 in the shipped /etc/xrdp/sesman.ini.

Settings worth knowing

  • port=3389 in /etc/xrdp/xrdp.ini listens on every interface. To pin xrdp to one address, use port=tcp://<lan-address>:3389, then sudo systemctl restart xrdp.
  • security_layer=negotiate is the default. security_layer=tls refuses clients that only offer Standard RDP Security, leaving TLS to handle encryption and server authentication.
  • /etc/xrdp/sesman.ini ships KillDisconnected=false and DisconnectedTimeLimit=0. Closing the mstsc window leaves the session running, and logging in again as the same user takes you back to it. Log out from Xfce when you're done.

To stop and remove it:

settings worth knowing
sudo systemctl disable --now xrdp
sudo ufw delete allow 3389/tcp
sudo apt purge xrdp xorgxrdp

purge deletes the files under /etc/xrdp as well.

Run a TigerVNC desktop and tunnel it over SSH

A laptop and a desktop monitor are joined by a connection running through a secure tunnel with a padlock.

On Ubuntu, install the server, the password tool and Xfce, plus openssh-server if the machine doesn't run an SSH server yet:

run a tigervnc desktop and tunnel it over ssh
sudo apt install tigervnc-standalone-server tigervnc-tools xfce4 xfce4-screensaver openssh-server
tigervncpasswd

Run tigervncpasswd as the user who will own the desktop. It wants six to eight characters, asks whether you want a separate view-only password (answer n), and writes ~/.config/tigervnc/passwd. Then start display :1:

run a tigervnc desktop and tunnel it over ssh
tigervncserver -localhost yes :1 -- xfce
tigervncserver -list

The wrapper prints New Xtigervnc server '<host>:1 (<user>)' on port 5901 for display :1., and -list shows display 1 on RFB port 5901 with its process ID. -localhost yes keeps the server on 127.0.0.1 and ::1, which is all the tunnel needs. -- xfce picks /usr/share/xsessions/xfce.desktop; Ubuntu 26.04 has no GNOME file in that directory. If the desktop never shows, read ~/.config/tigervnc/<host>:1.log for the server and ~/.xsession-errors for the session. After a crash, tigervncserver -list -cleanstale clears the leftover PID file, X11 lock and socket.

The Windows side: OpenSSH client and a viewer

Windows 10 1809 and later include the OpenSSH client as an optional feature. In an elevated PowerShell, check for it, and add it if the state is NotPresent:

the windows side: openssh client and a viewer
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

A successful install prints Online : True. Open the tunnel and leave that window running:

the windows side: openssh client and a viewer
ssh -N -L 5901:localhost:5901 <user>@<linux-host>

-L listens on port 5901 on your Windows machine and forwards each connection over SSH to port 5901 on the Linux side. -N runs no remote command, so the window just sits there. On the first connection, answer yes to store the host key.

Windows has no VNC viewer built in. TigerVNC's stand-alone viewer, vncviewer64-1.16.2.exe, runs without installing; tigervnc64-1.16.2.exe installs the same viewer with a Start menu entry. Enter localhost:1 in the server box, or start it from PowerShell in the folder you saved it to:

the windows side: openssh client and a viewer
.ncviewer64-1.16.2.exe localhost:1

Display 1 is port 5901, so the connection goes through the tunnel. Give the VNC password and the Xfce desktop opens.

A failed connection names the half that broke. Failed to connect to "localhost:1": followed by a socket error means the tunnel window is closed or the server isn't running. Failed to authenticate with the server. with the server's reason under it means the VNC password is wrong.

A direct connection without the tunnel

a direct connection without the tunnel
tigervncserver -kill :1
tigervncserver -localhost no :1 -- xfce
sudo ufw allow 5901/tcp

The server now listens on every address (Listening for VNC connections on all interface(s), port 5901 in its log) and offers VncAuth,TLSVnc. TLSVnc encrypts the session without proving the server's identity, and VncAuth leaves everything after the password in the clear, so keep this to a network you trust. Point the viewer at the machine itself:

a direct connection without the tunnel
.ncviewer64-1.16.2.exe <linux-host>:1

To stop the desktop and close the port:

a direct connection without the tunnel
tigervncserver -kill :1 -clean
sudo ufw delete allow 5901/tcp

-clean deletes that display's log too.

Fedora 45: what changes

Two people at laptop-and-monitor desks face each other, joined by a dashed line that runs through a row of three upright slabs.

Fedora 45 Workstation has the same GNOME Remote Desktop panel (gnome-remote-desktop 51), so the Desktop Sharing and Remote Login steps carry over. If the panel is missing, run sudo dnf install gnome-remote-desktop.

The firewall is firewalld. Check the zone first with firewall-cmd --get-active-zones. The FedoraWorkstation zone already accepts TCP 1025 to 65535, so 3389 and 5901 are open there without a rule, which is one more reason to keep VNC on localhost. In other zones, add the port for now and permanently:

fedora 45: what changes
sudo firewall-cmd --add-port=3389/tcp
sudo firewall-cmd --permanent --add-port=3389/tcp

Use 5901 for a direct VNC connection; --remove-port with the same two forms undoes it.

xrdp on Fedora 45

xrdp on fedora 45
sudo dnf install xrdp xorgxrdp xrdp-selinux xfce4-session xfwm4 xfce4-settings xfce4-panel xfdesktop Thunar xfce4-terminal
sudo systemctl enable --now xrdp

Fedora ships xrdp 0.10.6.1, and xrdp-selinux holds the SELinux policy module it needs. The Xfce packages are what Xfce's default session starts (window manager, settings daemon, panel, desktop and file manager) plus a terminal, and they don't bring a second display manager. Fedora's start script ends in /etc/X11/xinit/Xsession, which runs ~/.xsession only when it's executable and otherwise falls back to gnome-session. Create the same ~/.xsession as on Ubuntu, chmod +x included. The unit names, the checks and the log lines are the same; remove it with sudo dnf remove xrdp xorgxrdp xrdp-selinux.

TigerVNC on Fedora 45

Fedora packages TigerVNC 1.16.2 with upstream's systemd route instead of a wrapper: the server is tigervnc-x11-server, the password tool is vncpasswd, and the unit is vncserver@.service.

tigervnc on fedora 45
sudo dnf install tigervnc-x11-server xfce4-session xfwm4 xfce4-settings xfce4-panel xfdesktop Thunar
vncpasswd

Run vncpasswd as the desktop's user. Then, as root, map display :1 to that user with a line in /etc/tigervnc/vncserver.users:

tigervnc on fedora 45
:1=<user>

As the user, create ~/.config/tigervnc/config:

tigervnc on fedora 45
session=xfce
localhost

session= has to match a file in /usr/share/xsessions. xfce is the one xfce4-session installs, and Fedora 45 has no GNOME file there. localhost keeps Xvnc on loopback for the tunnel. Start it and check:

tigervnc on fedora 45
sudo systemctl enable --now vncserver@:1
systemctl status vncserver@:1
ss -ltn 'sport = :5901'

The log is ~/.local/state/tigervnc/<host>:1.log. The service won't start a desktop for a user who is already logged into a graphical session, so use an account that isn't logged in at the console. The Windows side is the same tunnel and viewer as above. For a direct connection, delete the localhost line and restart the unit; stop it with sudo systemctl disable --now vncserver@:1.

Test the port from Windows

A person at a laptop sends a dashed line through three upright slabs to a server rack, which shows a check mark.

When a client can't connect, check the port before reading logs:

test the port from windows
Test-NetConnection <linux-host> -Port 3389

TcpTestSucceeded : True means something answered on that port. False points at a firewall, the wrong address or no listener, and the cmdlet can't tell those apart, so check the listener with ss on the Linux side as well. Use 3390 for Desktop Sharing next to Remote Login, or 22 to test SSH before you open a tunnel.

If someone is sitting at the Ubuntu machine and you need their screen, switch on Desktop Sharing; on a stock Ubuntu Desktop nothing needs installing on either side. For your own work, Remote Login gives you real GNOME on a machine nobody is using, and xrdp with Xfce is the one to install when several people need desktops or sessions have to outlive a dropped connection. Keep TigerVNC for machines where SSH is the only way in.

FAQs

Do copy and paste and drive sharing work in an xrdp session?

Copy and paste of text and images works in both directions on both distros (xrdp clipboard support). Drive sharing depends on the distro. Ubuntu 26.04 builds xrdp without FUSE, so drive redirection doesn't work there and no ~/thinclient_drives appears. On Fedora 45, tick the drives under Local Resources ‣ More in mstsc before you connect, and they mount in ~/thinclient_drives, the FuseMountName set in /etc/xrdp/sesman.ini.

Can the TigerVNC viewer on Windows open the SSH tunnel itself?

No. The -via option that starts SSH for you exists only in the Linux and macOS builds; the Windows build leaves it out. Keep the ssh -N -L window open while you work.

community thread

Discuss this in the community

Questions about this, or a setup it does not cover? Ask in Using VNC Technology.

Using VNC Technology group

last active 2 Sep 2026, 11:07