Tutorials Android Arduino IOIO Ubuntu Kinect Raspberry Pi Github Contact search this site...
HOME RASPBERRY PI VNC SETUP ON RASPBERRY PI FROM UBUNTU
RECENT POSTS
VNC setup on Raspberry Pi from Ubuntu MongoDB vs. Postgres; A specific use case
Devstack on EC2 via Ansible
POSTED BY MICHAEL ON JUN 2, 2012 IN RASPBERRY PI, TUTORIALS, UBUNTU | 20 COMMENTS Beaglebone + Ubuntu
Raspberry Pi OpenCV Pan & Tilt Face Tracker
43
Raspberry Pi Google Talk Robot
#INCLUDE STD_DISCLAIMER
Always excercise caution when working with
electronics. All software is provided on an "as is"
basis without warranty of any kind, express or
implied. Unless otherwise noted, all code content
is licensed under the Apache 2.0 license
LIVE CHAT
NEW
This tutorial will demonstrate how to setup and connect to a Raspberry Pi over VNC from Ubuntu. This
process is easier if you have a display connected to the Raspberry Pi, but will also show the steps to
connect with only Ethernet and power connected. It assumes you have Debian for Raspberry Pi
installed on an SD card. If not, see RPi Easy SD card setup
Getting the IP address of the Raspberry Pi
The first step is to locate the Raspberry Pi on your network. If you have access to a display for your
Raspberry Pi, this task is simple, in a terminal simply type:
ifconfig
All the network interface configurations will be displayed, including the IP address. However, if you
don’t have a display for your Raspberry Pi, this isn’t an option. For this task, we can use the Linux
nmap (Network Mapper) utility.
sudo apt-get install nmap
Then run a scan on your local network. Be change to the specifics of your own network.
nmap -sV -p 22 192.168.0.1-255
The results will display every machine that could be identified on port 22. The Raspberry Pi (running
Debian) looks something like this:
Nmap scan report for 192.168.0.112
Host is up (0.033s latency).
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 5.5p1 Debian 6+squeeze2 (protocol 2.0)
Service Info: OS: Linux
Connecting over SSH
So we know that the Raspberry Pi has IP address: 192.168.0.112. Now we can ssh to it:
ssh pi@192.168.0.112
And you should receive a message like this:
The authenticity of host ‘192.168.0.112 (192.168.0.112)’ can’t be established.
RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)?
Type yes at the prompt, then enter the password for the user pi, ‘raspberry’ by default. You should get
a prompt that looks like this:
pi@raspberrypi:~$
Configuring VNC
Now that we have logged in to the Raspberry Pi, we can setup VNC for remote access. First we need to
install the VNC server:
sudo apt-get install tightvncserver
Next, start the VNC server on the Raspberry Pi. Adjust the geometry paramater to your desired display
size.
vncserver :1 -geometry 1024x600 -depth 16 -pixelformat rgb565
You will be prompted to create a password for VNC login. Once you do, you should see a line looking
something like this:
New ‘X’ desktop is raspberrypi:1
Now, we can finally connect to the Pi with VNC. Back on the Ubuntu machine, install the VNC viewer
client:
sudo apt-get install xtightvncviewer
Then connect to the running VNC server:
vncviewer 192.168.0.112:5901
To stop the VNC viewer, just close the application. To stop the VNC server, issue the following
command (on the Raspberry Pi):
vncserver -kill :1
Share this:
Email Facebook LinkedIn Reddit Twitter Google
DESIGNED
DESIGNED BY
BY ELEGANT
ELEGANT THEMES
THEMES || POWERED
POWERED BY
BY WORDPRESS
WORDPRESS