nockieboy
Posts: 3
Joined: Thu Jun 27, 2019 5:10 pm

Pi 4 won't start VNCServer on boot [SOLVED]

Thu Jun 27, 2019 5:17 pm

I'm no expert with Linux, but I managed to get VNCServer running just fine on my RPi 3 B+ so that I could use it in headless mode and, when it was rebooted, VNCServer would start with no problems and I could connect to the Pi's Raspbian desktop from VNC Viewer in Windows 10 with no issues whatsoever.

I received my Pi 4 B+ (2GB) today and proceeded to install Raspbian Buster on it and set it up to activate SSH and wifi on the SD card before inserting it into the Pi and booting up.

The problem I have is that VNCServer doesn't seem to be auto-starting at all. I've activated the service in raspi-config (both in the console via SSH AND in the GUI configuration version) and every time I reboot I have to connect via SSH, start the server in the command line with $ vncserver, then (and only then) can I connect with VNC Viewer... and only if I specify the display number (i.e. the usual IP address with ":1" at the end - never had to do that with the 3 B+, it was happy with just the IP address!)

I've tried adding 'vncserver' to rc.local, that just locks me out of the usual :1 address and sets up another (:2) which won't display in VNC Viewer.

Any one having the same problems? I'm seriously considering going back to the previous version of Raspbian at this rate... :shock:
Last edited by nockieboy on Fri Jun 28, 2019 6:40 pm, edited 1 time in total.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5645
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Pi 4 won't start VNCServer on boot

Thu Jun 27, 2019 10:45 pm

nockieboy wrote:
Thu Jun 27, 2019 5:17 pm
I'm no expert with Linux, but I managed to get VNCServer running just fine on my RPi 3 B+ so that I could use it in headless mode and, when it was rebooted, VNCServer would start with no problems and I could connect to the Pi's Raspbian desktop from VNC Viewer in Windows 10 with no issues whatsoever.

I received my Pi 4 B+ (2GB) today and proceeded to install Raspbian Buster on it and set it up to activate SSH and wifi on the SD card before inserting it into the Pi and booting up.

The problem I have is that VNCServer doesn't seem to be auto-starting at all. I've activated the service in raspi-config (both in the console via SSH AND in the GUI configuration version) and every time I reboot I have to connect via SSH, start the server in the command line with $ vncserver, then (and only then) can I connect with VNC Viewer... and only if I specify the display number (i.e. the usual IP address with ":1" at the end - never had to do that with the 3 B+, it was happy with just the IP address!)

I've tried adding 'vncserver' to rc.local, that just locks me out of the usual :1 address and sets up another (:2) which won't display in VNC Viewer.

Any one having the same problems? I'm seriously considering going back to the previous version of Raspbian at this rate... :shock:
AIUI, running the vncserver from the command-line via SSH invokes the virtual mode server - hence the :1 . Although you say you enabled the ("normal") service via the raspi-config GUI did you also enable boot to desktop (rather than command-line)? (Possibly a "red-herring")
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

nockieboy
Posts: 3
Joined: Thu Jun 27, 2019 5:10 pm

Re: Pi 4 won't start VNCServer on boot

Fri Jun 28, 2019 7:55 am

FTrevorGowen wrote:
Thu Jun 27, 2019 10:45 pm
AIUI, running the vncserver from the command-line via SSH invokes the virtual mode server - hence the :1 . Although you say you enabled the ("normal") service via the raspi-config GUI did you also enable boot to desktop (rather than command-line)? (Possibly a "red-herring")
Trev.
Ah, thanks - running vncserver from the command line was confusing the issue, I think. Yes, I'd enabled the 'normal' service via raspi-config in an SSH terminal, I'd also enabled boot to desktop as well.

I went with a full re-write of the SD card with a clean install of Buster last night, then this morning added the ssh and wpa_supplicant.config files to set up SSH and wifi, before booting the Pi and using SSH to access raspi-config via the CLI. I'd read somewhere (or imagined it) whilst trawling the interweb yesterday about needing to set a display resolution other than the default for the GUI vncserver to work?? So the key difference this time was that I set the display resolution (in Advanced Settings) to 1920x1080, instead of leaving it on the default setting.

The Pi has booted up into Raspbian and I've been able to connect via VNC Viewer on my PC with no issues now, even after updating and rebooting. :D

Return to “Troubleshooting”