VNC Viewer unable to connect: Encryption Issue

sudo gsettings set org.gnome.Vino require-encryption false

has already been attempted, but the issue below prevails.

I have a Windows 10 tablet and a Ubuntu desktop (18.04.2 LTS). The Win10 Tablet has a fresh install with nothing but Discord and VNCViewer installed (realvnc.com). Ubuntu is currently using the built-in Sharing from settings. I have tried connecting via the VNC link (pc-name.local), it was forever stuck on connecting. I instead tried the local IP (192.168.0.13), of which resulted in this message:

Unable to connect to VNC Server using your chosen security setting.

I have tried both Ask For Access and a Password. Both yield the same results. Any ways for me to get around this so I can connect from my tablet to Ubuntu? Thank you.


Solution 1:

Oh, okay! Good news! I found out the issue. I did the command on the top of my question, but this time without sudo. This managed to do the trick, and it works great now! So follow the command above, but do NOT use sudo.

gsettings set org.gnome.Vino require-encryption false

run the command like this, without the sudo.

Solution 2:

My VNC server vino / gnome-remote-desktop-daemon, uses tls-anon by default, and it won't respond to gsettings. Here's what worked:

  1. Install dconf-editor
  2. Change org.gnome.desktop.remote-desktop.vnc to include 'none' in the array value

Use SSH tunneling for security.

enter image description here

source: Confirmed working on wayland
source: https://gitlab.gnome.org/jadahl/gnome-remote-desktop/issues/24

Solution 3:

If the VNC server doesn't require encryption, you must setup the VNC client also to do not use encryption or to let the server choose. For the current version of RealVNC Viewer 6.19 (it is free):

  1. Choice Properties on the connection you want to modify.

    enter image description here

  2. In the General tab, for Encryption set Prefer off or Let VNC Server Choose.

    enter image description here

The above screenshots are from the Linux version of RealVNC Viewer, so they can looks slightly different.