Using Laptop as Raspberry Pi Display

Embedded System Ristek
RISTEK Fasilkom UI
Published in
3 min readNov 29, 2017

Sometimes, we ended up struggling when working with raspberry pi just because we don’t have any HD display to raspberry pi. But we can use VNC as an alternative of this problem. For you who don’t know what VNC is, VNC (Virtual Network Computing) is a graphical desktop sharing system that transmits keyboard and mouse events from one computer to another, and relaying the graphical screen updates to other direction. Since raspberry pi is a mini computer, we can use our laptop to remote control our raspberry pi. Here’s how :

  1. Everything we need :
  • Raspberry Pi
  • Wifi dongle (not necessary for Raspberry Pi 3)
  • Laptop
  • SD/Micro SD card with Raspbian OS
  • Micro USB Cable

Components required for the first time:

  • HDMI to VGA
  • Keyboard and Mouse

Then we can start working to connect the raspberry pi :D

2. Setting IP Raspberry Pi:

Make sure the laptop connected with the same wifi connection with raspberry pi, then we can check the raspberry pi ip address with :

$ ifconfig

We can make the address static if we want. To make sure, try to ping your raspberry pi until it send a responses.

3. Setting VNC Server to Raspberry Pi

From your raspberry pi, try to install VNC Server, you can use these commands :

$ sudo apt-get update

$ sudo apt-get install tightvncserver

Then activate your VNC Server with this command :

$ vncserver :1

You will be prompted to enter and confirm a password. This will be asked once and used to connect your laptop. Enter an 8 digit password. You will be asked if you want to make separately “Read-Only” password, choose no (n). Now the VNC server is running on your raspberry pi :-)

4. Setting VNC Viewer to Laptop

  • Download VNC connect on your Laptop, then install it
  • Enter your raspberry pi address and append with :1 (denoting port number). Then connect it. You will get a warning messages, choose continue
  • Enter an 8 digit password you set from earlier.

When you are done, you can use your laptop to control your raspberry pi :-D

Laptop Screen as Raspberry Pi Display

5. Run the Server Everytime We Boot Raspberry Pi

After you install VNC Server, you can connect your raspberry pi as long as it does not reboot. So if you want to make VNC Server run every time we boot, follow these commands :

  • Open .config directory (it’s a hidden folder):

$ cd ~

$ cd .config

  • Make folder “autostart”, then create file named “tightvnc.desktop” by running the following commands:

$ mkdir autostart

$ cd autostart

$ sudo nano tightvnc.desktop

  • Edit the contents of the file with these, then save the file:

[Desktop Entry]

Type=Application

Name=TightVNC

Exec=vncserver :1

StartupNotify=false

Now VNC Server will run automatically every time we boot our raspberry pi. Whenever you want to do something with your raspberry pi, just connect your laptop to a wifi and enter your pi address.

Hope this tutorial useful :-)

--

--