I'm trying to access a Pi 4B+ with a dynamically-assigned IP address. I can VNC to the Pi using the (current) IP address, and I can hit it with no problem with Firefox, ssh or ping using the address raspberrypi.local, but when I try to connect to that address with VNC Viewer I get the message The connection was refused by the computer. How do I set up my Pi so I can VNC to it without editing the connection every time I reboot the Pi?
1 Answer
I figured it out. VNC supports multiple sessions, identifying each with a display number (which corresponds to a port number in the 5900+ range). I needed to include the display number in the address, like this: raspberrypi.local:1.
(You might think that default values would handle this transparently; for some reason, though, RealVNC Client defaults to display 0 while vncserver defaults to 1, and so they miss each other in the dark.)
MilliwaysPi4.local. You need to provide more details of what you are doing and settings which don't work.