How to remote desktop into Ubuntu

Learn how to set up and use remote desktop access on Ubuntu, with easy-to-follow steps for both VNC and RDP solutions

Ubuntu logo
(Image credit: Ubuntu)

Ubuntu is one of the most popular distros in the Linux world, renowned for its stability and robust hardware compatibility. For IT professionals managing mixed environments, establishing remote desktop access to Ubuntu is often a critical requirement. Whether you need to manage servers, provide remote support, or access your development environment, connecting remotely streamlines workflows.

Fortunately, Ubuntu 24.04 LTS has significantly modernized its remote capabilities. While older versions relied heavily on VNC, modern Ubuntu now natively supports the Remote Desktop Protocol (RDP) out of the box. This ensures smoother performance, audio redirection, and clipboard sharing without complex third-party installations.

This guide explores the two primary methods: using Ubuntu’s built-in modern RDP/VNC server (best for sharing your local screen) and installing the xRDP service (best for creating independent virtual sessions).

Remote desktop options for Ubuntu

Historically, Ubuntu's built-in remote desktop solution relied on Virtual Network Computing (VNC). While VNC remains a versatile, cross-platform option supported by clients like TightVNC or TigerVNC for Windows, and RealVNC Viewer, modern Ubuntu versions (22.04 LTS and later) have undergone a significant shift.

Today, Ubuntu’s native sharing capability defaults to the Remote Desktop Protocol (RDP). Unlike previous iterations that required installing additional packages like xRDP, the current GNOME desktop environment includes a high-performance RDP server out of the box. This provides a smoother experience with better security, clipboard sharing, and audio redirection compared to older VNC implementations.

For IT professionals connecting from Windows, this is good news: you can now use the standard Windows "Remote Desktop Connection" tool to access your Ubuntu machine without installing third-party VNC clients. However, if you require legacy support or are connecting from older Linux distributions, Ubuntu still allows you to toggle on the traditional VNC protocol within the system settings.

When the roles are reversed, and you need to connect from your Ubuntu machine to other Windows, macOS, or Linux systems, Ubuntu includes the versatile Remmina Remote Desktop Client. Remmina is a powerhouse tool that supports RDP, VNC, and SSH protocols, offering a centralized dashboard to manage all your remote infrastructure without juggling separate applications.

Step 1: How to Enable Screen Sharing on Ubuntu 24.04.1

Configuring Ubuntu's built-in server is straightforward, but the location has moved in recent versions (Ubuntu 24.04 LTS):

  1. Access System Settings: Click the top-right system menu or press the Super key (Windows key) and search for Settings.
  2. Navigate to Remote Desktop: On the left sidebar, click System, then select Remote Desktop. (Note: In older versions, this was under "Sharing").
  3. Unlock Settings: Click the Unlock button at the top and enter your password.
  4. Enable Remote Desktop: Toggle the switch to ON.
  5. Select Protocol: a) Remote Desktop Protocol (Recommended): Ensure this is toggled on. It offers better performance and security than VNC. b) Legacy VNC: Only toggle this if you specifically need to connect from an old VNC viewer.
  6. Set Credentials: Under "Login Details," note the User Name and set a Password. You will need these to log in.

Note: If you need to connect to the machine while it is logged out (headless mode), switch to the "Remote Login" tab and enable that feature.

Step 2: How to find the IP address of your Ubuntu computer

To establish a remote desktop connection, the client software needs the network address of the target Ubuntu machine. You'll typically use the internal IP address if connecting within the same local network.

  1. Access network aettings: Click the network icon (Wi-Fi or Ethernet symbol) in the top-right system tray area. Select your active connection (e.g., "Wired" or "Wi-Fi") and click Settings.
  2. Locate the IP address: In the window that appears, look for the IPv4 Address. This sequence of numbers (e.g., 192.168.1.105) is what you will need later.
  3. Pro tip: For consistent access, configure a static IP address in your router settings so this number doesn't change after a reboot.

With the IP address identified, you're ready to configure your VNC client on the remote machine.

How to connect (Windows, Mac, & Linux)

Since Ubuntu now supports RDP natively, you likely do not need to install third-party software if you are on Windows.

  • For Windows Users:Open the built-in "Remote Desktop Connection" app (search for mstsc). Enter the IP address found in Step 2 and click Connect. When prompted, use the username and password you set in Step 1.
  • For macOS Users:Download Microsoft Remote Desktop from the Mac App Store. Click "Add PC," enter the IP address, and save. Double-click the icon to connect.
  • For Linux/VNC Users:If you enabled the "Legacy VNC" protocol in Step 1, you will need a viewer like Remmina (Linux), RealVNC, or TightVNC. Enter the IP address followed by the port if necessary (e.g., 192.168.1.105:5900) - see step 4.

Alternative Method: Using xRDP (For Virtual Sessions)

The native RDP method (above) mirrors your screen. However, if you want to create a new, independent session (like a terminal server) or if you are using a desktop environment other than GNOME (like XFCE), you should use xRDP.

  1. Open Terminal: Press Ctrl + Shift + T.
  2. Install xRDP: Type sudo apt install xrdp -y and press Enter.
  3. Enable Service: Type sudo systemctl enable --now xrdp.
  4. Important: You must log out of the physical Ubuntu machine before connecting via xRDP, as Linux typically allows only one graphical session per user at a time.

Step 4: How to install a VNC client

On the computer from which you want to connect to your Ubuntu machine, you must install a VNC client (also known as a VNC viewer). As mentioned, excellent free and open-source options exist:

TightVNC: A popular choice for Windows users.

TigerVNC: A high-performance client available for multiple platforms.

RealVNC Viewer: Offers broad platform support, including mobile devices.

UltraVNC: Another feature-rich option for Windows.

Download your preferred VNC client from its official website and follow the standard installation procedure for your operating system. These clients are generally lightweight and require minimal configuration post-installation.

For this guide's example using TightVNC on Windows: download the installer, run it accepting the defaults, and the TightVNC Viewer application will be ready to use.

Your Ubuntu machine can now accept incoming RDP connections. You can connect using the "Remote Desktop Connection" tool built into Windows (search for mstsc.exe) or download official Microsoft Remote Desktop clients for macOS, Android, and iOS from their respective app stores. Use your Ubuntu username and password when prompted by the RDP client.

Refer to our detailed guide on how to use Microsoft Remote Desktop Connection for client-side specifics.

Things to consider when using Ubuntu remote desktop

While RDP is now the standard, consider these factors for a robust setup:

  • Secure Shell (SSH): For command-line access, SSH remains the industry standard. It is lightweight, secure, and perfect for file management (scp) or administration without the lag of a GUI.
  • Wayland vs. Xorg: Ubuntu 24.04 uses the Wayland display server by default. The built-in RDP server works perfectly with Wayland. However, if you use older tools like xRDP or TeamViewer and experience "black screens," you may need to switch to Xorg. Log out, click your user, click the gear icon in the bottom right, and select "Ubuntu on Xorg".
  • Security: Never open RDP (Port 3389) or VNC (Port 5900) directly to the internet. Hackers scan for these ports constantly. Instead, use a VPN (like WireGuard) to connect to your local network first, or use SSH Tunneling to forward the connection securely.
  • Performance: Wired Ethernet connections will always outperform Wi-Fi for remote desktop tasks. If the connection is laggy, lower the color depth in your client settings.

Further reading on remote desktops

If you’d like to dive deeper into remote desktop technologies, we offer a range of articles to help you explore different protocols and platforms. Learn more about key options like RDP, XRDP or VNC, and discover what TeamViewer has to offer. Additionally, if you're using Microsoft products, you might find our guide on Microsoft Remote Desktop particularly useful.

For those working with macOS, we also provide step-by-step instructions on setting up a remote desktop on a Mac, configuring Chrome Remote Desktop, and how to remote desktop from Mac to Windows.

Troubleshooting common remote desktop issues on Ubuntu

Even with a robust setup, issues can arise:

  • Black Screen upon connection: This is the most common issue. It usually happens because you are logged in locally on the physical machine while trying to start a new session remotely via xRDP. Solution: Log out of the physical machine first, or use the native "Desktop Sharing" RDP built into Settings instead of xRDP.
  • Connection Refused: Check that the service is active (System > Remote Desktop is ON) and that your firewall (ufw) isn't blocking the port. You can allow access with sudo ufw allow form 192.168.1.0/24 to any port 3389.
  • Password Rejected: Ensure you are using the specific "Remote Desktop Password" set in the settings menu, which may be different from your system login password, depending on how you configured it.

Choosing the right protocol: VNC vs. RDP on Ubuntu

Understanding the difference ensures you pick the right tool:

  • RDP (Native): Best for 99% of users. It supports audio, clipboard syncing, and dynamic resolution resizing. It is secure and built into Windows/Mac.
  • VNC (Legacy): Best for connecting from older Linux distributions or specialized hardware (like Raspberry Pis) that only have VNC viewers. It is generally slower and less secure than RDP.
  • xRDP: Best for "Headless" servers where you need to spawn a virtual desktop environment rather than viewing a physical monitor.

Which should I choose?

Understanding these distinctions will help you follow the most relevant steps in this guide for establishing effective remote desktop access to your Ubuntu system.

Rene Millman

Rene Millman is a freelance writer and broadcaster who covers cybersecurity, AI, IoT, and the cloud. He also works as a contributing analyst at GigaOm and has previously worked as an analyst for Gartner covering the infrastructure market. He has made numerous television appearances to give his views and expertise on technology trends and companies that affect and shape our lives. You can follow Rene Millman on Twitter.