Set Up a Raspberry Pi in Kiosk Mode
Raspberry Pi’s make super useful TV kiosks. Where I work, we prefer not to connect Smart-TVs to the network, instead we prefer managed Raspberry Pis. Typically, the staff just need the TV to display a single website. This article will walk through setting up a current version of Raspbian to run Chromium in Kiosk mode (current at the time of this writing).
Raspbian must be installed on the RPI.
The RPI must be configured to automatically connect to wifi or connect via ethernet.
The RPI should be set to autologin to the pi user.
Run this command to install unclutter:
sudo apt-get update; sudo apt-get install unclutter
Unclutter is a program that will prevent the cursor from displaying when it is idle.
Setting Up the Script:
Run this command to download the script:
Make the script executable:
chmod +x kiosk.sh
Open the script and edit the
Change this line of code:
WEBSITE='google.com' to equal whatever website you would like Chromium to display when it boots.
Configure LXDE to Run the Script on Login:
LXDE is the desktop environment for Raspbian at the time of this writing. In order to configure it to run a script on login we need to edit the LXDE autostart file for the pi user:
nano /home/pi/.config/lxsession/LXDE-pi/autostart. Assuming the kiosk.sh script is in
/home/pi/kiosk.sh, this is the line you would add to the end of that autostart file:
Now, if the pi user is set to autologin, Chromium will open fullscreen in kiosk mode and will display whatever website was configured in kiosk.sh.
Disable Sleep Mode:
Edit this file:
sudo nano /boot/config.txt
Add this line to the end of the file:
Edit the LXDE autostart file once again:
Add these lines to the end of the file:
@xset s 0 0 @xset s noblank @xset s noexpose @xset dpms 0 0 0
Reboot your machine:
Assuming all was configured correctly the Pi will display the website of your choice using Chromium’s kiosk mode and will not sleep.