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.
- A host system running Ubuntu 18.04
- A client system running Ubuntu 18.04 or Windows
- A user account with sudo privileges
- Access to a terminal window/command-line (Ctrl–Alt–T)
Enable Remote Desktop Sharing on Ubuntu
Before you log into an Ubuntu system, you’ll need to prepare it for sharing:
- Boot to the Ubuntu desktop.
- Navigate to the down-arrow in the upper-right corner.
- Find the screwdriver/wrench icon to open the Settings page.
- Click the Sharing option.
- In the upper-right corner of the settings box, switch the settings to turn Sharing On.
- You will see the computer name. Below that, enable the field that shows Screen Sharing Off.
- 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.
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.
- Close all the dialog boxes. You should now see that Screen Sharing (is) Active.
- Check your system’s IP address by entering the following command into a terminal:
The system will display your IP address. Now, you are ready to set up your client.
Note: If you are new to remote access security, please refer to our article Best Practices For Securing Remote Access to gain insight into practices, software and common mistakes.
Set Up Remote Desktop Connection
Establish Remote Desktop Connection With Remina Desktop Client
- 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
- To open Remmina, press the super (Windows) key to start a search, then type:
- The package should be listed in the results. Find the icon to launch the software.
- A new Remmina Remote Desktop Client window will open. Click the + icon in the upper-left to create a new connection.
- 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.
- 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.
- 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.
- Download and install the RealVNC viewer.
- Launch VNC Viewer, and select File > New Connection.
- 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.
- 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.
- Click OK to save the connection. It should appear in the main window as a new connection icon, with the memorable name you chose.
- Double-click the connection icon to connect.
- 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.
You should now be capable of setting up your Ubuntu system for a remote desktop connection. Remember, when not being used, disabling desktop sharing is a recommended server security practice.
Next, learn how to Enable RDP Using xrdp on Ubuntu.