MrsKSayers
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 16
Joined: Wed Jun 11, 2014 11:53 am
Location: Derby

VNC & Pi to Offline PC

Sat Sep 13, 2014 12:01 pm

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

fruitoftheloom
Posts: 17489
Joined: Tue Mar 25, 2014 12:40 pm

Re: VNC & Pi to Offline PC

Sat Sep 13, 2014 12:15 pm

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 ;)
Adieu

MrsKSayers
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 16
Joined: Wed Jun 11, 2014 11:53 am
Location: Derby

Re: VNC & Pi to Offline PC

Sat Sep 13, 2014 12:21 pm

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.

MrsKSayers
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 16
Joined: Wed Jun 11, 2014 11:53 am
Location: Derby

Re: VNC & Pi to Offline PC

Sat Sep 13, 2014 12:23 pm

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

fruitoftheloom
Posts: 17489
Joined: Tue Mar 25, 2014 12:40 pm

Re: VNC & Pi to Offline PC

Sat Sep 13, 2014 12:30 pm

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 ;)
Adieu

MrsKSayers
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 16
Joined: Wed Jun 11, 2014 11:53 am
Location: Derby

Re: VNC & Pi to Offline PC

Sat Sep 13, 2014 12:35 pm

I'll take a look at that then :)

User avatar
DougieLawson
Posts: 33858
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: VNC & Pi to Offline PC

Sat Sep 13, 2014 9:24 pm

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
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

MrsKSayers
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 16
Joined: Wed Jun 11, 2014 11:53 am
Location: Derby

Re: VNC & Pi to Offline PC

Sat Sep 13, 2014 9:26 pm

Thank you!

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

fruitoftheloom
Posts: 17489
Joined: Tue Mar 25, 2014 12:40 pm

Re: VNC & Pi to Offline PC

Sat Sep 13, 2014 9:58 pm

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.. ;)
Adieu

MrsKSayers
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 16
Joined: Wed Jun 11, 2014 11:53 am
Location: Derby

Re: VNC & Pi to Offline PC

Mon Sep 15, 2014 3:26 pm

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!

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: VNC & Pi to Offline PC

Wed Oct 15, 2014 7:24 am

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.

Return to “Picademy”

Who is online

Users browsing this forum: No registered users and 1 guest