Raspbian and Chromium in kiosk mode

Raspbian and Chromium in kiosk mode

Publikováno: 1.2.2019

1. Type:

sudo apt-get purge wolfram-engine scratch scratch2 nuscratch sonic-pi idle3 -y
sudo apt-get purge smartsim java-common minecraft-pi libreoffice* -y

2. To remove any unnecessary packages and cleanup, type:

sudo apt-get clean
sudo apt-get autoremove -y

3. Update system:

sudo apt-get update
sudo apt-get upgrade

4. Install xdotool which allows bash script to execute key presses programaticaly. Next, install the unclutter package. Package enables mouse pointer hiding from the display.

sudo apt-get install xdotool unclutter sed

5. Enable auto login:

sudo raspi-config
Boot options -> Desktop / CLI -> Desktop autologin

6. Create init script:

nano /home/pi/kiosk.sh
#!/bin/bash
xset s noblank
xset s off
xset -dpms
unclutter -idle 0.5 -root &
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
/usr/bin/chromium-browser --noerrdialogs --disable-infobars --kiosk https://my.url &

If Chromium ever crashes or is closed suddenly, the lines above will ensure you don’t have to get hold of a mouse and keyboard to clear the warning bar that would typically appear at the top of the browser.

Adjust the idle timer to the number of seconds. Remove the -idle 0.5 to instant hide.

7. Modify the lxsession autostart script:

nano /home/pi/.config/lxsession/LXDE-pi/autostart

8. Type script contents:

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash
@point-rpi
@bash /home/pi/kiosk.sh

9. Reboot:

sudo reboot

Completed.

 

Update Raspberry OS & Raspberry Pi 4

Lite setup

https://desertbot.io/blog/headless-raspberry-pi-4-ssh-wifi-setup

Kiosk

https://desertbot.io/blog/raspberry-pi-4-touchscreen-kiosk-setup

 

 

 

 

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace