In this guide I'll show you how to enable screen sharing between Ubuntu and RealVNC (on Windows, Mac or another Linux computer).
The screen sharing tool used in this guide
Vino
is replaced bygnome-remote-desktop
in Ubuntu 21.04 and this seems to be broken. A (better) alternative is to usex11vnc
. This also solves the problem ofVino
not being able to log you in when the remote computer is locked. https://blog.gordonbuchan.com/blog/index.php/2021/08/22/installing-x11vnc-to-replace-broken-screen-sharing-on-ubuntu-21-04/
Check if Vino
is installed. Install if not.
sudo apt update && sudo apt install vino
Enable screen sharing. Go to the Settings app and go to Sharing. Set Sharing to On (top right corner of the screen).
Now click on Screen Sharing and set it this to On too. Select Allow connections to control screen and Require a password. The password can be only 8 characters long.
Don't forget to select a network. If no networks are selectable see troubleshooting below.
To connect to the remote machine, I use RealVNC viewer. It looks good and modern and you can save multiple connections (up to 5 for free). One problem with RealVNC is that it doesn't work with encrypted connections from Windows to Ubuntu.
As Ubuntu requires encryption by default, we have to specifically allow unencrypted connections. Open a terminal to the Ubuntu server or on the server and enter the following command.
gsettings set org.gnome.Vino require-encryption false
Alternatively you can install the dconf-editor and disable this visually.
sudo apt install dconf-editor
dconf-editor
Browse to org / gnome / desktop / remote-access or search for require-encryption
and set to OFF.
Open RealVNC viewer on your laptop or computer and connect to the IP-address or servername of the server followed by the port number; 5900. In my case: JDPNSR:5900
. When the connection is made, the server will ask for the password set in step 3.
create a file:
sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
And then set managed=true
in /etc/NetworkManager/NetworkManager.conf
:
sudo nano /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=false
[device]
wifi.scan-rand-mac-address=no