RPi VNC Screen Sharing

Back to RPi Guides.

Raspberry Pi VNC Screen Sharing

=What does it do?=

Sometimes it is convenient to share screens to be able to do support from your own computer this works just like the VNC Server with the difference you don't log in to another user then the one the console is using.

=What do you need?=


 * A Raspberry Pi, model B.
 * A boot SD card for the Raspberry Pi.
 * A network connection (Ethernet or WiFi).
 * Special software on both the Raspberry Pi and the remote, controlling computer

=What skill level is required?=

This project does not require any coding or compilation. Very basic Linux and networking knowledge would be useful, but not essential.

You need to...
 * Install software
 * Enter basic Linux commands
 * Use standard software tools (Windows/Linux/Mac) to add software to your PC
 * Connect computers using ethernet cables

=How does it work?=

The commands described below start a "virtual" graphical session. It allows a user to controll mouse, keyboard and screen on a remote Raspberry Pi to for example do support.

=Overview of this project= You need to
 * Install Vino VNC (Virtual Network Computing) server software on the Raspberry Pi
 * Start and configure the VNC server software
 * Install a VNC client on another computer
 * Connect over a network from your computer to the Raspberry Pi

=Instructions= Log in to your Pi and install the Vino Package $ sudo apt-get install vino Next Run X11 $ startx Once that is done you can run the vino-preferences from the terminal. $ vino-preferences Configure it like you want it to work, if you want to be able to controll the remote Raspberry Pi computer without remote confirmation you have to check booth "Allow" boxes on top, uncheck the third "confirm" box and as a good recommendation check the 4 box about "Require user password" and enter a password you'll remember. The rest isn't that important so just click "Close" after that.

When closing vino-prefereces you may get an error message something like: Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed One possible work around for this bug is to re-install vino. sudo apt-get remove vino sudo apt-get install vino

Now Raspbian doesn't autostart vino, so we have to fix that, make a script in the /etc/sudoers.d folder.

$ sudo leafpad /etc/sudoers.d/vsrv.sh &

and put the following in that file.

/usr/lib/vino/vino-server
 * 1) ! /bin/bash

Set the file to Execute

$ sudo chmod +x vsrv.sh

Then this file has to autorun when we start X11, on Raspbian this can be done by editing the /etc/xdg/lxsession/LXDE/autostart file:

$ sudo leafpad /etc/xdg/lxsession/LXDE/autostart &

Just add one line at the end of the file

@/etc/sudoers.d/vsrv.sh

Reboot the Raspberry Pi

Install UltraVNC (if you run windows) or Tight VNC on your desktop from the link below. http://www.uvnc.com http://www.tightvnc.com/download.php

Or install it using your package manager. The following works on my ubuntu 11.10 workstation $ sudo apt-get install xtightvncviewer or $ sudo apt-get install remmina Remmina is a remote client that can handle multiple protocolls, really handy.

Then use :1 (e.g. 192.168.1.2:1) as the host name when connecting.