setting ip addresses ahead of time for TightVNC

Classroom setup, good teaching practice and practical advice
User avatar
bstanard
Posts: 16
Joined: Tue Oct 11, 2016 8:25 pm

setting ip addresses ahead of time for TightVNC

Postby bstanard » Thu Mar 16, 2017 1:46 pm

I am setting up for a two week training for a group of 15 middle school students by "burning" Raspian images on micro-SD cards. They will be accessing their Pi's via Ethernet cables and TightVNC clients running on either Windows laptop or desktop machines. How do I configure (and therefore know) the ip addresses of the Pi's ahead of time so that the students can log in to the Pixel desktop? I have already enabled the Pi's to boot to the GUI desktop in the image that I am using as a master for the multiple burns (using Win32DiskImage). We are using the most recent Pi 3's for the classes. Visit us at http://techlabstl.org/what-we-teach.html
User avatar
RaTTuS
Posts: 9278
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: setting ip addresses ahead of time for TightVNC

Postby RaTTuS » Thu Mar 16, 2017 1:48 pm

if they are all on a network then use the dhcp server to issue leases ....
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
mattmiller
Posts: 1298
Joined: Thu Feb 05, 2015 11:25 pm

Re: setting ip addresses ahead of time for TightVNC

Postby mattmiller » Thu Mar 16, 2017 3:09 pm

This looks like valid infor

https://www.modmypi.com/blog/how-to-giv ... ess-update

try it on one and make sure it works

Alternatively, if on a DHCP network (As most schoosl are) you could probably not have to bother with this and just change the hostname of each machine and then simply use the hostname when connecting using VNC

Whatever method you use - test it beforehand :)
User avatar
bstanard
Posts: 16
Joined: Tue Oct 11, 2016 8:25 pm

Re: setting ip addresses ahead of time for TightVNC

Postby bstanard » Thu Mar 16, 2017 6:35 pm

Does that mean that I should log on to each micro-SD card (inserted and booted in a Pi) and give it a hostname (e.g., weasel, stoat, mole, toad, et cetera)? Otherwise, each student will have to boot when connected to a monitor, keyboard, and mouse, and connect to the DHCP served network in order to receive an ip address. Without knowing either an ip address or a hostname, the student will be unable to, upon their first login, access the Pi via a TightVNC client running on a PC. Do I have this correct, or am I missing something?
mattmiller
Posts: 1298
Joined: Thu Feb 05, 2015 11:25 pm

Re: setting ip addresses ahead of time for TightVNC

Postby mattmiller » Thu Mar 16, 2017 7:52 pm

Do I have this correct, or am I missing something?
No - that's the situation :(
fruitoftheloom
Posts: 14171
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK

Re: setting ip addresses ahead of time for TightVNC

Postby fruitoftheloom » Thu Mar 16, 2017 8:10 pm

bstanard wrote:I am setting up for a two week training for a group of 15 middle school students by "burning" Raspian images on micro-SD cards. They will be accessing their Pi's via Ethernet cables and TightVNC clients running on either Windows laptop or desktop machines. How do I configure (and therefore know) the ip addresses of the Pi's ahead of time so that the students can log in to the Pixel desktop? I have already enabled the Pi's to boot to the GUI desktop in the image that I am using as a master for the multiple burns (using Win32DiskImage). We are using the most recent Pi 3's for the classes. Visit us at http://techlabstl.org/what-we-teach.html
PiNet: http://pinet.org.uk
.
Ex Computer Repair & Service Technician.
RPi 3B, HP Envy 4500 Wireless Printer, Google Chromecast, Android Smart Phone, HD 1080p TV and 3/4G Mobile Internet make ideal companions.
User avatar
bstanard
Posts: 16
Joined: Tue Oct 11, 2016 8:25 pm

Re: setting ip addresses ahead of time for TightVNC

Postby bstanard » Thu Mar 16, 2017 8:45 pm

fruitoftheloom: very cool idea, your pinet....

mattmiller wrote:
just change the hostname of each machine and then simply use the hostname when connecting using VNC
I'm not familiar with login using just the hostname (and not the ip address) using VNC. Can you point me in the right direction to enable this? When trying it via TightVNC, I get the following error: The requested name is valid, but no data of the requested type was found.

I am able to log in using the ip address, however.
mattmiller
Posts: 1298
Joined: Thu Feb 05, 2015 11:25 pm

Re: setting ip addresses ahead of time for TightVNC

Postby mattmiller » Fri Mar 17, 2017 6:44 am

I'm not familiar with login using just the hostname (and not the ip address) using VNC. Can you point me in the right direction to enable this? When trying it via TightVNC, I get the following error: The requested name is valid, but no data of the requested type was found.

I am able to log in using the ip address, however.
Sometimes, machine hostnames don't resolve but if your append .local to the the hostname you may have better success e.g weasel.local - if not then just stick to using the IPs
ghp
Posts: 1141
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact:

Re: setting ip addresses ahead of time for TightVNC

Postby ghp » Sat Apr 22, 2017 4:00 pm

Hello, if you use your own Pi and own network, then a dedicated DHCP server - on a Pi - could be a solution. Assign ip addresses and node names based on mac address.
Hope this helps,
Gerhard