Setting up a kiosk on raspberry pi

Auto login using user pi:

If you have not changed the configuration of raspbian, by default raspberry pi logs into the GUI with user pi. So you dont have to do anything here.

Setup auto start:

Once the GUI loads, you need the pi to auto run a shell script that will load up chrome in kiosk mode.

mkdir /home/pi/.config/autostart
nano /home/pi/.config/autostart/kiosk.desktop
[Desktop Entry]
Type=Application
Name=Kiosk
Exec=/home/pi/kiosk.sh
X-GNOME-Autostart-enabled=true

Setup kiosk.sh

Now create kiosk.sh file.

nano /home/pi/kiosk.sh
#!/bin/bash
# Run this script in display 0 - the monitor
export DISPLAY=:0
# Hide the mouse from the display
unclutter &
# If Chrome crashes (usually due to rebooting), clear the crash flag so we don't have the annoying warning bar
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/.config/chromium/Default/Preferences
# Run Chromium and open tabs
chromium-browser --kiosk https://grafana.highlyreco.com/dashboard1
sleep 10s
chromium-browser https://grafana.highlyreco.com/dashboard2

Make kiosk.sh executable

Make the script executable by running chmod +x /home/pi/kiosk.sh

Install revolver chrome plugin

To revolve the tabs in chrome, install the revolver chrome-extension. Configure the extension to revolve every 15 secs(or any other value). Start the revolver. Restart raspberry pi and your kiosk should be working now.

Making changes without restarting pi

if you make changes incremental changes in kiosk.sh , you might find it irritating to keep restarting rapsberry pi. You can run the following script to

sudo killall kiosk.sh && sudo service lightdm restart

Disable screen saver:

You can do this a number of ways. This seems to be the simplest:

sudo apt-get install xscreensaver
xscreensaver

Connecting to office wifi

network={
ssid=""
priority=1
proto=RSN
key_mgmt=WPA-EAP
pairwise=CCMP
auth_alg=OPEN
eap=PEAP
identity=
password=hash:
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
}
echo -n 'password_in_plaintext' | iconv -t utf16le | openssl md4 > hash.txt
sudo service networking restart

Ref:

--

--

Building a tool for maximizing self learning on the internet — https://www.highlyreco.com

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alex J V

Alex J V

Building a tool for maximizing self learning on the internet — https://www.highlyreco.com