Skip to content

What is Ubuntu Remote Desktop Access from Windows 10/11

Remote desktop is a feature that allows a user to log into another system and control it the same way they would if they were sitting right in front of it. You are able to see the screen exactly as it appears on the remote system itself, and use the keyboard and mouse. Windows 10/11 and Ubuntu both have remote desktop options, and although the operating systems are vastly different, we can use protocols like RDP and VNC to remotely access an Ubuntu system from Windows.

In this tutorial, we will go through the step by step instructions to use a Windows 10 or 11 system to access an Ubuntu system with remote desktop. This will include Windows’ built in and proprietary RDP (Remote Desktop Protocol), and VNC (Virtual Network Computing), which relies on the RFB protocol, and is completely open source and free. We will see how to use both of them below; let’s get started!

In this tutorial you will learn:

  • How to set up remote desktop access on Ubuntu with RDP and TigerVNC
  • How to use Remote Desktop or TightVNC to connect remotely from Windows
Ubuntu Remote Desktop Access from Windows 10/11
Ubuntu Remote Desktop Access from Windows 10/11
CategoryRequirements, Conventions or Software Version Used
SystemUbuntu Linux LTS versions 20.04, 22.04, or 24.04, and Windows 10 or 11
Softwarexrdp, TigerVNC, TightVNC
OtherPrivileged access to your Linux system as root or via the sudo command.
Conventions# – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Remote Desktop (RDP) Setup for Windows 10/11 and Ubuntu



NOTE
The newest versions of Ubuntu have a Remote Desktop feature already built in, which is directly compatible with Microsoft Windows 10/11 RDP. In the first steps below, we will attempt to enable this feature. If your Ubuntu version is older and does not have the feature, then continue with installing XRDP as shown below.

Most users will probably want to utilize Microsoft’s own RDP protocol for setting up remote desktop access to an Ubuntu Linux system. The feature is already baked into Windows 10 and 11 by default, and Ubuntu can attain compatibility with RDP with a simple package installation. Follow along with the steps below to see how.

Ubuntu Configuration – Default Remote Desktop

We will start out on the Ubuntu system. If your system does not have the feature shown below, then you will need to proceed to the next section in which we install XRDP on Ubuntu.

  1. Start by searching for the Settings menu from the Activities overview on your Ubuntu desktop.Opening the Settings menu on Ubuntu
  2. Click on the System tab, and then click on Remote Desktop.Accessing the default remote desktop settings in Ubuntu
  3. In this window pane, enable the Desktop Sharing and Remote Control options. You can also edit the username and password at the bottom of the window. These will be the credentials that you use from Windows to log into the Ubuntu system.Enabling Remote Desktop on Ubuntu and setting up login credentials
  4. The default port for Remote Desktop Protocol is 3389. Therefore it will be necessary to allow this port through the firewall on the Ubuntu system. Execute the following ufw command to configure this exception:$ sudo ufw allow from any to any port 3389 proto tcp
  5. You will also need to know the IP address of the Ubuntu system. If it is on your local network, then retrieve the local IP with the ip a command:$ ip a https://92dba1d651f843398e645e22e8fa21e3.safeframe.googlesyndication.com/safeframe/1-0-40/html/container.html
    Or if you plan on connecting from over the internet, you can check the external IP address:$ wget -qO- ifconfig.me

Once done, you can proceed to the Windows Configuration section below.

Ubuntu Configuration – XRDP

If you were able to follow along with the steps above, you can skip this section and move onto the Windows configuration. However, if your Ubuntu system did not have the feature above built into the Settings menu, then you will need to proceed with the steps below for installing XRDP, a Windows-compatible RDP server.

  1. For the first step, you will need to install the xrdp package on Ubuntu. This will install an RDP server on the system and allow Microsoft systems to connect via remote desktop. Execute the following commands to install the software:$ sudo apt update $ sudo apt install xrdp
  2. In order to make sure that the xrdp service starts up automatically upon future system reboots, we can enable it in systemd. The following command will start the service and ensure that it starts up automatically in the future:$ sudo systemctl enable –now xrdp
  3. The default port for Remote Desktop Protocol is 3389. Therefore it will be necessary to allow this port through the firewall on the Ubuntu system. Execute the following ufw command to configure this exception:$ sudo ufw allow from any to any port 3389 proto tcp
  4. You will also need to know the IP address of the Ubuntu system. If it is on your local network, then retrieve the local IP with the ip a command:$ ip a Or if you plan on connecting from over the internet, you can check the external IP address:
    $ wget -qO- ifconfig.me

Windows Configuration

Now it is time to switch over to the Windows 11/10 computer and connect to the Ubuntu system through Remote Desktop.

  1. Open the Start menu and search for “Remote Desktop,” and open the application from the search results.Opening the Remote Desktop Connection application on Windows
  2. In the Remote Desktop window, enter the IP address or hostname of the Ubuntu system that you are trying to connect to, then click on “Connect.”Enter the IP or hostname information of the Ubuntu machine
  3. Windows will issue a warning that it can’t determine the security of the remote system. This is because Windows prefers connecting to other Windows systems, and can’t detect the security status of Linux, so this prompt can be safely ignored.Warning about connecting to potentially insecure system
  4. Users that were able to enable the default remote desktop feature will be asked to authenticate, and then will be given direct access to the remote Ubuntu desktop.Authenticating with Remote Desktop to log into the Ubuntu system
  5. If you followed the directions for XRDP above, then there are still two more steps. We are now connected to the system and need to authenticate with our Ubuntu account credentials in order to access the desktop.Enter your Ubuntu login information to continue to the desktop
  6. After logging in, you will be granted access to the Ubuntu system through Remote Desktop.Successfully connected to Ubuntu via Remote Desktop on Windows

VNC Setup for Windows 10/11 and Ubuntu

In this section, we will show how to utilize VNC for remote desktop connections from Windows to Ubuntu. This is a viable alternative to the default RDP, and is open source, which some users may prefer. Furthermore, if you encounter too many problems with getting RDP to work, it would be a good idea to give VNC a try instead.

Ubuntu Configuration

We will start out on the Ubuntu machine. Follow along with the steps below to get a VNC server set up, and then you can move onto the next section and try connecting from the Windows computer.

  1. Get started by opening a command line terminal and issuing the following command to install Tiger VNC server:$ sudo apt update $ sudo apt install tigervnc-common tigervnc-standalone-server tigervnc-tools tigervnc-viewer tigervnc-xorg-extension
  2. In this step, we will create a VNC config for our current user. If you want to create a new user to use with VNC, use the useradd command and then switch to that user with su before proceeding with the next command.$ vncpasswd Enter your desired password twice. Optionally, you can configure a view only password, which will allow someone to connect only to view your desktop.
  3. The next step is to configure some settings for our VNC server. You can use nano or your preferred text editor to create the VNC config file and apply your desired edits to it:$ nano ~/.vnc/config
  4. We will apply the following configuration to this file:
    https://92dba1d651f843398e645e22e8fa21e3.safeframe.googlesyndication.com/safeframe/1-0-40/html/container.htmlsession=gnome geometry=1920×1080 localhost alwaysshared You can edit the session setting with your desired desktop environment, as long as you have it installed. The geometry settings sets the native resolution of the VNC session and you can adjust it accordingly. Save your config file and exit it when done.
  5. Next, we will assign a default VNC display number to our user. This is can be configured within the vncserver.users file. Use nano or your preferred text editor to open this file with root permissions:$ sudo nano /etc/tigervnc/vncserver.users
  6. We will assign display number 1 to our user linuxconfig. If you are setting up multiple VNC users, then each one should have their own display number.# TigerVNC User assignment # # This file assigns users to specific VNC display numbers. # The syntax is <display>=<username>. E.g.: # # :2=andrew # :3=lisa :1=linuxconfig Save your changes to this file and exit it when done.
  7. Next, execute the following two systemctl commands with root permissions in order to start VNC server for the display number 1 and to make it start up automatically upon future system boots:$ sudo systemctl start tigervncserver@:1 $ sudo systemctl enable tigervncserver@:1
  8. Make sure you configure your firewall to allow incoming VNC connections. Since we are configuring display number 1 in this example, we will open port number 5901. Display 2 would use port 5902, etc.
    $ sudo ufw allow 5901/tcp
  9. You will also need to know the IP address of the Ubuntu system. If it is on your local network, then retrieve the local IP with the ip a command:$ ip a Or if you plan on connecting from over the internet, you can check the external IP address:$ wget -qO- ifconfig.me

We can now move over to the Windows 10/11 computer and set up a VNC viewer application on that PC. Then we will be able to use it to access a remote desktop connection to the Ubuntu system.

Windows Configuration

In this section, we will install the Tight VNC viewer so that we can connect to the VNC server that we just finished configuring on the Ubuntu machine in the previous section.

  1. First, head over to the Tight VNC official download page to grab the latest version of the program.Downloading Tight VNC on WindowsOpen the file and run it to start the installation process once the file finishes downloading.
  2. During the installation prompts, when you get to the “Choose Setup Type” prompt, click on “Custom.”Choosing setup type in the VNC installation
  3. Deselect the VNC Server component, as we only need to install the VNC Viewer of this application.Only install the VNC viewer component on WindowsClick “Next” and continue through the prompts until installation finishes.
  4. Now, open the freshly installed VNC Viewer from the Windows Start menu.Opening VNC viewer
  5. Enter the Ubuntu system’s IP address into the Remote Host box, and then click on Connect.Entering the Ubuntu IP address to connect to it with VNCYou are now connected to the Ubuntu desktop via VNC on Windows.

Troubleshooting

While attempting to connect to the Ubuntu system from Windows Remote Desktop, you may encounter one of the following errors:

Remote Desktop can’t connect to the remote computer for one of these reasons

This error will list a few different reasons for why it can’t connect:


https://92dba1d651f843398e645e22e8fa21e3.safeframe.googlesyndication.com/safeframe/1-0-40/html/container.html

  • Remote access to the server is not enabled
  • The remote computer is turned off
  • The remote computer is not available on the network

This is a generic error that essentially means that your computer could not connect to the remote machine. This could be because a firewall is blocking access, or because of some other device sitting between the two machine that is not allowing access. Try pinging the remote device – a successful ping will indicate that the two devices can communicate. If the ping fails, then check firewall settings and make sure you are using the correct port.

Unable to connect to RDP server

This error indicates that Windows can’t communicate with the Ubuntu system. Try pinging back and forth between both devices. If this fails, ensure you applied the firewall settings shown above, and check port forwarding settings if a router is sitting between the two computers.

Login failed for display 0

This error means that the connection was successful, but an incorrect username or password was supplied. Verify that you are using the correct username and password, then try connecting again.

XRDP session: Login failed

The username or password is incorrect, although the connection between the two systems succeeded.

Error – problem connecting

This is a generic errror that indicates a connectivity issue between the two computers. Most likely, the Windows PC is not able to communicate with the Ubuntu computer due to a firewall blocking the connection or another device between the two computers not allowing the connection to happen.

Cannot connect to the RDP server

This error indicates that the XRDP service is not properly configured, or is not running. Ensure that you have started the XRDP service as shown above, and applied the necessary configuration to it.

Connection reset by peer

This is an error you might receive when trying to connect to XRDP from rdesktop. Using the use_fastpath=both option has been known to remedy this problem.

Connection refused

This error means that the connection was attempted, but the target machine blocked it. This is usually due to supplying the wrong port number or because a firewall or other system security tool did not allow the connection through to the remote desktop service.

Session closed before being initialized

This error occurs when a successful connection is prematurely closed because it could not be configured properly. Try using Xorg on Ubuntu instead of Wayland (log out, then select Xorg when logging back in) to remedy this error.

Cannot connect to the console session

This error is caused by an IP address conflict. Run the following commands on your Windows computer to retrieve a new IP address, then try the connection again. If the error persists, then it is most likely a firewall issue.

ipconfig /release
ipconfig /renew

Protocol error

This means that the RDP protocol was not able to establish a session. Try restarting the XRDP service on Ubuntu. If the error persists, you may need to also restart the Windows machine.

Authentication is required to create a color managed device

This authentication error indicates that an incorrect username or password was supplied, or that the user you are logging in with does not have sufficient permissions to run a desktop session on Ubuntu.

Internal error has occurred

This ambiguous error will give more information inside of the /var/log/xrdp.log file. It indicates that an error has occurred on the Ubuntu computer and XRDP was not able to establish a desktop session with an incoming connection request. The log file should point to the culprit.

The connection has been closed

This error means that the connection has been closed due to a timeout or because of another user attempting to log in. If you continue receiving the error, you will need to restart the xrdp service with sudo systemctl restart xrdp to clear the login cache.

Unable to establish connection

This error indicates a connectivity issue between Windows and Ubuntu. Ensure that you have applied the firewall exception shown above, XRDP is running, and that both devices are able to ping each other.

xrdp_mm_process_login_response: login failed

This error occurs when an incorrect username or password has been supplied at login. If you are confident that you are using the correct credentials for logging in, some users have reported that commenting out the TerminalServerUsers=tsusers line inside of /etc/xrdp/sesman.ini file managed to remedy the issue.

Closing Thoughts


https://92dba1d651f843398e645e22e8fa21e3.safeframe.googlesyndication.com/safeframe/1-0-40/html/container.html

In this tutorial, we saw how to access an Ubuntu system via Windows 10 or 11 with Remote Desktop and VNC. Since Remote Desktop (RDP) is in Windows 11 by default, as well as the latest versions of Ubuntu, this is the easiest solution for setting up remote desktop connections between the two devices. However, if you are running an older Ubuntu version or the RDP method presents problems for you, VNC is an open source alternative that can also be used.

Leave a Reply

Your email address will not be published. Required fields are marked *