Raspberry Pi – VNCserver

Minimal config, VNCServer running on raspberry Pi

Minimal config, VNCServer running on raspberry Pi

Installing a VNCserver is really easy. But in order to do it you need to have either SSH already enabled or have a monitor, mouse and keyboard plugged in.
Lets enable SSH and install VNCserver by booting up your raspberry Pi

SSH will be enabled after a new reboot. In order to always connect to your raspberry with the same IP address, you need to know the IP address. There are 2 easy ways to control that.

  • Static IP address for your raspberry (harder to change later)
    You would need to modify the following file /etc/dhcpcd.conf
    #sudo nano /etc/dhcpcd.conf
  • When a firewall is used in your house then use a DHCP address reservation or static mapping.

Firewall changes:

For me the easiest is to login to the firewall, Menu – Services – DHCP Server – DHCP Static Mappings and configure one entry:

MAC address: b8:27:eb:c6:64:34
IP address:
hostname: raspberrypi3
description: Pi2 – Dev

Raspberry changes:

none. Leave your raspberry on DHCP (standard), the next time it is rebooted it will have that IP address.

VNCserver install:

Now, everytime your raspberry boot it will have the IP address you setup in your DHCP static Mappings. In our case
Since SSH is enabled and we rebooted, we can now access the raspberry Pi via SSH from our host system.
I use Ubuntu and open a terminal window. (Under windows there is a software called Putty you can download for free)
The default user on the raspberry Pi is “pi” and the default password is “raspberry”. Always change the default password of the user “pi”. The easiest way is to open again the Raspberry Pi Configuration – System and click the “Change Password …” button

It will look like thisNow we are ready to install VNCserver, but before we start, we update the OS again
#sudo apt update
#sudo apt upgrade
#sudo apt install realvnc-vnc-server realvnc-vnc-viewer

a reboot should not be needed, but if you want VNCserver to start automatically next time you boot, you have to enable VNC. Menu > Preferences > Raspberry Pi Configuration > Interfaces and make sure VNC is set to Enabled.

Enable services

Connect to the raspberry Pi via VNCViewer from your hostsystem:

download and install real vnc viewer on your windows, mac or linux host system and run it
Do NOT forget to disable SSH again.

Other usefull Commands:

#sudo dpkg-reconfigure tzdata  (In case you need to update your timezone)
#sudo raspi-config (Just in case you want to make changes from the command line)

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published.