Raspberry Pi: Kiosk Mode

Wednesday, 2 November 2016 - Written by admin

Configure Raspberry Pi in Kiosk Mode

— Install & configure autologin —

sudo apt-get install nodm -y

/etc/default/nodm

NODM_ENABLED=true
NODM_USER=pi

— Install matchbox—

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install matchbox
sudo reboot

— Intsall xinit —

sudo apt-get -y install xinit

— Install luakit (browser) —

sudo apt-get install luakit

— Configure luakit to fullscreen & no scroll —

/etc/xdg/luakit/window.lua

update_progress = function (w)
local p = w.view.progress
local loaded = w.sbar.l.loaded
if not w.view:loading() or p == 1 then
loaded:hide()
w.sbar.ebox:hide()
w.sbar.hidden = true
else
loaded:show()
loaded.text = string.format(“(%d%%)”, p * 100)
end
end,

— Configure —
/etc/rc.local

#start Kiosk Mode
/home/pi/start.sh

/home/pi/start.sh

#!/bin/bash
ifconfig | grep 192
if [ $? -eq 0 ]
then
xinit /home/pi/presentation.sh
else
echo “ERROR: No Network !!!”
fi

/home/pi/presentation.sh

#!/bin/sh

#no mouse
unclutter &

#start matchbox
matchbox-window-manager -use_titlebar no & :

#no save mode for screen
xset -dpms
xset s off

#start browser
while true; do
luakit http://192.168.5.165/jeedom
done