Remote Desktop is a service that allows you to take over and use another computer remotely. In Ubuntu, it can be enabled on a graphical client machine to control a host machine. This feature is beneficial for users who are using a point-and-click interface or are not familiar with a command-line.

This guide will show you how to enable Remote Desktop on Ubuntu.

tutorial on how to enable and set up remote desktop connection on ubuntu

Prerequisites

  • host system running Ubuntu 18.04
  • client system running Ubuntu 18.04 or Windows
  • A user account with sudo privileges
  • Access to a terminal window/command-line (CtrlAltT)

Enable Remote Desktop Sharing on Ubuntu

Before you log into an Ubuntu system, you’ll need to prepare it for sharing:

  1. Boot to the Ubuntu desktop.
  2. Navigate to the down-arrow in the upper-right corner.
  3. Find the screwdriver/wrench icon to open the Settings page.

how to find setting in ubuntu

  1. Click the Sharing option.
  2. In the upper-right corner of the settings box, switch the settings to turn Sharing On.

enable sharing turned on ubuntu

  1. You will see the computer name. Below that, enable the field that shows Screen Sharing Off.
  2. A new dialog box will open. In the upper-left corner, switch to Screen Sharing On. Configure the other options as follows:
      • Check the Allow connections to control the screen checkbox.
      • Check the Require a password checkbox.
      • Enter a password up to 8 characters.

screen sharing allowing remote access


Note: New connections must ask for permission and will not work when establishing remote access. With this enabled, a user must physically grant access for each connection.


  1. Close all the dialog boxes. You should now see that Screen Sharing (is) Active.
  2. Check your system’s IP address by entering the following command into a terminal:
hostname –I

command to check IP address on ubuntu

The system will display your IP address. Now, you are ready to set up your client.

Set Up Remote Desktop Connection

Establish Remote Desktop Connection With Remina Desktop Client

  1. Use the Remmina package to connect from a different Ubuntu system (that is on the same network). The package should be installed by default. If you cannot find it on the system, install it from the terminal:
sudo apt install remmina
  1. To open Remmina, press the super (Windows) key to start a search, then type:
remmina

find remmina icon in search

  1. The package should be listed in the results. Find the icon to launch the software.
  2. A new Remmina Remote Desktop Client window will open. Click the + icon in the upper-left to create a new connection.

example of remmina remote desktop client window

  1. Fill out the following information:
      • Name: Enter a name that is meaningful, such as Email Server or Office Laptop, to serve as the name of the connection.
      • Group: Optional, for grouping several connections.
      • Protocol: Use the drop-down to select VNC – Virtual Network Computing.
      • Pre-Command: Leave as-is.
      • Post-Command: Leave as-is.
  1. Below this, there are three tabs, open to the Basic tab. Fill it out as follows:
      • Server: Use the IP address of the host system or a server name if you have one.
      • Repeater: Leave blank.
      • User Name: This does not correspond to any user accounts, so enter any name you want.
      • Password: Type the password you set in Desktop Sharing on the host system.
      • Colour Depth: This is a trade-off between speed and quality, choose the best fit for your network.
      • Quality: It is good to start with Medium as you can adjust it later.
      • Keyboard Mapping: Leave blank.
  1. Click the Save button to save this connection as a favorite. You should be back in the Remmina window now, with your new connection listed. Double-click on it to connect.

With everything set, it takes over the system. A notice will pop up on the host system, notifying that another user is controlling the desktop. It will list the IP address from which you are connecting.

How to Connect to Ubuntu Desktop From Windows

Windows needs a VNC client application to connect. Windows doesn’t come with one pre-installed. This guide will use RealVNC, for its simple interface. You can use any VNC client application you wish.

Some VNC clients don’t work well with Windows and encryption. You can make encryption optional on the host Linux system by entering the following into a terminal:

gsettings set org.gnome.Vino require-encryption false

Note: This step sacrifices security for compatibility. Avoid using this step over the internet, or an insecure network. Avoid sending any sensitive data, as it can be more easily intercepted.


  1. Download and install the RealVNC viewer.
  2. Launch VNC Viewer, and select File > New Connection.
  3. This will open a dialog box for you to configure the connection to the Ubuntu system. Fill out the fields as follows:
      • VNC Server: Use the IP address (or server name, if you have one) for the Ubuntu host.
      • Name: This is a local name for the connection — choose a name that’s memorable.
      • Labels: Optional, if you want to use labels for managing multiple connections.
  1. The Security field is below, and there are a couple of important points:
      • Encryption: Should be set to Let VNC Server choose.
      • Authenticate using single sign-on (SSO) if possible: Leave unchecked.
      • Authenticate using a smart card or certificate store if possible: Leave unchecked.
  1. Click OK to save the connection. It should appear in the main window as a new connection icon, with the memorable name you chose.
  2. Double-click the connection icon to connect.
  3. If successful, you’ll see a warning message pop up saying this is an Unencrypted connection. We did that on purpose. To connect, click Continue.

You should now see the Ubuntu desktop from the host system in the VNC Viewer window.


Note: The VNC protocol has some built-in encryption, but it is not entirely safe. Unless you are in a secured internal network, avoid sending any sensitive data via VNC.


Conclusion

You should now be capable of setting up your Ubuntu system for a remote desktop connection. Remember, when not being used, disable desktop sharing it’s recommended and a server security best practice.