ObjectiveThe following tutorial will explain how to setup client/server remote desktop sharing on Ubuntu 18.04 Bionic Beaver.
Operating System and Software Versions
- Operating System: - Ubuntu 18.04 Bionic Beaver
RequirementsPrivileged access to your Ubuntu System as root or via
sudocommand is required.
- # - requires given linux commands to be executed with root privileges either directly as a root user or by use of
- $ - requires given linux commands to be executed as a regular non-privileged user
Other Versions of this TutorialUbuntu 20.04 (Focal Fossa)
Enable Remote Desktop SharingTo begin, we first need to make sure that remote desktop sharing is installed on the target Ubuntu system:
$ sudo apt update && sudo apt install -y vinoNext, step is to enable remote sharing:
The UAF Geophysical Institute, is looking for an experienced Linux Systems Analyst to join their team of research cyber infrastructure analysts and engineers. LOCATION: Fairbanks, Alaska, USA
Open up terminal and enter:
In case you have the UFW firewall enabled, open the port
$ ss -lnt State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 0.0.0.0:22 0.0.0.0:* LISTEN 0 5 127.0.0.1:631 0.0.0.0:* LISTEN 0 128 127.0.0.1:6010 0.0.0.0:* LISTEN 0 128 0.0.0.0:38299 0.0.0.0:* LISTEN 0 5 0.0.0.0:5900 0.0.0.0:* LISTEN 0 128 [::]:22 [::]:* LISTEN 0 5 [::1]:631 [::]:* LISTEN 0 128 [::1]:6010 [::]:* LISTEN 0 128 [::]:39717 [::]:* LISTEN 0 5 [::]:5900 [::]:*
5900for incoming connections:
$ sudo ufw allow from any to any port 5900 proto tcp Rule added Rule added (v6)If you wish to make your firewall rules more strict visit our How to Open/Allow incoming firewall port guide for more information.
Establish Remote Desktop ConnectionAt this stage we are ready to turn our attention to a client system from which we will be establishing connection to a remote Ubuntu desktop.
Remina Desktop ClientThe first remote desktop client we are going to use to create a remote desktop connection is Remmina.
Remmina remote desktop client should already be installed on your Ubuntu 18.04 system. In case you need to install it execute:
$ sudo apt install remminaUse the
activitiesmenu to search and start the Remmina remote desktop client or run the command:
VNC Remote Desktop ClientYet, another alternative to connect to a Ubuntu remote desktop sharing is by use of VNC client. First, install VNC on your client Ubuntu system:
$ sudo apt install tigervnc-viewerUnlike the above Remina remote client the VNC client does not support encryption. Any attempt to connect to a Remote desktop sharing server will result in
No matching security typeserror. linux command to disable the remote server to require an encryption for connecting VNC clients:
$ gsettings set org.gnome.Vino require-encryption falseConfirm that the encryption on your remote server is disabled:
$ gsettings list-recursively org.gnome.Vino | grep encrypt org.gnome.Vino require-encryption falseGiven that the encryption is now disabled, to add some level of privacy you may optionally first create SSH tunnel to your remote desktop for your VNC client on port
5900before making VNC connection.
We should now be able to connect to a remote desktop using
$ vncviewer ubuntu-remote-desktop