DIY Linux

Setup VNC on Raspberry Pi to Remotely Control It with Any PC or Phone

Christian Cawley 28-02-2017

Using a Raspberry Pi as a standard PC Use Your Raspberry Pi Like a Desktop PC There are so many amazing things that you can do with a Raspberry Pi, from running your own space program to building a media centre. Although ostensibly intended as a compact computer that can be... Read More  — with a monitor and keyboard — is one way of interacting with the device. But often, you may not need these items. Your USB ports may be too busy to connect a keyboard and a monitor may be too unwieldy for your project. While a compact, portable, touchscreen display How to Setup Your Raspberry Pi Touchscreen The Raspberry Pi comes with a variety of useful add-ons, but one piece of kit that has proved particularly popular is the Raspberry Pi 7-inch Touchscreen Display. Here's how to set one up. Read More is an option, you could abandon the idea of a dedicated display entirely in favor of accessing your Pi remotely.


SSH is a popular means of doing this, but without additional software and configuration, this is limited to command line access. VNC is a strong alternative for remote desktop access, and now comes built into the main Raspberry Pi operating system, Raspbian Jessie with the PIXEL desktop.

What Is VNC?

Virtual Computing Network is a means by which you can connect remotely to a second computer. It uses the Remote Frame Buffer protocol to allow desktop access and control, and it can be used across operating systems too.

We’ve previously looked at how you can connect to your Raspberry Pi from a Windows, Mac or Linux PC using VNC How to Run a Remote Desktop on Raspberry Pi with VNC What if you need access to the Raspberry Pi desktop from your PC or laptop, without having to plug in a keyboard, mouse and monitor? This is where VNC comes in. Read More , but the integration of RealVNC with Raspbian Jessie and the PIXEL desktop update means that much of the process has been streamlined.

Now the onus is on making sure you have the RealVNC server software configured on your Raspberry Pi, and a VNC viewer on your main or controller device.

Configure VNC on Raspbian Jessie

The easiest way to get started with RealVNC on your Raspberry Pi is to use the latest Raspbian Jessie with the PIXEL desktop Upgrade Raspberry Pi's Raspbian OS With the PIXEL Desktop Environment Since its release in 2012, the Raspberry Pi's Raspbian operating system has had a few revisions, but the desktop environment had remained largely the same. Pixel changes that. Read More .


Setup VNC on Raspberry Pi to Remotely Control It with Any PC or Phone muo diy pi vnc enable

You however need to enable the VNC server before you can connect to it. You could do this by booting up your Pi as a desktop, complete with keyboard, mouse, and display, and navigating through the preferences… but that’s not needed. To do everything headless (i.e. from another PC), you should first enable SSH.

Do this by switching off your Pi, removing the microSD card and inserting it into your computer. In the boot partition, create a blank file called SSH, with no extension. Safely eject the card and re-insert into your Pi. When booted, SSH will now be enabled. Login over a SSH connection, either by using the direct IP address or the Bonjour address raspberrypi.local:

ssh pi@raspberrypi.local

(The default password is “raspberry”.)


Finally, you’ll need to enable VNC. To do this, run:

sudo raspi-config

And browse with the arrow keys to Interfacing Options > VNC, then select Yes.

VNC is now enabled, and you’ll be able to remotely connect to a virtual desktop on your Raspberry Pi, via the RealVNC software.

Manual Installation

If you’re not using Raspbian Jessie with the PIXEL desktop, you’ll need to manually install the latest RealVNC software from the Raspbian repositories. Run:

sudo apt-get update
sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer

To enable, use raspi-config as described above.

VNC Server will now launch automatically each time the Pi is booted.

Remotely Control Your Raspberry Pi With VNC Connect

RealVNC can also be used to remotely control your Pi from anywhere in the world as long as you have an internet connection! VNC Connect is a free cloud service (for Home use, but Professional and Enterprise options are also available) that offers simple connection management and cloud-brokered secure connections.

This removes the need to create proxies or static IP addresses, and streamlines true remote access in a way that has not been seen before. Also, VNC Connect has improvements in desktop rendering speed and accuracy, which should make remote control even better than before.


Note: If you’re currently running TightVNC, it’ll need to be removed before using VNC Connect. They aren’t compatible. Don’t worry, though, as it will be automatically removed for you when you install RealVNC’s VNC server.

Setup VNC on Raspberry Pi to Remotely Control It with Any PC or Phone muo diy pi vnc vncconnect splash

Create a RealVNC Account

With RealVNC server running on your Pi, you should create an account on your PC. Head to to grab a copy of the VNC Viewer app from RealVNC, and follow the steps during the initial launch to create an account with their service. Once this is done, remote connect to your Raspberry Pi desktop via VNC Viewer. You’ll need to enter the credentials created earlier. To access the VNC Connect service, click on the RealVNC icon in the desktop panel, click Sign In and follow the instructions, making sure to select the Direct and Cloud connectivity option.

Setup VNC on Raspberry Pi to Remotely Control It with Any PC or Phone muo diy pi vnc realvncconnect

Follow the on-screen instructions to complete setup of your account. By the end of this, you should have two computers in your “Team”: your Pi and your desktop. With five slots in the team, you’ll have space to add a mobile device or two!

As long as your Raspberry Pi is online, you’ll now be able to access it from anywhere via a RealVNC app with support for VNC Connect. That has the potential to make things a lot easier for many existing Raspberry Pi projects, and might just inspire something new!

Control Your Raspberry Pi From Mobile With RealVNC

If you’re using Android or iOS to connect to your Pi via VNC, you can do so with RealVNC Viewer (Android, iOS), which will enable you to easily connect to your Raspberry Pi across your home network.

Simply install and launch the app, click the + symbol and enter the IP address and screen number. With the password entered, you’ll be able to Connect.

Setup VNC on Raspberry Pi to Remotely Control It with Any PC or Phone muo diy pi vnc realvnc androidapp

RealVNC Viewer has a well-considered user interface, giving you the ability to accurately move the mouse with your fingertip and tap or double-tap on tools and icons in the PIXEL desktop environment. It’s one of the most effortless remote desktop experiences we’ve ever seen!

VNC and the Raspberry Pi

If you need to access your Raspberry Pi desktop remotely, VNC is perhaps the most flexible option. SSH is certainly faster, and RDP might offer some competition in the performance stakes, but VNC is cross platform with full graphical streaming.

We’ve looked at two VNC services here. If you’re new to the Pi, it makes sense to stick with the built-in Raspberry Pi option from RealVNC where possible, unless you prefer TightVNC and have been using it previously. While we’ve found that TightVNC is a little faster than RealVNC, it doesn’t offer anything like the VNC Connect cloud service.

What do you think? Do you use VNC or do you prefer to rely on SSH Setting Up Your Raspberry Pi For Headless Use With SSH The Raspberry Pi can accept SSH commands when connected to a local network (either by Ethernet or Wi-Fi), enabling you to easily set it up. The benefits of SSH go beyond upsetting the daily screening... Read More ? Have you tried TightVNC and RealVNC, and perhaps have a different opinion on them to us? Tell us in the comments.

Related topics: Raspberry Pi, Remote Access, Remote Control, Remote Desktop.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Nath
    December 5, 2018 at 3:57 am

    Is it possible to do this in reverse? Say use a pi to VNC into a home desktop running Ubuntu?

  2. Mark
    March 8, 2017 at 12:50 am

    While I made the switch and am enjoying my Acer A13, please note Chromebooks currently cannot (Even with Play Store):

    Play/Rip DVDs with external drive
    Control Sonos Speakers - trust me, it don't work

    Other hassles:
    Save attached photos in Gmail to Photos - nope, even if you save into GDrive/Photos they won't show up in the web view of Photos

    Save photos inline of a GDoc - nope, can't extract or save them to anything, you have to screenshot them back out. Major pain!

    Docs offline? Really, like which ones? I have over 10K documents, I never know which ones will work. You have to OPEN each doc or somehow surface it via search and hope it shows up. I've gotten on planes several times and had the dreadful offline message come up for docs I really needed. Also, forget opening PDFs or Images from the past this way.

    Gmail offline? Yea but how far back? You only get a month as a rough setting. Want more, what do you do? You have meticulously set up offline settings for each folder type in your phone or ChromeOS/Android for this to even start to work.

    It's working and I'm not hating on it, but there are a lot of rough spots. YMMV