Difference between revisions of "Raspberry Pi Kiosk"

From MagnetoWiki
Jump to navigation Jump to search
(updates after installing another kiosk)
(notes on google setup)
Line 91: Line 91:
  
 
===Remote Screensharing===
 
===Remote Screensharing===
 +
 +
  
 
For remote screensharing, follow procedure at [https://pimylifeup.com/raspberry-pi-screen-sharing/ Raspberry Pi Screen Sharing with TightVnc] or [http://4dc5.com/2012/06/12/setting-up-vnc-on-raspberry-pi-for-mac-access/ Setting up VNC on Raspberry Pi for Mac access] and [https://learn.adafruit.com/adafruit-raspberry-pi-lesson-7-remote-control-with-vnc/mac-screen-and-file-sharing Mac Screen and File Sharing].
 
For remote screensharing, follow procedure at [https://pimylifeup.com/raspberry-pi-screen-sharing/ Raspberry Pi Screen Sharing with TightVnc] or [http://4dc5.com/2012/06/12/setting-up-vnc-on-raspberry-pi-for-mac-access/ Setting up VNC on Raspberry Pi for Mac access] and [https://learn.adafruit.com/adafruit-raspberry-pi-lesson-7-remote-control-with-vnc/mac-screen-and-file-sharing Mac Screen and File Sharing].
  
  
==Google Sheets==
+
==Google Docs==
 +
 
 +
 
 +
 
 +
1. Create a number of Google Presentations, with 1 slide per presentation. Only 1 slide per presentation, as the kiosk cycles through multiple '''presentations''', and '''NOT''' the slides within a presentation.
 +
 
 +
 
 +
 
 +
2. Set share permissions on the presentation so that anyone with the link can edit the presentation (or however you want to control editing). Keep this link secret if anyone can edit it.
 +
 
 +
 
 +
 
 +
3. Via "File" -> "Publish to the Web" -> "Publish" button, get the public key for displaying the presentation, which is in the middle of the presentation link, eg:
 +
 
 +
<nowiki>https://docs.google.com/presentation/d/e/</nowiki>'''2PACX-1vTKawnqr671l-BcVQP0_dwK2pQDFdtM5RQZwxsF6hLOGZBk4kRIjcTwF6mCP_sknF12ZzEuBlm6aX1i'''/pub?start=false&loop=false&delayms=3000
 +
 
 +
 
 +
 
 +
4. Set up a Google Sheet, with each row listing one of the Google Presentations, with columns for each of your kiosks.
 +
 
 +
* Column A: "Display" -- the name of each presentation (eg "Upcoming Event", "Public Service Announcement", "This Week's Seminar", etc.) You can link the name of the presenatation with it's shared editable link for convenience if desired, but not required.
 +
 
 +
* Column B: "URL" -- the public key of each presentation used in the "Publish to the Web" link (just the key, the kiosk page will fill in the rest of the url).
 +
 
 +
* Columns C-?: "<kiosk name>" -- The query key for each of your kiosks, eg. "Lobby", "Dept Office", etc. The cells in these columns indicate the number of seconds used to display each slide on that particular kiosk. Enter zero seconds to hide the slide from that particular kiosk.
 +
 
  
  
 
==Kiosk Webpage==
 
==Kiosk Webpage==
 +
 +
 +
Point the pi to the kiosk.html webpage, with its location as a query parameter, eg <code>https://www.bio.fsu.edu/grad/kiosk/kiosk.html?kiosk=King%20Atrium</code>

Revision as of 15:16, 17 February 2020

Raspberry Pi Setup

Modified procedure at Raspberry Pi Kiosk using Chromium.

1. Follow default setup of the RPi, including updates.


2. 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.


3. Enable auto-login at

 sudo raspi-config

Arrow down to "3 Boot Options" then "B1 Desktop / CLI" then "B4 Desktop Autologin". (I set "B2 Wait for Network at Boot" as well).


4. 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

To copy the service file:

sudo cp kiosk.service /lib/systemd/system/kiosk.service


Enable and start the service:

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


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


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


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 Docs

1. Create a number of Google Presentations, with 1 slide per presentation. Only 1 slide per presentation, as the kiosk cycles through multiple presentations, and NOT the slides within a presentation.


2. Set share permissions on the presentation so that anyone with the link can edit the presentation (or however you want to control editing). Keep this link secret if anyone can edit it.


3. Via "File" -> "Publish to the Web" -> "Publish" button, get the public key for displaying the presentation, which is in the middle of the presentation link, eg:

https://docs.google.com/presentation/d/e/2PACX-1vTKawnqr671l-BcVQP0_dwK2pQDFdtM5RQZwxsF6hLOGZBk4kRIjcTwF6mCP_sknF12ZzEuBlm6aX1i/pub?start=false&loop=false&delayms=3000


4. Set up a Google Sheet, with each row listing one of the Google Presentations, with columns for each of your kiosks.

  • Column A: "Display" -- the name of each presentation (eg "Upcoming Event", "Public Service Announcement", "This Week's Seminar", etc.) You can link the name of the presenatation with it's shared editable link for convenience if desired, but not required.
  • Column B: "URL" -- the public key of each presentation used in the "Publish to the Web" link (just the key, the kiosk page will fill in the rest of the url).
  • Columns C-?: "<kiosk name>" -- The query key for each of your kiosks, eg. "Lobby", "Dept Office", etc. The cells in these columns indicate the number of seconds used to display each slide on that particular kiosk. Enter zero seconds to hide the slide from that particular kiosk.


Kiosk Webpage

Point the pi to the kiosk.html webpage, with its location as a query parameter, eg https://www.bio.fsu.edu/grad/kiosk/kiosk.html?kiosk=King%20Atrium