Page 1 of 1

VNC & Pi to Offline PC

Posted: Sat Sep 13, 2014 12:01 pm
by MrsKSayers
Hi,

I'm trying to connect my Pi to a laptop using VNC without the laptop/PC being online e.g. a stand alone system.

The only room I can use my Pi's in at school is a network room which is off the school network so the computers have no connectivity to other machines.

I'm wanting to start a Pi club after the October break but without this working I will only have about 5 I can use which will make a very boring club! I've got loads of kids wanting to come and about another 15 pi's I can use if I can get VNC working.

Thanks

Kim

Re: VNC & Pi to Offline PC

Posted: Sat Sep 13, 2014 12:15 pm
by fruitoftheloom
MrsKSayers wrote:Hi,

I'm trying to connect my Pi to a laptop using VNC without the laptop/PC being online e.g. a stand alone system.

The only room I can use my Pi's in at school is a network room which is off the school network so the computers have no connectivity to other machines.

I'm wanting to start a Pi club after the October break but without this working I will only have about 5 I can use which will make a very boring club! I've got loads of kids wanting to come and about another 15 pi's I can use if I can get VNC working.

Thanks

Kim
Yes you have a Laptop unfortunately no details of Operating System

Why is VNC not working ? which operating system is installed on th Pi ?

http://www.raspberrypi.org/documentatio ... /README.md

What is VNC relevence to using many Pi's ?

If the room you are in has a ethernet network then running a server may be feaasible ;)

Re: VNC & Pi to Offline PC

Posted: Sat Sep 13, 2014 12:21 pm
by MrsKSayers
Sorry me bad!

Windows (I believe the school machines are 7)
TightVNC runs off the Pi (raspbarian) and implies a name of raspberrypi:1 (which I believe means name of raspberry pi with port 1) but when I use remote desktop or tight VNC on the PC it says it can't find it or if I change to the suggested port of 5901 I get actively refuses the connection.

I can connect to the internet using my LAN plug and the ethernet at home but the issue is at school when there is no connection to pi or pc so neither have an IP other than the 127.0.0.1 IP.

I was under the impression that there is an alternate methodology under these circumstances.

Re: VNC & Pi to Offline PC

Posted: Sat Sep 13, 2014 12:23 pm
by MrsKSayers
Oh and I only have a few spare monitors at school (as mentioned above I could set 5 up) but have spare pi's. To have the club I want more pi's working and I've been told I can use some old laptops that are not connected. This would resolve the lack of KVM issue

Re: VNC & Pi to Offline PC

Posted: Sat Sep 13, 2014 12:30 pm
by fruitoftheloom
MrsKSayers wrote:Sorry me bad!

Windows (I believe the school machines are 7)
TightVNC runs off the Pi (raspbarian) and implies a name of raspberrypi:1 (which I believe means name of raspberry pi with port 1) but when I use remote desktop or tight VNC on the PC it says it can't find it or if I change to the suggested port of 5901 I get actively refuses the connection.

I can connect to the internet using my LAN plug and the ethernet at home but the issue is at school when there is no connection to pi or pc so neither have an IP other than the 127.0.0.1 IP.

I was under the impression that there is an alternate methodology under these circumstances.
First and foremost by default Raspbian Wheezy is a DHCP Client and plugging in a Ethernet Cable connected to a Router or PC/Laptop it seeks a DHCP Server.

Therefore Windows 7 needs to be setup as a DHCP Server and to do so Internet Connection Sharing needs to be enabled, it does not matter whether or not you have an actual live internet connection, see

http://windows.microsoft.com/en-gb/wind ... =windows-7

If you do it this way the Pi should work both at home and school ;)

Re: VNC & Pi to Offline PC

Posted: Sat Sep 13, 2014 12:35 pm
by MrsKSayers
I'll take a look at that then :)

Re: VNC & Pi to Offline PC

Posted: Sat Sep 13, 2014 9:24 pm
by DougieLawson
It's easy to simply update your RPi to use a fixed IP address from the 169.254.xxx.yyy/16 link local subnet.

I use 169.254.3.14.

Two ways to get that set-up:
1. Update /etc/network/interfaces to define it

Code: Select all

iface eth0 inet static
address 169.254.3.14
netmask 16
You don't need to code gateway, network or broadcast.

2. Update /boot/cmdline.txt add ip=169.254.3.14 to the end of the one line in that file (with NOOBS you'll may need to use the NOOBS recovery editor to update the right cmdline.txt file).

Wire the ethernet directly to your laptop. Windows will do the stuff it needs (no DHCP server needed) and assign an address from the same 169.254.xxx.yyy/16 subnet. You can then use PuTTY to connect to 169.254.3.14, stoke up vncserver and connect from you VNC client to 169.254.3.14

Re: VNC & Pi to Offline PC

Posted: Sat Sep 13, 2014 9:26 pm
by MrsKSayers
Thank you!

That's more what I was thinking :-)
Will play more tomorrow

Re: VNC & Pi to Offline PC

Posted: Sat Sep 13, 2014 9:58 pm
by fruitoftheloom
MrsKSayers wrote:Thank you!

That's more what I was thinking :-)
Will play more tomorrow
If you set Static IP on the School Laptop and Pi as above then it will work, but if at home you use Ethernet to connect to a Modem / Router then you may find it will no longer connect, that is why suggested DHCP. Good luck and a good learning experience.. ;)

Re: VNC & Pi to Offline PC

Posted: Mon Sep 15, 2014 3:26 pm
by MrsKSayers
Hi,

It's the school laptops I'm most concerned with so this is great
Even better will be getting a working solution before the techs do!

Re: VNC & Pi to Offline PC

Posted: Wed Oct 15, 2014 7:24 am
by Davespice
Folks, instructions for doing just this are here: http://www.raspberrypi.org/forums/viewt ... 99&t=81165

In that setup the Pi acts as a DHCP server and issues an IP address to the offline PC.
The offline PC then just uses the address 10.0.0.1 to connect to the Pi.