10

Ubuntu 16.04 LTS fully upgraded on computer Raspbian Jessie Lite fully upgraded on Rpi 3

I can SSH no problem into the raspberry, configured it from raspi-config to enable vnc at boot.

I then tried to connect to it via tightvncviewer and got the following error:

Connected to RFB server, using protocol version 3.3 No configured security type is supported by 3.3 VNC Viewer

Using VNCviewer on android it connects but only a black screen shows.

I tried to manually launch vnc server form ssh but still no luck.

What should the next step to fix this be?

1
  • 1
    "configured it from raspi-config" i.e. RealVNC which is a non-standard proprietary implementation, then "tried to connect to it via tightvncviewer" which is incompatible.
    – Milliways
    Jun 29, 2017 at 10:45

4 Answers 4

8

You have 2 options

  • Install tightvncserver on the Pi, or
  • Install RealVNCviewer on your computer.
2
  • 1
    ... where tightvncserver (or x11vnc or ...) is in Raspbian, and RealVNCviewer is NOT in the ubuntu distro. 3rd option, as mentioned in another post, is to disable encryption . . .
    – Roland
    Sep 8, 2019 at 16:54
  • Or change the built in VNC Server on the Pi to VncAuth. Then use whatever non-RealVNC client you like. See other answers. Mar 16 at 4:38
7

I ran into this trying to access a Raspberry Pi using UltraVNC on Windows 10. The solution is to go into the VNC Connect Options on the Raspberry Pi desktop, on the first tab "Security" change the Authentication from UNIX password to VNC password. You will then be prompted to set the VNC password.

I'm sure this can be done by modifying a config file from the console but I don't have that information.

You do not have to switch to tightvncserver or use RealVNC. Perhaps their defaults work out of the box, but this is a simple config tweak on the pi to make the stock VNC use the more universal internal password authentication.

3
  • Thanks. I had a similar problem connecting from MobaXterm on Windows 10 to Raspian (Pi OS) Buster. Was able to configure standard Pi VNC server by changing password as described above. Also had to set up a VNC user on the server, but pretty simple.
    – Thor
    Jun 20, 2020 at 12:02
  • 1
    To switch from default UNIX authentication to VNC authentication, add this line (Authentication=VncAuth) to ~/.vnc/config.d/Xvnc Sep 25, 2020 at 16:32
  • 1
    Finally found the right config file. Making the config change from the GUI actually updates /root/.vnc/config.d/vncserver-x11. The corresponding entry in ~/.vnc/config.d/Xvnc doesn't seem to be used. Making the changes in /root means VNC clients like the built-in Screen Sharing on macOS work just fine. But you need to add Authentication=VncAuth as well as Password= with a hash of your password, which you can get by just using the GUI method described, or running vncserver -Authentication VncAuth and grabbing it from ~/.vnc/config.d/Xvnc. Mar 16 at 4:23
1

You need to set the authentication global variable to VncAuth:

  1. Just issue the following command from cli and you will be prompted to enter a new password twice, that will be used to connect to your Raspberry PI from vnc: $ vncserver -Authentication VncAuth
  2. After you have set your password, just kill every running vncserver session using $ vncserver kill :X where X is the session number starting from 1. Alternatively, just restart your Raspberry PI.
  3. Then, just start vncserver eg from cli with executing $ vncserver (in certain cases you might need to issue $ vncserver -Authentication VncAuth to force the vncserver to start with VncAuth) and connect to your session using the 5901 default port from your other desktop. If you are on OS X, eg on MacBook, then you can use the vnc://<RPI IP or hostname>:5901 url without any additional program.
1
  • Make sure you use sudo to run vncserver -Authentication VncAuth otherwise your settings end up on ~/.vnc where they're not used by the system vnc service. Also, to restart vncserver, use sudo service vncserver-x11-serviced stop and sudo service vncserver-x11-serviced start, because restart seems to get tripped up. Mar 16 at 4:25
0

Summarising other answers with known working solutions...

Either:

  1. Use RealVNC viewer as the client.
  2. Replace the RealVNC server on the Pi with TightVNC or TigerVNC. See this guide for all the gory details or check the documentation for the server of your choice.
  3. Or simply change the server's authentication method to the more widely compatible VncAuth, by running the following commands on the Pi (the $ is the normal shell prompt, the # is root's shell prompt):
$ sudo -s
# service vncserver-x11-serviced stop
# echo "Authentication=VncAuth" >> /root/.vnc/config.d/vncserver-x11
# vncpasswd -service
# service vncserver-x11-serviced start
# exit

You'll be prompted to provide a password for vncpasswd. It will be stored in /root/.vnc/config.d/vncserver-x11 and used whenever the system VNC server is run.

If you already have GUI access to your Pi, you can do the same thing by clicking on the "VNC" icon in the menu bar, then clicking the hamburger icon, selecting "Options" and changing Security --> Authentication to "VNC password". Also make sure "Encryption" is "Prefer on".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.