Setup VNC to be accessible from Mac VNC - spaceshiptrip/raspberrypi GitHub Wiki

I wanted to keep things simple and not install a new VNC Client on the Mac but use the already installed Screen Sharing app. Unfortunately, the default authentication scheme is different between the raspberry pi VNC server and Screen Sharing client. Instead of just downloading RealVNC VNC Viewer, you can set up the authentication scheme on the pi:

Headless VncServer Configuration

  1. If you need to configure accessing the pi with osx's Screen, but only have headless access to the pi, you can use a vnc config file.
    sudo raspi-config > Interface Options > VNC > Enable. Reboot.
    
  2. Generate the password you wish to use in screen with vncpasswd -service
    sudo vncpasswd -service
    
  3. Create and edit the following file here: /etc/vnc/config.d/common.custom Enter the following config:
    Authentication=VncAuth
    
  4. Restart the vnc service:
    sudo systemctl restart vncserver-x11-serviced
    
  5. Open Screen with the instructions above, and use the password you provided to vncpasswd.

Monitor Logs

If you need to monitor the logs for vncserver, you can use journalctl:

sudo journalctl -u vncserver-x11-serviced.service

Other parameters you can use with VncServer configs are described here: https://www.realvnc.com/en/connect/docs/server-parameter-ref.html