Hi folks;
This is a slight variant on an earlier set of instructions I posted a while ago here.

The basic premise is to use another computer as the input console for the Raspberry Pi without needing to get a separate screen, keyboard and mouse on the Pi. Ideal if you've got a room full of laptops, chrome books or iMacs for example.

This way differs from the previous in that you don't need to install any software on the host computer/laptop. You can set the Raspberry Pi up so that it provides everything the host computer needs through the web browser. It makes it as easy as typing an address in

Here is an example of the end product on Windows / IE:

What will it work on?
Any HTML5 compliant web browser. But basically these and above:

Chrome 8

Firefox 4

Safari 5

iOS Safari 4.2

Opera 11

IE 9

Instructions
Best to start with a fresh install of Raspbian and follow these instructions while logged in as the default pi user.
So the aim here is to install the VNC server software as well as a web based HTML5 client onto the Raspberry Pi.
We're first going to need to install a few packages (TightVNC server and screen). Run these commands from the terminal.

We just need to make a small adjustment to some of the files here. The folder we've just downloaded will be served out as a http root for the Pi so we just need to ensure there is an index page. This will allow the host computer to access the VNC client software.

Press Ctrl - C to stop it, and then press Enter a couple of times to get the command prompt back.

Next we need to set everything to start automatically since you're probably going to want to use the Raspberry Pi in headless mode.
To do this we just need to create a few scripts inside init.d, enter the following commands.

Note the line that says -geometry 1280x800. This sets the screen resolution for the remote desktop, so you may wish to alter this to suit the screen size of the PC or Mac that you want to control from. Ideally this should be set slightly lower to avoid having scroll bars.
Press Ctrl - O followed by Enter to save, then Ctrl - X to quit from editing.
The script we've just created basically makes VNC part of the background services that Linux is controlling.
We next need to register the script, enter the following commands:

When the Pi has rebooted you should now be able to enter the IP address of the Raspberry Pi into the web browser of the host computer.
You will be prompted for the password that you specified when setting up the VNC server.

I have occasionally observed an error on the first time that you try to connect, I think this is being caused by the proxy getting started before the VNC server socket is open.
If you see this the top bar goes red. Just hit refresh (F5), enter the password again and it should work.

Master and slave mode
There is another trick you can do here if you want to really have things sown up. I also describe this in the previous post but there are a few differences here.

Using the following instructions each Raspberry Pi will be directly connecting to the host computer using a single Ethernet cable, thus making a completely isolated point to point network between the two and therefore your network administrators shouldn't have any cause to complain. Note: you don't need a cross over cable for this, a standard cable will work because the Pi Ethernet port auto-switches the transmit and receive pins.

Firstly we'll need to install some more software on the Pi. We’re going to make the Pi Ethernet port behave in a similar way to a home router. This means assigning a static IP address to it and installing a DHCP service (dnsmasq) that will respond to address requests from the host computer.

Press Ctrl - O followed by Enter to save, then Ctrl - X to quit from editing.

The Raspberry Pi will now have a static address of 10.0.0.1

Next we need to configure dnsmasq (that we installed earlier) to give out IP addresses. I am going to explicitly specify a configuration file for the dnsmasq service so let’s first make a backup of the default config file and then save my one in its place.

The first line tells dnsmasq to listen for DHCP requests on the Ethernet port of the Pi. The second line is specifying the range of IP addresses that can be given out. The third and fourth lines tell the host computer what it's default gateway and DNS server settings are.

Next we're going to make a small edit to the hosts file. This will allow the user to type in pi into the browser instead of 10.0.0.1.
Enter the following command to edit the hosts file.

You can go ahead and plug in the single Ethernet cable directly from the Pi to the host computer.
The host computer should then be given an IP address which will be 10.0.0.X where X is a random number between 2 and 250.

One thing to try is to open up a command prompt on the host computer (a Terminal on OSX and Linux) and enter the following command;

If you see reply, reply, reply then it's working. If you see request timed out then something is wrong and you'll need to go back and double check everything.

You should now be able to open up a web browser on the host computer and enter pi into the address bar to get to the VNC client page.

Note: Windows users: This may not work properly on Windows (you'll still need to use 10.0.0.1) but if you install a package called winbind you'll be able to type the Raspberry Pi hostname into the browser. Usually this is raspberrypi. The winbind package can be installed with the command below:

You will be prompted for the password that you specified when setting up the VNC server.

I have occasionally observed an error on the first time that you try to connect, I think this is being caused by the proxy getting started before the VNC server socket is open.
If you see this the top bar goes red. Just hit refresh (F5), enter the password again and it should work.

Folks, some testing at Picademy today revealed an issue with these instructions. It was to do with copying and pasting the init.d scripts. It took me a while to find out why. It was an invalid space character being introduced by the way the forum displays the code inside a code-block. So I've fixed it by providing the raw files that you just download using wget. Instructions above have been updated to include this.

If you had any issues with this it should work fine for you now. Thanks!

Real life is, to most, a long second-best, a perpetual compromise between the ideal and the possible.
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?

I followed your instructions precisely and ignored the LSB error as you suggested...
I have an apache2 web server running on port 80... so naturally that what displays when I go to ip address...
but when I go to my raspberry ip address on port 5900, 5901, 5800, 5801, nothing pulls up...
Is this noVNC package designed to run on port 80?
I stopped my apache2 server to see if noVNC would show on port 80...
still didnt see anything...
Do you have suggestions?

joshebosh wrote:I followed your instructions precisely and ignored the LSB error as you suggested...
I have an apache2 web server running on port 80... so naturally that what displays when I go to ip address...
but when I go to my raspberry ip address on port 5900, 5901, 5800, 5801, nothing pulls up...
Is this noVNC package designed to run on port 80?
I stopped my apache2 server to see if noVNC would show on port 80...
still didnt see anything...
Do you have suggestions?

Hi there, yes it is set up to use port 80. You can change that though. You'll need to edit the vncproxy service script and restart it.

So your Raspberry Pi is connected to your network and your network is connected to the outside world. There's no reason why you shouldn't be able to connect a VNC client on another machine to a VNC server running on your RPi.

Yes vncserver is working, i check log files is listening port 5901
My network is set as home and trusted, yes is also confused for me because on devices connected via WiFi is working fine but not via lan.

I followed the steps however I am not able to get in via the browser. I have found if I manually start the socket I am able to get in. any ideas of what i did wrong?
I ended up running
pi@raspberrypi ~ $ vncserver -kill :1
pi@raspberrypi ~ $ vncserver :1 -geometry 1720x780 -depth 16

I followed these steps but after I wrote the shell script and then rebooted the pi it is now asking for a password? Any ideas on what this might be? I have used my pi so far with no passwords to write lots of python etc. How can I get back into the Pi?

DougieLawson wrote:They use the framebuffer directly, they aren't using XWindows so can NEVER work on a VNC session.

Never, is a very long time . There is a project (that has been resurrected recently) to use the software interface (called DispmanX) to take snapshots of the Raspberry Pi display and provide VNC functionality. There is a thread here about it. It really is a work in progress, but it works surprisingly well on a Pi 2 (for small display sizes). Although, (to be consistent with this thread) I am not sure if that code provides a web interface.