2

I'm using VNC Viewer in Windows to control the Raspberry Pi without screen but I need to get into the Raspberry Pi first by using putty software and then write the command code:

 $ vncserver

to create a server to be able to control the Pi with the VNC Viewer.

How can I run this automatically without code writing, how to configure it?

  • something like this, into start.sh file insert your command – Francesco Gusmeroli Jul 18 '17 at 14:02
  • Which VNC Viewer? RealVnc is incompatible with most viewers. Do you intend to boot the Pi to GUI; if not tightvncserver is a better option, but setting either up on a headless system is non-trivial. – Milliways Jul 19 '17 at 0:21
  • Here is the old way. Not sure if it is still necessary. learn.adafruit.com/… – SDsolar Nov 26 '17 at 2:32
5

Simply enable the VNC server using raspi-config, and it will be started automatically during boot. Make sure to also set "boot to desktop", so that there's a GUI running to use with VNC. And use the official VNC client on Windows.

I'm doing this on a regular basis when I'm preparing new OS images for new projects: flash Raspbian image, create ssh file on boot partition, then headless boot, ssh into the Pi. Next, set hostname, change password, enable VNC. Reboot. Direct my VNC client (Android, Windows, ...) to the Pi using its newly set hostname (and correct domain for my home router).

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.