How simple web kiosks have become thanks to Webconverger
Creating a fullscreen web app kiosk has never been easier thanks to Webconverger
Recently I decided it was time to get around to creating a dashboard for the World Digital Library. We'd talked about it for years but there was always the hassle of maintaining another system acting as a deterrent for a side project. Since browsers have become more capable, however, I decided yesterday to see how far I could get with a pure static HTML page and a static boot-to-browser system.
I quickly found Webconverger, which is a Debian derivative intended for kiosks, schools & libraries, etc. A quick look at the API documentation showed that all of the configuration I needed was possible simply by editing the boot-loader config. I tossed together a quick HTML page which loaded various things from Twitter, Graphite, Atom feeds, etc. and tossed it into an S3 bucket.
Building the bootable USB key
- I downloaded the ISO image and used dd to transfer it to a spare USB key (thanks conference vendors!) and booted to confirm that my hardware was supported and that the page looked great after typing the URL into the browser.
As per the documentation, everything worked automatically once I added a few boot parameters at startup:
noblank chrome=webcfullscreen homepage=http://example.org
Unfortunately, on OS X there's no easy way to mount an ISO image read-write so it's not as simple as editing the file in your favorite editor…
Now for the applied laziness: there's a paid configuration service and full developer instructions, and for that matter there are generic ISO editing tools, but I really just wanted to edit a text file which lives in
/boot/live.cfgand it felt somewhat excessive to setup a full toolchain to change a few bytes of ASCII text
Solution: make a copy of the ISO file, open up Hex Fiend and search for a string which would only appear in the target file, as determined by looking in
/boot/live.cfgafter mounting the ISO read-only:
append initrd=/live/initrd2.img boot=live skipconfig quiet splash
- It's not quite simple as simply inserting text because I don't want to corrupt the ISO image by changing the size but fortunately there's a ton of boilerplate which I don't need for a simple dashboard. Like most C programs, the bootloader is almost certain to stop reading once it finds null bytes and indeed a quick glance shows a block of 00 bytes starting after the final character in the file.
A quick pass through an editor and I have the following trimmed down config with the customizations on the end of the append line:
DEFAULT live-686-pae label live-686-pae menu label 686-pae: Live kernel /live/vmlinuz2 append initrd=/live/initrd2.img boot=live skipconfig quiet splash bootfrom=removable noblank chrome=webcfullscreen homepage=http://example.org
Past it in at the start of live.cfg, switch to the hex pane and pad out the file with NULLs until the original text is completely replaced.
- Use dd to write the modified ISO to your USB key and reboot