Introduction: Raspberry Pi Display Access Over the Internet.
In this Instructable we’ll going to learning how to use laptop display for raspberry pi (any model). We can buy raspberry pi display form market but that going to cost you instead of other display we can use laptop display over internet (from other network).
So here in this Instructable I've tried to include all the minute details that are required for this project. However if you find that something is wrong or does not work as intended please feel free to point it out in the comments section and I'll make sure that it is corrected.
Step 1 to 3 includes raspberry pi installation
Step 4 includes creating accounts and working of RealVNC
Step 5 includes setting up RealVNC for raspberry pi and laptop
Step 6 includes access of raspberry pi screen
Step 7 ending credits
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Components and Softwares List
- Raspberry Pi 2
- MicroSD card (greater than 4GB)
- SD card reader
- HDMI to VGA adapter
- Ethernet cable
Components required for setting it up the first time:
- HDMI Display or PC Monitor with VGA cable
- Keyboard and Mouse
Step 2: Installing OS on SD Card for Your Raspberry Pi
The first 2 softwares mentioned i.e. SDFormatter and Win32DiskImager are used for installing OS in the SD card.
SDFormatter is used to format the MicroSD card whereas Win32DiskImager is used (in our case) to write boot images(Raspbian Jessie OS IMG file) to a SD Flash device, making it bootable.
You can even use the official NOOBS OS installer for your SD card. NOOBS
is an easy operating system installer which contains Raspbian Jessie. Raspbian comes pre-installed with plenty of software for education, programming and general use. It has Python, Scratch, Sonic Pi, Java, Mathematica and more. You can download Raspbian Jessie or Raspbian stretch from here.
Download Raspbian Jessie or Raspbian stretch from the link provided above and unzip the contents. Make sure you have the Raspbian Jessie IMG file in the unzipped folder.
However for this project we'll go with Win32DiskImager instead of the NOOBS installer.
Steps for OS installation:
- Insert the MicroSD card into the card reader and plug the device into your laptop or PC.
- Open SDFormatter software. Select the correct drive. Choose Quick Format. Click on Format.
- Once the format is complete open Win32DiskImager for installing the OS onto your SD card.
- In Win32DiskImager navigate and select the Raspbian stretch IMG file from the unzipped folder and then select the proper device location onto which the OS has to be installed (your SD card location).
- Once this is done click on Write. Your SD card is now ready with Raspbian OS.
Step 3: Setting Up Raspberry Pi for the First Time
Once the OS has been installed onto your SD card insert the card into your Raspberry Pi.
Next thing you need is a HDMI display or a PC Monitor with a VGA cable (picture 1).
I have used a PC monitor with a VGA cable. Raspberry Pi has a HDMI port and hence you will require a HDMI to VGA adapter to connect your Raspberry Pi to the PC Monitor. Also connect a keyboard and a mouse to your Raspberry for the initial setup.
Once this is done power on your Raspberry Pi.
Note: Do not power on the Raspberry Pi from your laptop as the USB ports do not provide enough current when you have a display, keyboard and mouse connected to it. Instead use a 2 Ampere mobile charger.
Once powered on the Raspberry Pi should load the OS graphical screen as shown in picture 2 and 3.
The first and foremost thing to do after this is to enable SSH and VNC server on your Raspberry Pi.
Learn more about SSH and VNC here.
There are 2 ways to do this:
- From the start menu.
- From the Raspberry Pi terminal.
Steps to enable SSH and VNC:
1. From the start menu.
- Click on the start button.
- Go to Preferences--> Raspberry Pi Configuration (picture 5, 6 and 7).
- A dialog box will open. Go to Interfaces
- Enable SSH and VNC (You can check out other options too but for this project we require only these 2)
2. From the Raspberry Pi terminal.
- Go to Terminal from the toolbar (Icon with "<_" symbol).
- Type "sudo raspi-config".
- You will get a dialog box as shown in picture 6 (use keyboard to navigate the options).
- Go to Interfacing options and enable SSH (picture 8, 9, 10 and 11).
- Similarly enable VNC (picture 12, 13 and 14).
Your laptop can now be used to connect to your Raspberry Pi via SSH or VNC.
Step 4: Creating Account and Working of RealVNC Viewer
VNC uses the RFB protocol to transmit screen pixel data from one computer to another over a network, and send control events in return. It’s a simple yet powerful protocol invented by RealVNC.
You need a VNC Server app for the remote computer you want to control, and a VNC Viewer app for the computer or mobile device you want to control from. You can install and license these apps in advance, or download and run them on demand, in the way that suits you best. Or do both, in different circumstances.
VNC Server captures the desktop of the computer in real-time and sends it to VNC Viewer for display. VNC Viewer gathers your input (mouse, keyboard, or touch) and sends it for VNC Server to inject and actually achieve remote control.
To access RealVNC server and viewer you need to create an account
- Open RealVNC official website
- Click Sign in button
- Enter your email id
- In next window you will be asked password create your password and fill all details shown in image
Congratulations your account is created
Step 5: Setting Up RealVNC Server on Raspberry and RealVNC Viewer on Laptop
Now that you know the working of RealVNC server we’ll install it in Raspberry pi.
Use following command to install RealVNC server
- Open terminal from the toolbar
- Type “sudo apt-get update”
- Type “sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer”
- Type “sudo reboot” to reboot raspberry pi (picture 1, 2,3 and 4)
Once the raspberry pi is on,it will load graphical interface as shown in image
- On the top-right of the home screen you can see VNC logo (picture 5)
- Click on the logo
- You will get the new screen (picture 6)
- Click the sign in option
- Enter your Email and password(Realvnc account)(picture 8)
- Then in next window select the third option as home subscription(picture 9)
- In next window you’ll have select Direct and Cloud (picture 10)
- If the followed the above steps correctly, you’ll be logged in (picture 12)
Install RealVNC viewer for you laptop
- Go to official website of RealVNC
- Download RealVNC viewer for laptop(windows or mac or ubuntu)
- Install RealVNC in laptop
- At the top-right you have to sign in by using your RealVNC credentials
- RealVNC may ask for your email confirmation
- If the followed the above steps correctly, you’ll be logged in RealVNC viewer
You have installed RealVNC server and viewer.
Step 6: Access Raspberry Pi Display in Laptop
You are ready to get your raspberry pi display on your laptop screen
- Open vnc viewer in laptop
- Go to your team and look for raspberry pi
- Click on raspberry pi you will be asked for connection with your Raspberry pi,click on continue in as shown in image
- Enter your username for raspberry pi the default username is :- pi
- The default password is :- raspberry
- Enter ok
Congrats you got your display in you laptop.
Step 7: Ending Credits
I know that this has been a very long post and I'm really sorry for
that. Thanks a lot for bearing some typo and grammatical errors (though I've tried a lot to minimize them) and also for reading this far. The reason this post is so long is because it is targeted towards BEGINNERS. When I was starting with Raspberry Pi I had a lot of trouble gathering learning resources even for basic operations. I hope that this post will help you. All the best .