ubuntu enable remote desktop

SSH is the standard method for remote login on Ubuntu, but it’s typically only used for CLI access. If you want to access the desktop and other graphical components, you’ll need to set up Remote Desktop on the two systems. This basically means installing a suitable program on the client system and configuring the server to allow remote connections.

Setup Remote Desktop on Client

Remote Desktop clients typically use Remote Desktop Protocol (RDP) or Virtual Network Computing (VNC) for remote connections. Ubuntu comes preinstalled with a remote desktop client called Remmina that supports these and more protocols.

We’ll use Remmina, but there are other good options like xrdp or nomachine too if you want an alternative to Remmina.

Prepare Server For Remote Access

Next, we’ll configure the server to allow it to be accessed remotely. 

  1. Launch the Settings app and go to the Sharing tab.
    remote desktop ubuntu
  2. Toggle on Remote Desktop and Remote Control. Enable VNC as well if you want to use VNC to connect.
    enable remote desktop ubuntu
  3. Note the username and password from the Authentication section. You can set a custom password if you want.
    remote desktop authentication ubuntu
  4. Restart the system to apply the changes.
  5. Allow incoming traffic through port 3389 (RDP) or 5900 (VNC) like so
    • sudo ufw allow 3389/tcp
    • sudo ufw allow 5900/tcp
  6. Finally, check the server’s IP address with hostname -I.
    hostname I IP address ubuntu

Establish Remote Connection

Now that both the client and server are ready, all that’s left is to establish the connection.

  1. Launch Remmina or whichever program you’re using on the client system.
  2. Click on the New connection profile button.
    remmina add a connection profile
  3. Select the Connection Protocol. We’re going with RDP. Then, fill in the server address, username, and password from the previous section.
    reminna connection profile
  4. You can configure additional settings like multi-monitor support, resolution, connection quality, behavior, etc if you want. Once you’re done, press Connect or Save and Connect.
    remmina advanced settings
  5. Accept the certificate prompt to establish the connection.
    accept certificate remmina

Remote Access Ubuntu from Windows

So far, we’ve covered how to establish a Remote Desktop connection between two Linux systems. The overall process is the same for remotely accessing Ubuntu from Windows, or vice-versa, but the exact steps will slightly vary.

Windows includes a native Remote Desktop Connection client. You can launch it with the mstsc run command.

Enter the Linux system’s IP address, username, and password here and hit Connect.

If you’re trying to remote access Windows instead, use the systempropertiesremote run command. Enable remote connections from this page and save the new settings.

Then, use ipconfig to find the Windows system’s IP Address.

Finally, launch Remmina or any other client on the Ubuntu system. Enter this IP address along with the username and password to establish the connection.

Anup Thapa

Senior Writer

Anup Thapa is a Linux enthusiast with an extensive background in computer hardware and networking. His goal is to effectively communicate technical concepts in a simplified form understandable by new Linux users. To this end, he mainly writes beginner-friendly tutorials and troubleshooting guides. Outside of work, he enjoys reading up on a range of topics, traveling, working out, and MOBAs.