I'm teaching children programming with Scratch and we're giving each student a Raspberry Pi to use. I want to be able to give them extra files for lessons down the road (like new background or sprite images), but I want it to be as seamless as possible. It's safe to say that their technical knowledge is low, so I'd prefer to have a background service do it automatically.

I use Syncthing for my own purposes across devices, so this was my first thought. But to prepare each Raspberry Pi, I'll simply be copying the same SD card image that I've prepared onto each student's SD card. My understanding is that Syncthing and other similar programs require unique user IDs for each system. So if I'm cloning the same system, they'll all have the same ID and I'm guessing this will not work as intended. But I also don't want to have to manually configure Syncthing across a dozen or more systems.

Is there some way to set this up before cloning the systems and have it sync files from my system to each of theirs without any action on their part? Alternatively, if there's some way to programmatically change the relevant files on the system image before writing each one, that would be fine, too. Thanks!


Have you tried using Rsync? it will require internet access and a server but its very easy to use, on Windows you can use DeltaCopy

https://www.thegeekstuff.com/2012/05/rsync-for-windows-deltacopy/?utm_source=tuicool https://www.raspberrypi.org/documentation/remote-access/ssh/rsync.md

  • Thanks. I'm familiar with rsync and I use it frequently. But as I mentioned in the question, the students are not tech savvy and I don't expect them to be able to run such commands on their own. And teaching them how is outside the scope of this course. I could rsync files to their computers from mine when they are in class, but then I'd have to create separate hostnames for each system after imaging them and keep track of those. Just like setting up Syncthing on each system, that is a hassle I'd prefer to avoid if possible. – cbunn Mar 3 '18 at 6:08
  • They dont have to know, just setup a cron job or create a bash script that they will run to update their systems raspberrypi.org/documentation/linux/usage/cron.md – Chico3001 Mar 3 '18 at 6:12
  • Hmm, that's an idea. The only issue would be that I can only really expect students to have their systems online when they are at school (though they are free to use them at home), but there are several classes of students with different class times and different teachers (so different host machines on different networks), so I think that might get a bit complicated. But I'll keep it in mind. Thanks. – cbunn Mar 3 '18 at 6:16
  • Setup a common server, create folders for each class, give each professor R/W permissions and only Read status for students, you can even expose it to internet using a DDNS and opening your firewall, create a cron job to run every hour, rsync will only synchronize last changes made from the assigned professor, also you can make a bash script that the student can run at the beginning of the class, another idea is to use a cloud storage account like onedrive, dropbox or gdrive – Chico3001 Mar 3 '18 at 6:38
  • @PimpJuiceIT I'm teaching them Scratch programming, which is a visual programming language. Editing actual code, running scripts and setting up cron jobs are well outside the scope of what I want them to learn. These are elementary school students and we're going to be making simple animated stories and games. If you're not familiar with Scratch, you should check it out. – cbunn Mar 3 '18 at 7:49

I ended up using wget in a bash script, since we have a web server onto which I could load the files. While I like rsync, loading credentials for our server onto student devices seemed like a security risk.

I run the script via cron, but with the @reboot keyword so that it runs whenever the students boot up their Raspberry Pis, which would be at the beginning of class.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.