A simple method to use your laptop as a Raspberry Pi display if you don't have an HD monitor.

I came up with this tutorial one day when my friend Suvigya and I were struggling to work on the Raspberry Pi, because we did not have any HD displays. Hence, I came up with this tutorial so others in the same situation would be able to use their laptop display as a monitor for their Raspberry Pi.

As we know, Raspberry Pi is known as the “Pocket-Size PC”, but for debugging and project purposes it's cumbersome to carry an additional display for it. Also, many of us don't have access to an HDMI display, so, we figured out a way to easily connect a Raspberry Pi to a laptop display. Sit back and enjoy this simple tutorial!

How Does It Work?

To connect a Raspberry Pi to a laptop display, we can simply make use of WiFi. The Raspberry Pi’s desktop GUI (Graphical User Interface) can be viewed through the laptop display using a wireless connection between the two. There are many software programs available that can establish a connection between a Raspberry Pi and our laptop. We used VNC server software to connect the Pi to our laptop.

Installing the VNC server on our Pi allows us to see the Raspberry Pi’s desktop remotely, using the mouse and keyboard as if we were sitting right in front of our  Pi. It also means that we can put our Pi anywhere else in our home and still control it. 

Setting Up Raspberry Pi

Before moving to connect our Raspberry Pi to our laptop display, we need an SD card with the OS installed. Many operating systems are available for the Raspberry Pi and most are focused around Linux, but the most popular version is Raspbian. This OS not only provides a fully functional desktop environment with commonly used programs such as chromium and word processing, but it also includes a wide range of programming tools. Since 2015, the Raspberry Pi Foundation has declared Raspbian as the primary operating system for Raspberry Pi and is open source.

To get this OS, go to the Raspbian download page and download the latest Raspbian from there. At the time of updating this tutorial, the latest version is Raspbian Buster

There are multiple options, but we want to download the fullest featured version. In this case, that version is the Raspbian Buster with desktop and recommended software. You can download either the torrent or the ZIP.

raspbian buster.png

Downloading Win32 Disk Imager

While the Raspbian image downloads, we also need to download a program called Win32 Disk Imager, which writes the Raspbian image to our microSD card. 

win32 disk imager.png

Run the installer for Win32 Disk Imager first and then load the program. Once Raspbian finishes downloading, extract the file, go into Win32DiskImager, and select this file in the Image File input box.

write raspbian to sd card.png

    Before you can flash the microSD card, you need to ABSOLUTELY make sure that the device dropdown box is the same as the microSD card drive. In this case, my microSD card reader showed up as 'F' drive and therefore I selected this from the list. With everything configured it’s time to write the image to the microSD card so go ahead and click the “write” button.

    Once the image has been written, Raspbian OS is installed. Now we need to add some more files in the SD card that will enable SSH and will connect to WiFi on the first boot.
    Create a file named  "wpa_supplicant.conf" and place the below code with your country code, WiFi name, and password. This will connect your Raspberry Pi to the WiFi network.

        ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=PK #Your country code

network={
        ssid="My_WiFi" #Your WiFi Name
        psk="123456789"	#Your WiFi password
        key_mgmt=WPA-PSK
}
    

Next, create an empty file and name it as "ssh". This will enable SSH on Raspberry Pi and we will be able to connect to it from our PC.

enable ssh and create wifi config file.png

Now insert sd card in your Raspberry Pi and power on your Pi.

Finding Raspberry Pi's IP Address

To find out the IP address of Raspberry Pi, we will use advanced IP Scanner. Download Advanced IP Scanner, install and open it.

Press on the scan button and it will show you the IP address of Raspberry Pi along with other devices connected to this network. Your IP address will be different than mine. Note this IP address as we will need in the next step.

ip scanner.png

SSH into Raspberry Pi

To SSH into our Raspberry Pi, we will have to use PuTTY software.

Download and install PuTTY software on your PC.

Open it, type the IP address of your Raspberry Pi (We got in the last step) and click on open.

putty.png

Next it will give security alert. Click on 'Yes' as we know the host we are connectin to.

security.png

After that, it will ask for username and password. Default username is 'pi' and password is 'raspberry'.

login.png

Now we have successfully SSH into the Raspberry Pi and we have to enable VNC so that we can use mouse and keyboard to control it.

Type following command to open configuration tool.

        sudo raspi-config
    

Go to interfacing options.

interfacing option.png

Select VNC and enable it.

enable VNC.png

Next finish the configuration tool and restart the Raspberry Pi by typing following command

        sudo reboot
    
reboot.png

VNC Viewer on Client Side

Now we have to install VNC viewer on our PC so that we can view and control it. Download and install VNC viewer.

Open it and type IP address of your Raspberry Pi in it. It will ask for username and pass. Default username is 'pi' and password is 'raspberry'.

vnc viewer.png

Click on 'OK' and Finally, the Raspberry Pi desktop should appear as a VNC window. We will be able to access the GUI and do everything as if we were using the Pi’s keyboard, mouse, and monitor directly.

vnc.png
Aqib _