Gbaman
Posts: 155
Joined: Mon Jan 21, 2013 2:43 pm

Raspi-LTSP Networked classroom system

Sat May 10, 2014 5:29 pm

Note - The below is now out of date. The project has been renamed to PiNet and all details can be found here - http://pinet.org.uk/




Over past 6-7 months I have been working on a free opensource project to make Raspberry Pis quite a bit easier to manage in a classroom.
We are all used to being able to sit down at any computer in the school, log in, have access to all files, why can’t we do this with Raspberry Pis?

With Raspi-LTSP, all the pupils work is stored on a (really easy to setup) server. This means a single place to back up and all the students work is safe. Also means any student can log into any Raspberry Pi!

The other big feature of Raspi-LTSP is the Raspbian operating system used by the Raspberry Pis, is not actually on the SD card in the Raspberry Pi.. It is sitting on the server too. The Raspberry Pi SD card has 30mb of boot files, that is it! No more wasting hours flashing 30+ SD cards with 2-3gb images. These files are autogenerated by the server.
The advantage of all this? You want to install a package? Install it on the server and all the Pis are now updated, simple.

Finally, a simple student work handin system is included, which grabs work from students "handin" folders and places it in a special folder on the teachers account, ready for them to mark. No need for printing or logging into a web based system.

Full details on the project can be found on my blog - http://pi.gbaman.info/?p=256
There is even a full 30 page setup/help/troubleshooting guide filled with pictures!
Here is a video made of a slightly older version of Raspi-LTSP done by Ben Smith, a secondary school teacher - https://www.youtube.com/watch?v=A09Luvd ... Nxf-Q70Tug
Image
Management console

Image
Login screen


So if you are a teacher wanting to set up a room of Raspberry Pis, might be worth checking this out!
Last edited by Gbaman on Wed Oct 21, 2015 1:02 pm, edited 2 times in total.
Lead developer of PiNet, a free and opensource centralised user accounts and file storage system for Raspberry Pi classrooms used in over 200 schools across the world.
http://pinet.org.uk

greavette
Posts: 85
Joined: Thu Oct 04, 2012 4:25 pm

Re: Raspi-LTSP Networked classroom system

Mon Sep 01, 2014 5:06 pm

This is a very interesting project. I'm installing ubuntu 14.04 now as a VM and will test out your system. Thanks very much for making this available to us all.

I'd like to know more about how the Raspberry Pi gets it's O/S from the LTSP server. You mention it is a very small image (that is actually pushed to the Pi's SD Card...very cool idea!). How minimal is this? The reason I ask is I have a need to attach a USB device to the Raspberry Pi and have it available on the LTSP Desktop session. What I'm currently using is Raspbian on the Pi and I've installed Virtualhere which allows me to use USBoverIP to connect a USB device on the Pi and have the remote desktop think it's installed locally. What do you think? Would I be able to install on the 30mb image the necessary bits to get virtualhere started as a service on the Pi?

I'm looking forward to getting your ltsp server up and running. Thanks again!

Gbaman
Posts: 155
Joined: Mon Jan 21, 2013 2:43 pm

Re: Raspi-LTSP Networked classroom system

Tue Sep 02, 2014 11:49 am

greavette wrote:This is a very interesting project. I'm installing ubuntu 14.04 now as a VM and will test out your system. Thanks very much for making this available to us all.

I'd like to know more about how the Raspberry Pi gets it's O/S from the LTSP server. You mention it is a very small image (that is actually pushed to the Pi's SD Card...very cool idea!). How minimal is this? The reason I ask is I have a need to attach a USB device to the Raspberry Pi and have it available on the LTSP Desktop session. What I'm currently using is Raspbian on the Pi and I've installed Virtualhere which allows me to use USBoverIP to connect a USB device on the Pi and have the remote desktop think it's installed locally. What do you think? Would I be able to install on the 30mb image the necessary bits to get virtualhere started as a service on the Pi?

I'm looking forward to getting your ltsp server up and running. Thanks again!
To clarify how it works.
You copy the 33mb set of custom boot files the server generates on setup to every SD card you want to use. These files are required as the Pi can't PXE boot.
Once it loads up and finds the server, it does not copy any to the SD card. The SD card can actually be removed 5 seconds after boot, it is only for loading those initial boot files!

Once booting, the Pi is tricked into thinking the server is it's SD card. So the Pi boots as normal and thinks it is a normal Raspberry Pi.

So basically it is nearly exactly the same to the end user as using a local SD card. With the exception of a login screen etc.

So if it works with a standalone Raspberry Pi, can nearly guarantee that type of application will work the same with Raspi-LTSP
Lead developer of PiNet, a free and opensource centralised user accounts and file storage system for Raspberry Pi classrooms used in over 200 schools across the world.
http://pinet.org.uk

greavette
Posts: 85
Joined: Thu Oct 04, 2012 4:25 pm

Re: Raspi-LTSP Networked classroom system

Mon Sep 08, 2014 9:30 pm

Thank you for taking the time to reply to my post.

I must congratulate you on this amazing project...very well done. Documentation is excellent and it's easy to setup and administer using the raspi-ltsp menu. You've done a very thorough job with this project.

I see a lot of value in using it. At home my kids want computers in their rooms. I have a number of Raspberry Pi's lying around. Now that I have your Raspi-LTSP setup on my basement home server in Virtualbox, I'm going to setup each of the kids to have their own Pi. Very useful.

I'd also like to show this to some teachers at school. The use of Epoptes is very useful for the teacher...and again this setup is so well done, I think our school could really benefit from this.

On a personal note I'd like to see if I can install a custom application in ltsp and get it working from the Pi-LTSP. The application is called virtualhere. It is a server application that allows for USBoverIP to a Client. I'm testing using your raspi-ltsp to remote into (rdesktop) into a Windows virtual machine whereby I want to see if In can setup a virtualhere server in ltsp for each client to connect to their respective windows workstations.

The application requires the following setup. On my Raspbery Pi running Raspbian (so it would work on any debian based machine) I would do the following:

wget http://www.virtualhere.com/sites/defaul ... /vhusbdpin
sudo chmod +x ./vhusbdpin
sudo mv vhusbdpin /usr/sbin
wget http://www.virtualhere.com/sites/defaul ... /vhusbdpin
sudo chmod +x ./vhusbdpin
sudo mv vhusbdpin /etc/init.d
sudo update-rc.d vhusbdpin defaults

Is it possible to execute this in your Raspi-LTSP so each user would have the vhusbdpin programs available to their sessions when running from their raspberry pi's?

If the answer is yes, could I ask for your help in how I do this? I see in your raspi-ltsp menu there is a way to install a custom application but this application requires manual moves of files and setting up the update-rc.d file for starting the server.

Any help you can provide would be greatly appreciated.

Gbaman
Posts: 155
Joined: Mon Jan 21, 2013 2:43 pm

Re: Raspi-LTSP Networked classroom system

Mon Sep 08, 2014 10:16 pm

Am glad to hear you have had success with it greavette.
Documentation was a really important part of the project as without it how could I expect educators to consider it.

In answer to your question, you can manually install stuff from the Raspi-LTSP Raspbian shell.
This is currently better explained in the new documentation (is being moved from a word document to a github repository) but will briefly explain.
You can launch a Raspi-LTSP Raspbian shell by opening a terminal on the Ubuntu server and typing
sudo ltsp-chroot
You will then have a virtual Raspbian shell into your Pis operating system and it should act (nearly completely) like a real Raspbian install on a Raspberry Pi so all your commands should work.
You may want to cd /tmp at the start if you are downloading stuff etc though.

Finally the extremely important bit is you manually recompress the operating system when you are finished. Raspi-LTSP would normally do this itself but it has no idea you just manually edited the OS.
To recompress it open Raspi-LTSP and select other followed by the Recompress option (can't remember exact option name of top of my head).
Should take a few mins.
Then reboot your Raspberry Pis and all should be good.

If not, let me know and I will look into it myself.

Thanks again for the kind comments, brightened up my evening :)
Lead developer of PiNet, a free and opensource centralised user accounts and file storage system for Raspberry Pi classrooms used in over 200 schools across the world.
http://pinet.org.uk

greavette
Posts: 85
Joined: Thu Oct 04, 2012 4:25 pm

Re: Raspi-LTSP Networked classroom system

Thu Sep 11, 2014 2:48 am

Thank you for these instructions. Worked perfectly. I've successfully added Virtualhere to my ltsp sessions and confirmed that I can rdesktop into a Windows VM using the Virtualhere client and connect my USB stick from the Raspberry Pi to the Windows VM. Next test will be to have more than one Raspberry Pi client connect to the raspi-ltsp server and use Virtualhere to two Windows VM's.

I'm looking through the menu and was looking for more information. Perhaps you can fill in some blanks for me:

* When would I need to update the SD card? And is there a way to push out the updates to the Piboot files to an SD Card? I've noticed that when I look at my file manager in ltsp I can see the SD card from my connected Pi.

* During the install of raspi-ltsp do you download the latest hardfloat version of Raspbian? The reason I ask is because I've used another flavour of Raspbian from the Thin Client Project (http://rpitc.blogspot.ca/). They too have a hardfloat version that's specialized to run various Thin Client apps (rdesktop, spice, freenx, Citrix). In your opinion would I be able to use this version to build the PiBoot files that would run on your project?

* How do I use the Pi-Control-Menu. I've activated it but how do I start it now? I'd like to see what it does.

* Is there a way that you know of to SSH into the Raspberry Pi? For example, if I wasn't onsite and couldn't physically reboot the Pi or use the Epoptes application to give a Pi session a reboot, is there a way to SSH into that Pi to take control of it and give is a restart?

Thank you.

Gbaman
Posts: 155
Joined: Mon Jan 21, 2013 2:43 pm

Re: Raspi-LTSP Networked classroom system

Thu Sep 11, 2014 7:49 am

greavette wrote:Thank you for these instructions. Worked perfectly. I've successfully added Virtualhere to my ltsp sessions and confirmed that I can rdesktop into a Windows VM using the Virtualhere client and connect my USB stick from the Raspberry Pi to the Windows VM. Next test will be to have more than one Raspberry Pi client connect to the raspi-ltsp server and use Virtualhere to two Windows VM's.

I'm looking through the menu and was looking for more information. Perhaps you can fill in some blanks for me:

* When would I need to update the SD card? And is there a way to push out the updates to the Piboot files to an SD Card? I've noticed that when I look at my file manager in ltsp I can see the SD card from my connected Pi.

* During the install of raspi-ltsp do you download the latest hardfloat version of Raspbian? The reason I ask is because I've used another flavour of Raspbian from the Thin Client Project (http://rpitc.blogspot.ca/). They too have a hardfloat version that's specialized to run various Thin Client apps (rdesktop, spice, freenx, Citrix). In your opinion would I be able to use this version to build the PiBoot files that would run on your project?

* How do I use the Pi-Control-Menu. I've activated it but how do I start it now? I'd like to see what it does.

* Is there a way that you know of to SSH into the Raspberry Pi? For example, if I wasn't onsite and couldn't physically reboot the Pi or use the Epoptes application to give a Pi session a reboot, is there a way to SSH into that Pi to take control of it and give is a restart?

Thank you.

Great to hear your setup is getting there.

1. The SD card just basically contains the minimum files for boot, aka the kernel, the boot blob etc and the config files. Sometimes if a new kernel is released by the Raspbian team (very 3-6 months) then I update the SD card image. Running the update-sd option will pull a new copy of the SD card files. It's second feature is it will also reset the IP address saved in the config files on the SD card. Although this is easy to manually change (in the cmdline.txt file), Raspi-LTSP is trying to be as simple as possible for teachers so editing a text file like that is classed as a bit complicated.

2. Yes and No. What Raspi-LTSP actually does is builds Raspbian... From scratch basically... As Linux OSs are basically entirely made up of packages, you can pull all these packages and build the OS. The Raspberry Pi foundation make a massive number of changes to a basic standard Raspbian OS built by debootstrap. As LTSP itself likes to do the basic client building, I just add the changes the Raspberry Pi foundation add on top, onto Raspi-LTSP Raspbian. I am a little picky though as I don't pull everything and I also add some stuff I think is a good idea (that is usually left out of the SD card images due to size as they want to keep the images really small).
The Raspberry Pi foundation use Spindle which is how I know what changes they make - https://github.com/asb/spindle
Unless Thin Client Project is just Raspbian with extra packages added, it would be very hard to change Raspi-LTSP as it is basically hard-coded for standard Raspbian (because that is what the schools need).
Now, there is nothing stopping you removing the packages you don't need. See the "AddSoftware" function in the Pi_ltsp code where you can comment out bits you don't want.
There is currently no way though of just dropping on a preprepared image file. LTSP likes to build it itself.

3. The Raspberry Pis can be SSHed into as usual like any Raspberry Pi except for 1 minor detail. The Raspberry Pi itself technically has no users enabled.. It gets its users via LDM (login screen) from the server... As these users aren't stored on the Pi, you can't ssh in as them. You can ssh in as root if you enable the root account using
ltsp-chroot passwd
Followed by your new root password then recompress the OS via the "other" menu.
That will allow you to ssh like any other Raspberry Pi just using the login root. Keep in mind that is rather insecure having the route account open to the internet if you do it that way...
Epoptes can only easily be done from the server machine although have been told it is possible to do it from other machines but have not looked into that personally.
Lead developer of PiNet, a free and opensource centralised user accounts and file storage system for Raspberry Pi classrooms used in over 200 schools across the world.
http://pinet.org.uk

greavette
Posts: 85
Joined: Thu Oct 04, 2012 4:25 pm

Re: Raspi-LTSP Networked classroom system

Sun Sep 14, 2014 1:08 pm

Hello again,

Thanks for the instructions. I think a lot of what I'm facing has to do with my newbiness with regards to using LTSP in general. I am asking questions on #ltsp (IRC) and I'm reading up on what I can find on how to use LTSP. I really do appreciate you taking the time to assist me in any way you can as well.

Here's where I am at now.

1. Thanks for the explanation of the the files on the SD Card. On one occasion I noticed that once the Pi is turned on and connected to the LTSP server, I can see the files on the SD card from the LTSP server which I didn't expect. I've rebooted and can't see where I found that now. :) But if it's possible to see the SD card from our LTSP server, could we not update the PiBoot Files from LTSP to the Pi SD card then? This would mean no pulling cards at each workstation and updating files (even though it's not something that has to be done very often, it would save a lot of walking around).

2. I didn't realize that you are building Raspbian when you run your script. I think I will look into removing what I don't need for some instances. The Thin Client Project is just a stripped down Raspbian that is optimized for Thin Client connections. What you have built for us is working fine for me as well.

3. I've tried to use your instructions for ssh access to the Pi using root. I can appreciate the security issue this could cause. My environment is locked down from the Internet behind an Untangle Gateway so I'm willing to take that risk. I've used the instructions you gave but when I try to connect to the Pi using my new root password I get a 'Connection Closed' message. I'm thinking maybe it's because root login is not allowed. How would I check the sshd config file to make sure? Or is there another issue here?

4. I have a fourth question for you. I've branched out to using two Raspberry Pi's now. I can successfully connect to my LTSP sever from Pi #1. I have it setup to auto login and rdesktop to a Windows Virtual Machine. I've got two screen scripts going so I can switch between the Windows VM and the LTSP desktop...working well. So I took the exact files from that SD card and put them on a second SD card and booted up Pi #2. I don't know yet what the IP will be for Pi #2 so I've not added any screen scripts. When Pi #2 boots up, all I see is a loop of the following message "pcilib : cannot open /proc/bus/pci and cannot find any working access method". I've been hanging out on the #ltps IRC channel to find a solution and noticed your question for the same problem on there. How did you get past this error?

Thank you.

greavette
Posts: 85
Joined: Thu Oct 04, 2012 4:25 pm

Re: Raspi-LTSP Networked classroom system

Mon Sep 15, 2014 2:39 am

Sorry, another question for you...

Does your Rasp-Pi use it's own DHCP server? I have a DHCP server on my network in my security gateway (running Untangle). It would appear that the IP address assigned to the Raspberry Pi connected to LTSP is not listed in my DHCP server so I can only guess that it's coming from the LTSP DHCP server. If this is the case, is there a risk to my network with having them both running or have you isolated this someone by the PiBoot files the Raspberry Pi uses to connect to the LTSP server?

Thank you.

suneilbasu
Posts: 3
Joined: Fri Apr 26, 2013 8:18 am
Location: London

Re: Raspi-LTSP Networked classroom system

Sat Oct 11, 2014 11:43 am

Please can you tell me how to add sonic-pi to the available software?

suneilbasu
Posts: 3
Joined: Fri Apr 26, 2013 8:18 am
Location: London

Re: Raspi-LTSP Networked classroom system

Sat Oct 11, 2014 5:23 pm

oops, I think its installed by default. (please remove both my posts to save my pride)

parapac
Posts: 14
Joined: Wed Jul 23, 2014 12:17 pm

Re: Raspi-LTSP Networked classroom system

Wed Oct 21, 2015 10:20 am

just HAD to login and say, wow what a brilliant easy to set-up system.
Just for the record for some unknown reason I could not install Ubuntu OS suggested on my little samsung laptop but Ubuntu Mate 15.04 worked like a dream on install and installing pinet, I am testing it now and wow is all I can say (as the wife is watching tv) i am browsing the desktop on the pi with the built in VNC :D :shock:
Are there any docs to read off line about the setup of the pi enviroment etc.

Gbaman
Posts: 155
Joined: Mon Jan 21, 2013 2:43 pm

Re: Raspi-LTSP Networked classroom system

Wed Oct 21, 2015 1:04 pm

parapac wrote:just HAD to login and say, wow what a brilliant easy to set-up system.
Just for the record for some unknown reason I could not install Ubuntu OS suggested on my little samsung laptop but Ubuntu Mate 15.04 worked like a dream on install and installing pinet, I am testing it now and wow is all I can say (as the wife is watching tv) i am browsing the desktop on the pi with the built in VNC :D :shock:
Are there any docs to read off line about the setup of the pi enviroment etc.
Glad to hear you are enjoying PiNet. Best bet is the advanced section of the site - http://pinet.org.uk/articles/advanced/advanced.html
Also the key information page contains a lot about the inner workings of PiNet - http://pinet.org.uk/articles/key-info.html
Lead developer of PiNet, a free and opensource centralised user accounts and file storage system for Raspberry Pi classrooms used in over 200 schools across the world.
http://pinet.org.uk

Return to “Staffroom, classroom and projects”