Friday, December 8, 2017

Installing VNC (Virtual Network Computing) On Raspberry PI

Sometimes it is not convenient to work directly on the Raspberry Pi. Maybe you would like to work on it from another device by remote control.

-------------------------------------------------------------------------

 
VNC is a graphical desktop sharing system that allows you to remotely control the desktop interface of one computer (running VNC Server) from another computer or mobile device (running VNC Viewer). VNC Viewer transmits the keyboard and either mouse or touch events to VNC Server, and receives updates to the screen in return.
You will see the desktop of the Raspberry Pi inside a window on your computer or mobile device. You'll be able to control it as though you were working on the Raspberry Pi itself.


VNC Connect from RealVNC is included with Raspbian. It consists of both VNC Server, which allows you to control your Raspberry Pi remotely, and VNC Viewer, which allows you to control desktop computers remotely from your Raspberry Pi should you want to.
You must enable VNC Server before you can use it: instructions for this are given below. By default, VNC Server gives you remote access to the graphical desktop that is running on your Raspberry Pi, as though you were sitting in front of it.
However, you can also use VNC Server to gain graphical remote access to your Raspberry Pi if it is headless or not running a graphical desktop. For more information on this, see Creating a virtual desktop, further below.

Enabling VNC Server

On your Raspberry Pi, run the following commands to make sure you have the latest version of VNC Connect:

sudo apt-get update
sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer
 
Now enable VNC Server. You can do this graphically or at the command line.

Enabling VNC Server graphically

  • On your Raspberry Pi, boot into the graphical desktop.
  • Select Menu > Preferences > Raspberry Pi Configuration > Interfaces.
  • Ensure VNC is Enabled.

Enabling VNC Server at the command line

You can enable VNC Server at the command line using raspi-config:

sudo raspi-config
 
 


Now, enable VNC Server by doing the following:
  • Navigate to Interfacing Options.
  • Scroll down and select VNC > Yes.

Connecting to your Raspberry Pi with VNC Viewer

There are two ways to connect to your Raspberry Pi. You can use either or both, depending on what works best for you.

Establishing a direct connection

Direct connections are quick and simple providing you're joined to the same private local network as your Raspberry Pi. For example, this might be a wired or wireless network at home, at school, or in the office).
  • On your Raspberry Pi (using a terminal window or via SSH) use these instructions or run ifconfig to discover your private IP address.
  • On the device you'll use to take control, download VNC Viewer. For best results, use the compatible app from RealVNC.
  • Enter your Raspberry Pi's private IP address into VNC Viewer:


Establishing a cloud connection

You are entitled to use RealVNC's cloud service for free, provided that remote access is for educational or non-commercial purposes only.
Cloud connections are convenient and encrypted end-to-end. They are highly recommended for connecting to your Raspberry Pi over the internet. There's no firewall or router reconfiguration, and you don't need to know the IP address of your Raspberry Pi, or provide a static one.


 
 
 









Raspberry Pi Website Source 

No comments:

Post a Comment