I tested this project on a Raspberry Pi 4 Model B. I use this as a kiosk to display webpages, search engines and home automation but with limited access to anything else. This tutorial provides a basic tutorial on how to get the Raspberry Pi setup with Chilipie and configure the basics. You can however edit the crontab and .xsession files for editing the fine details of the system.
- 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
- Automatic crash-recovery – accidental power loss won’t result in “Chrome did not shut down correctly”
- Custom startup graphics – displays customizable graphics instead of console messages during startup
- Lightweight window manager – uses Matchbox (xserver) for minimal clutter and memory footprint
- HDMI output control – ready-made scripts for turning off the display outside of office hours, for example
- Cursor hiding – if you leave a mouse plugged in, the cursor is hidden after a brief period of inactivity
- Automatic reboots – reboots the Pi nightly, when nobody’s watching, to keep it running smoothly
- Based on a recent Debian – if you want to add your own tweaks, all the expected packages are one apt-get away
Build and Installation
- Check that you have compatible hardware.
- Download the latest image – https://github.com/futurice/chilipie-kiosk/releases.
- Decompress it.
- Flash the image onto your SD card with Etcher.
- Optional: Set URL before boot.
- Optional: Setup automatic WiFi.
- Insert the SD card to your Pi and power it up.
- You should land in the first-boot document, for further instructions & ideas. This page can be removed after the first boot by closing it in Chromium. After it’s rebooted it will not reload that page.
Set URL before boot
- After flashing, unmount your SD card.
- Create a chilipie_url.txt on your SD cards boot folder in /home/pi.
- Write URL in first line of file.
Note: You can use ${SERIAL} to get Pi’s serial number into the URL.
Automatic WiFi setup
- After flashing, unmount your SD card.
- Create a wpa_supplicant.conf in your SD cards boot folder.
- Copy the wpa_supplicant.conf file into the boot folder on the SD card.
- Replace WiFi-SSID and WiFi-PASSWORD with your WiFi configuration.
- Optional: Set the country code to your country code e.g. GB.
wpa_supplicant.conf
country=gb
update_config=1
ctrl_interface=/var/run/wpa_supplicant
network={
scan_ssid=1
ssid=”WIFI_NAME”
psk=”PASSWORD”
}
Hardware
Works with all Raspberry Pi versions. Versions 3 and 4 are recommended, though, since the smaller ones can be a bit underpowered for rendering complex dashboards. The 3 and 4 also come with built-in WiFi, which is convenient (though both official and off-the-shelf USB WiFi dongles can work equally well).
Make sure you have a compatible 4+ GB SD card. In general, any Class 10 card will work, as they’re fast enough and of high enough quality.
Background Configuration
To change the background start the Raspberry Pi and let it boot up. Find an image on the web using Chromium. Select ‘Save Image’ this will bring up a dialog box where you can locate the original background.png file by going to ‘pi’. Rename that to background_backup.png and save the new image as background.png
Press Ctrl + Alt + F3 to bring up the terminal window. Run the command ‘sudo reboot’ to restart the Raspberry Pi and check the image.
Adjust Crontab Parameters
Press Ctrl + Alt + F3 to bring up the terminal window. Type ‘ls’ to show the files in the root folder: ‘crontab -e’ should be in there. Type: nano ‘crontab -e, then select 1 to open and make adjustments to the file such as setting a schedule. When finished type: ctrl + o then enter to save the file, then type ctrl + x to exit
Adjust the .xsession file
Press Ctrl + Alt + F3 to bring up the terminal window. Type nano .xsession to open the file. You should not need to edit any information in this file but it contains useful information relating to preferences and Chromium settings etc…
Here are some basic commands that I use during the setup.
Increasing boot show delay
By default, the browser window is hidden for a few seconds after boot, to give the page time to load. You can increase (or decrease) this delay in ~/.xsession.
Shutdown Command
sudo shutdown -h now
Access Crontab
crontab -e
