How to Connect Raspberry Pi to Your Laptop

Raspberry Pi Laptop

The Raspberry Pi is the “Pocket-Size PC” and is smaller than any of its peripherals. The only problem? The display.

If you do any serious Raspberry Pi tinkering at all, you likely already have an HD display at your home to hook up to the tiny computer. The issue arises when you are on the go, since you can’t possibly go around carrying a 32″ HD monitor wherever you go, and working on the Raspberry Pi without a visual output is difficult.

Then there is the question of an Internet connection. The Pi cannot just share your Wi-Fi directly: it has no network cards and no appropriate drivers to connect to your router. Everything would be so much easier if it could somehow connect with your laptop.

It can. With a little effort and setup, you can easily connect your Raspberry Pi to your laptop display and share its Wi-Fi.

Setting Up

You don’t need much to connect your Raspberry Pi to your laptop display: an Ethernet cable, an SD card pre-loaded with the Raspbian OS (check out this guide if this is your first time doing so), an HDMI cable, an HD display (only for the setup process), and of course a Raspberry Pi and laptop to connect it to.

Raspberry Pi Connected

The first step is to connect all the wires. A micro USB cable to power the Raspberry Pi, an HDMI to a display to operate it, and the Ethernet connected to your laptop for sharing information. Then power up everything and get cracking.

Sharing the Wi-Fi

Before you can share the display, you must first share the Internet connection with your Pi. For this, follow these simple steps on your Windows laptop:

1. Navigate to the “Network and Sharing Center” on your laptop.

2. Select the Wi-Fi network.

3. Click on Properties.

4. Under the “Sharing” tab, click on “Allow other network users to connect through this computer’s Internet connection.”

5. Ensure that the type of network is set to “Local Area Connection.”

Determining the IP Address of Your Ethernet Port

Now comes the slightly tricky part: you need to find out your Ethernet port’s IP address. The problem is the IP is usually generated dynamically, so you cannot just use the IP of your laptop itself (if you even know it). Even so, it is not too difficult to look it up. There are quite a few ways to go about it, but by far the easiest one is given below:

1. Click on the “Local Area Connection” link you just created.

2. Go to “Properties.”

3. In the “Networking” tab, right-click on the “Internet Protocol Version 4” and select Properties.

4. Finally, you can see both the generated IP address and the subnet mask.

You need both the IP and the subnet mask for arriving at the final address. Simply replace the last segment of the IP address with the first segment of the subnet mask. For example, if the IP Address is “192.168.125.1,”and the subnet mask is “255.255.255.0,”then the IP you need is “192.168.125.255.”

Now all that you need to do is fire up the command prompt and “ping” your obtained IP. Literally type ping followed by your IP address, and the Raspberry Pi will automatically respond by establishing a connection via the Ethernet port.

And that’s it! You can start using Iternet on your Pi now.

Configuring the VNC Server

Vnc

To actually use the laptop display with your Raspberry Pi, you need to go further than that. The basic idea is to use a VNC server to control your Raspberry from your laptop, which gives you GUI access to the Pocket PC and all the connected hardware – mouse, keyboard, etc. – as if being used directly. Just follow the steps below:

1. This is where you boot up your HD display. This is only needed the very first time, so it’s better to undergo this step at your home.

Raspberry Pi Display

2. Open the LX terminal and type in the following commands:

sudo apt-get update
sudo apt-get install tightvncserver

3. Once the VNC server has been installed, run it by typing:

vncserver :1

4. Now you will be prompted to create a password. This, again, is just a one-time deal, so set a good password, and your VNC server will be up and running.

Connecting to the server

With your Raspberry Pi running a VNC server, you can use a VNC client to connect your laptop to it quite easily.

1. First, get the VNC client and install it.

2. Use the previously-obtained IP address (appended with a ‘:1’) and the server password to establish a connection.

Raspbian Gui

And that’s it! The Raspberry Pi can now be used with your laptop display!

Subscribe to our newsletter!

Get the best of IoT Tech Trends delivered right to your inbox!