Recycled computers as Scratch! arcade machines — Pt 4

To recap, our hope of a simple web menu driven interface for our Scratch! arcade machine had crashed and burned. No matter what we tried we couldn’t convert the game to javascript, which was the only way we could get a stand-alone offline scratch player working. Our graphic designer came to the rescue, using another nifty little utility created by the scratch community. ScratchtoExe takes a scratch 1.4 file and turns it into a windows executable. Now we just needed to get windows running on our linux machine! This sounds daunting, but thanks to the efforts of the WINE project, lots of windows programs can be run on top on linux. So we converted our games, installed WINE, and our game worked fine as a windows .exe. The next challenge was getting access to this via a web page, things got a little tricky at this point…

The first time WINE runs, it creates some folders and files to store and keep track of settings. Running WINE as normal user is fine, but running WINE from a web server as we need to do for our menu means that the web server itself is the user. And web servers don’t usually get permission to create files and folders willy-nilly, with good reason. Our solution? Run our server as a stand alone LAMP stack from within our kiosk user account, that way the files and folders created are for that user only. I pulled down a stand-alone LAMP stack from bitnami, installed it, copied across our web content then rebooted into kiosk mode, and sure enough, there was our arcade game, in all its 8-bit glory. It looked like we had a working system, all that we needed now was to turn this system into a bootable live USB.

Leave a Reply

Your email address will not be published. Required fields are marked *