From fe9c34c3a3b75e9170827d0618ef1210dcf9b3c8 Mon Sep 17 00:00:00 2001 From: Jarno Rantanen Date: Sat, 26 Mar 2016 11:07:09 +0200 Subject: [PATCH] Fix chromium version, as the latest (at the time of writing) segfaulted on the pi. Also update partition sizes to make the resulting image smaller. --- README.md | 2 +- home/on-pi-startup.sh | 10 ++++++---- image-setup.md | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9c5d37b..b53fea4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # chilipie-kiosk -**Raspberry Pi 2** image for booting directly into **full-screen Chrome**. Main features: +**Raspberry Pi 2** image for booting directly into **full-screen Chrome**. Perfect for dashboards and build monitors. Main features: * **Boots directly to full-screen Chrome** - with all the features of a modern browser * **No automatic updates** - no surprises due to Chrome (or other packages) suddenly updating diff --git a/home/on-pi-startup.sh b/home/on-pi-startup.sh index 39c22d8..4adc838 100755 --- a/home/on-pi-startup.sh +++ b/home/on-pi-startup.sh @@ -2,10 +2,12 @@ # Make sure Chromium profile is marked clean, even if it crashed # https://stedolan.github.io/jq/manual/ -cat .config/chromium/Default/Preferences \ - | jq '.profile.exit_type = "SessionEnded" | .profile.exited_cleanly = true' \ - > .config/chromium/Default/Preferences-clean -mv .config/chromium/Default/Preferences{-clean,} +if [ -f .config/chromium/Default/Preferences ]; then + cat .config/chromium/Default/Preferences \ + | jq '.profile.exit_type = "SessionEnded" | .profile.exited_cleanly = true' \ + > .config/chromium/Default/Preferences-clean + mv .config/chromium/Default/Preferences{-clean,} +fi # http://peter.sh/experiments/chromium-command-line-switches/ chromium-browser --start-fullscreen diff --git a/image-setup.md b/image-setup.md index f83a359..06729fa 100644 --- a/image-setup.md +++ b/image-setup.md @@ -17,13 +17,13 @@ 1. Disable MATE's default desktop with `$ sudo graphical disable` (though later nodm will boot directly to matchbox anyway) 1. [Re-size the SD card file system](https://ubuntu-mate.org/raspberry-pi/): 1. `$ sudo fdisk /dev/mmcblk0` - 1. Delete the second partition (d, 2), then re-create it using the defaults (n, p, 2, enter, enter), then write and exit (w) + 1. Delete the second partition (d, 2), then re-create it with slightly more free space (n, p, 2, enter, +4500M, enter), then write and exit (w) 1. Reboot 1. `$ sudo resize2fs /dev/mmcblk0p2` 1. Reboot 1. Clean up MATE's desktop cruft with `$ rm -rf ~/*` 1. Install some packages we'll need: - 1. `$ sudo apt-get update && sudo apt-get install -y vim nodm matchbox-window-manager unclutter chromium-browser mailutils nitrogen jq` + 1. `$ sudo apt-get update && sudo apt-get install -y vim nodm matchbox-window-manager unclutter mailutils nitrogen jq chromium-browser=45.0.2454.101-0ubuntu1.1201 chromium-codecs-ffmpeg=45.0.2454.101-0ubuntu1.1201` 1. When mailutils prompts about its setup, "local only" is fine 1. Make sure [automatic software updates are disabled](http://ask.xmodulo.com/disable-automatic-updates-ubuntu.html), in `/etc/apt/apt.conf.d/10periodic`: @@ -74,5 +74,5 @@ 1. Dump the image to disk (assuming OS X): 1. `$ diskutil list` to check correct device 1. `$ diskutil unmountDisk /dev/disk2` to prepare it for imaging - 1. `$ sudo dd bs=1m if=/dev/disk2 of=chilipie-kiosk-TAG.img` + 1. `$ sudo dd bs=1m count=5120 if=/dev/disk2 of=chilipie-kiosk-TAG.img` (only dump the relevant first 5 GB) 1. `$ zip chilipie-kiosk-TAG.zip chilipie-kiosk-TAG.img`