Difference between revisions of "Raspberry Pi Kiosk"

From MagnetoWiki
Jump to navigation Jump to search
m (typo)
Line 56: Line 56:
  
 
To exit kiosk mode, use alt-space bar or alt-F4.
 
To exit kiosk mode, use alt-space bar or alt-F4.
 +
 +
===Chromium update pop-up fix===
 +
 +
In February 2020 a bug in Chromium caused an update popup to appear.  The following commands will delay displaying the update popup for 1 year (from [https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=264399&sid=ff83b4376c348fb72379b97eab5be07b&start=25 Raspberrypi.org forum posting] by ShiftPlusOne.
 +
 +
sudo touch /etc/chromium-browser/customizations/01-disable-update-check;echo CHROMIUM_FLAGS=\"\$\{CHROMIUM_FLAGS\} --check-for-update-interval=31536000\" | sudo tee /etc/chromium-browser/customizations/01-disable-update-check
 +
 +
Note: use <code>sudo reboot</code> to restart the pi from the command line.
  
 
==Network Connectivity==
 
==Network Connectivity==

Revision as of 12:54, 15 February 2020

Raspberry Pi Setup

Modified procedure at Raspberry Pi Kiosk using Chromium.

Follow default setup of the RPi, including updates.

Install unclutter to hide the mouse when idle

 sudo apt-get install unclutter

You might need to install sed as well, but that was pre-installed on my RPi.

Enable auto-login at

 sudo raspi-config

Create a bash script at /home/pi/kiosk.sh. (Note that "chromium-browser" may have changed name to just "chromium")

 #!/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://www.bio.fsu.edu/grad/kiosk/unit1.html

Create a system daemon service file kiosk.service, and copy it to /lib/systemd/system/kiosk.service (don't forget to use sudo to do the copying).


   [Unit]
   Description=Chromium Kiosk
   Wants=graphical.target
   After=graphical.target
   
   [Service]
   Environment=DISPLAY=:0
   Environment=XAUTHORITY=/home/pi/.Xauthority
   Type=simple
   ExecStart=/bin/bash /home/pi/kiosk.sh
   Restart=on-abort
   User=pi
   Group=pi
   
   [Install]
   WantedBy=graphical.target

Enable and start the service, and reboot the Pi:

sudo systemctl enable kiosk.service
sudo systemctl start kiosk.service

To exit kiosk mode, use alt-space bar or alt-F4.

Chromium update pop-up fix

In February 2020 a bug in Chromium caused an update popup to appear. The following commands will delay displaying the update popup for 1 year (from Raspberrypi.org forum posting by ShiftPlusOne.

sudo touch /etc/chromium-browser/customizations/01-disable-update-check;echo CHROMIUM_FLAGS=\"\$\{CHROMIUM_FLAGS\} --check-for-update-interval=31536000\" | sudo tee /etc/chromium-browser/customizations/01-disable-update-check

Note: use sudo reboot to restart the pi from the command line.

Network Connectivity

Get the RPi ethernet MAC address with ifconfig eth0. If the RPi is on a DHCP setup, then you should see the assigned ip with ifconfig -a.

Remote Screensharing

For remote screensharing, follow procedure at Raspberry Pi Screen Sharing with TightVnc or Setting up VNC on Raspberry Pi for Mac access and Mac Screen and File Sharing.


Google Sheets

Kiosk Webpage