Skip to content

Instantly share code, notes, and snippets.

@WietseWind
Last active February 19, 2020 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WietseWind/dbc27554d24e2f12fb7394d933b1a533 to your computer and use it in GitHub Desktop.
Save WietseWind/dbc27554d24e2f12fb7394d933b1a533 to your computer and use it in GitHub Desktop.
Raspbian NOOBS Lite in Kiosk Mode
  1. Install Raspbian NOOBS without additional software (Lite)
  2. Install the LCD driver (in my case: https://github.com/goodtft/LCD-show)
  3. sudo apt-get install chromium x11-xserver-utils unclutter
  4. Edit /etc/xdg/lxsession/LXDE-pi/autostart, add (change the URL):
@xscreensaver -no-splash
@xset s off
@xset -dpms
@xset s noblank
@sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' /home/pi/.config/chromium/Default/Preferences
@sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' /root/.config/chromium/Default/Preferences
@chromium-browser --noerrdialogs --kiosk https://xumm.app --incognito --check-for-update-interval=51840000
  1. sudo touch /boot/ssh (enable SSH on boot)
  2. If you want to refresh the Kiosk while developing, log in using SSH, install xdotool and:
DISPLAY=:0 xdotool key F5
  1. When coding your webpage, use this CSS to hide the cursor completely:
<style>
    * {
        cursor: none !important;
        user-select: none !important;
        user-drag: none !important;
    }
</style>
  1. If you want to add a button, make sure drag/touch/tap etc. all trigger the event:
<button
  onclick="doSomething()"
  ontouchstart="doSomething()"
  ondragstart="doSomething()"
  onmousedown="doSomething()"
  onfocus="doSomething()"
  onhover="doSomething()"
>
  ...
</button>
  1. Prevent WiFi Powersave standby, edit /etc/crontab and add:
@reboot root /sbin/iw wlan0 set power_save off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment