How to use Raspberry pi4 without display and keyboard with a VNC viewer.

  • Raspberry Pi

    Screenshot from 2020-04-22 06-58-09.png

    The Raspberry Pi is a series of small single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and in developing countries. The original model became far more popular than anticipated, selling outside its target market for uses such as robotics. Usually, it does not include peripherals (such as keyboards and mouse ) or cases but they can be attached via the USB ports

    Download the os image:

    rpi image download.png

    Then flashing the memory card for booting os (minimum 8 GB recommended, can use balenaEtcher)
    After flashing open boot directory from the memory card

    • Create an empty file and rename it ssh (remove extensions if any)
    • Create another empty file and rename it wpa_supplicant.conf
    • Open wpa_supplicant.conf and copy the below code
      ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

    Replace “NETWORK-NAME” with your network name and
    “NETWORK-PASSWORD” with the password of your network

    Find the IP of raspberry-pi (Rpi)
    You can install the Fing app in your smartphone and connect it to the same network as Rpi.
    Then find the IP of Rpi.

    Install PuTTY SSH client


    • Type the IP of Rpi in the Host Name.
    • Then click open. Then a terminal opens asking your username and password. By default, the username will be pi and password raspberry.
    • Type sudo raspi-config.
    • In the window that appears activate VNC by moving the arrow key.

    Now to use VNC viewer
    Download it from:

    • Install VNC viewer
    • Enter the IP of pi in the window that opens.
    • Enter the username and password.

    If the display is not available
    Type sudo raspi-config
    Go to advance settings.
    Adjust resolution by selecting the appropriate one.

  • Thanks for the tip @Abhay. keep in mind, after flashing the OS to the SD card, it will not open the window machine because Windows is only able to manage only its own partitions (fat16, fat32, ntfs, exfat).

    so you need to software that can read Linux ext format for you, I used Ext2Read, and it does the job.


  • @salmanfaris Thanks for reminding about windows machine partitions and insight about using Ext2Read.

    For Linux users, can skip the process of installing PuTTy SSH Client since SSH client are installed in Linux by default.
    Open terminal and type: **

    • ssh pi@ipaddress //Replace ipaddress with IP address of your pi.
      then enter the username (by default: pi)
      password (by default: raspberry)

    Download and install deb package for VNC viewer.

  • @Abhay and @salmanfaris . This post is a life saviour to many of us. I use to face lot of issues for the headless setup of Raspberry pi. I finally fail with headless setup and use to borrow a screen from my friends and set it up. Seems like this post will help me out for sure.

    Thanks again for the post @Abhay. 😊 😊

  • @kowshik1729
    We couldn't find monitor during a hackathon and it cost the majority of our time to set up pi, this was the alternative that saved us back then.

    Hope it will be helpful for you to @kowshik1729

Log in to reply

Recent Posts

  • F

    @salmanfaris best if you could point me to an example that works as described: getting different values depending on hoe close the finger is without really touching. nothing i tried did work yet

    read more
  • F

    @salmanfaris I haven't found a good sensor module for this at all. I used a thing which was calles touch sensor and it returns only 1/0. Tried to use touchRead() but it is not sensitive apparently, only 40 and 1 more or less.

    #define touch_pin_numer 33

    const int VALUE_THRESHOLD = 30;
    void setup()

    void loop(){
    TOUCH_SENSOR_VALUE = touchRead(touch_pin_numer);
    Serial.println ("Touch ON");
    Serial.println ("Touch OFF");

    should show something between 40 (current max) and 1 (current min) the closer the finger gets but it shows 40/41/39 and 1 - nothing inbetween. got this code from the web

    read more
  • @FlorianB Can you share the code, output window/error and details of the sensor module?

    read more
  • F

    Hi! I am trying to add an capacitive sensor to the ESP32, that will work through glass with 3mm thickness and an distance of 8 to 2 cm. I have bought sensors which only work on touch, i have looked into the touchRead() function but cant get a steady value increase/decrease with distance and only a real touch gets me enough difference to count it as a "touch". I have checked Arduino examples with foil where a resistor can set the sensitivity but nothing worked on my ESP32. i have spent hours looking for an example, can somebody point me to one please?

    read more
  • Capture.PNG

    Welcome to the Second edition of MakerGram Live, a newsletter where we pull together information about Interesting projects, Industry news, upcoming events, job opportunities and other interesting bits that you may find useful. 😉

    If you are a member of makergram, you already received a mail, please check your inbox or you can read from here: MakerGram Live | May 2020 Maker Update

    read more