This question is not about RealVNC, as I am trying to connect "directly", without having to create a third-party account somewhere. I have tried tightvnc, tigervnc, ultravnc and the server connection via finder on a mac.
I have a RPi3 with raspbian, connected via router to a windows pc. I can ping it and have no problem with ssh. Despite having server and viewer running in their respective platforms, the viewer connection times out at every attempt. I have no extra monitor, keyboard or mouse; I must connect headless.
I would appreciate help from the experts in establishing a connection. I describe below everything that I did so far in step-by-step form, with some particular details which I think are relevant. I believe I have read and followed the widest possible set of instructions pertaining to this problem, but the connection still just times out. The error message is:
Error in TightVNC Viewer: A connection attempt failed bacause the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
At this point, I think the solution is rather ridiculous, but I cannot find it. Could you experts please assist me? Your help is much appreciated.
1) downloaded latest raspbian, made the necessary modifications to the image to get wifi and ssh going. On the router, I use DHCP with a table tying MACs to IPs (restrited IP address list on the router), so the IP never changes. All devices are visible and I can ping them. SSH works fine via Putty between laptop pc and RPi3.
2) using raspi-config, changed password, enabled vnc, set to boot via graphic interface (I tried setting to command line as well, still timed out).
3) Installed tightvncserver, ran update and upgrade. Reboot. Logged back in via ssh.
4) Ran vncserver :1 -- at this point tried to connect.
On the PC side, installed tightvnc viewer. Later tried UltraVNC viewer as well. On a Mac, I tried tiger vnc and the built-in connection via finder. The viewers were attempted one at a time. They all time out on both PC and Mac. Meanwhile, ssh runs fine.
5) I tried different ports for the server (except 0), to no avail. For the heck of it, I took the service down, and tried to run the command tightvncserver :1 instead. Tried to connect, timed out.
I suspected the service was not running properly (whatever that means), so I killed the job and ran it back again, checking with ps axg | grep vnc -- output shows everything is running as it should. Tried to connect, time out.
6) Following a nice tutorial from xhantor (on the pi forum), I created a new file: /etc/systemd/system/vncserver@.service with
[Unit] Description=Remote desktop service (VNC) After=syslog.target network.target [Service] Type=forking User=pi PAMName=login PIDFile=/home/pi/.vnc/%H:%i.pid ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1 ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 :%i ExecStop=/usr/bin/vncserver -kill :%i [Install] WantedBy=multi-user.target
Ran systemctl daemon-reload
Ran systemctl enable email@example.com
Reboot, logged back in with ssh (fine)
7) checked if vnc is running, it is indeed. Still, connection times out.
8) checked the log file related to the port open, in .vnc -- log was complaining of the absence of .Xresources file. I created an empty one, rebooted and tried again, and the log file no longer showed complaint.
The service is running, the viewer(s) try, but the connection still times out.
Thanks in advance!