2019-05-05 20:43:58 +00:00
|
|
|
# HADashboard Kiosk Setup
|
|
|
|
|
|
|
|
## Inspiration / Further Reading
|
|
|
|
|
|
|
|
- [https://blockdev.io/raspberry-pi-2-and-3-chromium-in-kiosk-mode/](https://blockdev.io/raspberry-pi-2-and-3-chromium-in-kiosk-mode/)
|
|
|
|
- [https://github.com/elalemanyo/raspberry-pi-kiosk-screen](https://github.com/elalemanyo/raspberry-pi-kiosk-screen)
|
|
|
|
|
|
|
|
## Hardware
|
|
|
|
|
|
|
|
- [https://www.amazon.com/gp/product/B0749D617J](https://www.amazon.com/gp/product/B0749D617J)
|
|
|
|
|
|
|
|
## Setup
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
|
|
|
|
groupadd -r autologin
|
|
|
|
usermod -a -G autologin [user]
|
|
|
|
|
2019-05-07 02:17:42 +00:00
|
|
|
apt install unclutter chromium midori lxde lightdm xserver-xorg accountsservice xscreensaver
|
2019-05-05 20:43:58 +00:00
|
|
|
sed -i 's/#autologin-user=/autologin-user=[user]/g' /etc/lightdm/lightdm.conf
|
|
|
|
systemctl restart lightdm
|
|
|
|
|
|
|
|
cat >> /home/[user]/.config/lxsession/LXDE/autostart <<EOF
|
2019-05-07 02:17:42 +00:00
|
|
|
# Overall screen setup / screensaver stuff
|
|
|
|
@xscreensaver -no-splash
|
2019-05-05 20:43:58 +00:00
|
|
|
@xset s off
|
|
|
|
@xset -dpms
|
2019-05-07 02:17:42 +00:00
|
|
|
# Uncomment below to disable blanking screen
|
|
|
|
#@xset s noblank
|
|
|
|
|
|
|
|
# Midori (you probably want this over chromium -- comment below line if you really do want chromium)
|
|
|
|
@midori -e Fullscreen -a https://home-assistant.domain.tld
|
|
|
|
|
|
|
|
# Uncommend below 2 lines for chromium
|
|
|
|
#@sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium-browser Default/Preferences
|
2019-05-05 20:43:58 +00:00
|
|
|
#@chromium-browser --noerrdialogs --kiosk https://home-assistant.domain.tld --incognito --disable-translate
|
|
|
|
EOF
|
|
|
|
|
|
|
|
systemctl restart lightdm
|
|
|
|
|
|
|
|
```
|
2019-05-07 02:17:42 +00:00
|
|
|
|
|
|
|
## Slideshow of Photos as Screensaver
|
|
|
|
|
|
|
|
**Currently BROKEN, help welcome**
|
|
|
|
|
|
|
|
- [https://www.jwz.org/xscreensaver/faq.html#slideshow](https://www.jwz.org/xscreensaver/faq.html#slideshow)
|
|
|
|
- [https://wiki.archlinux.org/index.php/XScreenSaver](https://wiki.archlinux.org/index.php/XScreenSaver)
|
|
|
|
- [https://pimylifeup.com/raspberry-pi-photo-frame/](https://pimylifeup.com/raspberry-pi-photo-frame/)
|
|
|
|
- [https://unix.stackexchange.com/questions/371209/configuring-feh-key-mapping-problems](https://unix.stackexchange.com/questions/371209/configuring-feh-key-mapping-problems)
|
|
|
|
- [https://github.com/phillipberndt/pqiv](https://github.com/phillipberndt/pqiv)
|
|
|
|
- [https://www.nongnu.org/fbi-improved/#man_fim](https://www.nongnu.org/fbi-improved/#man_fim)
|
|
|
|
- [https://feh.finalrewind.org/](https://feh.finalrewind.org/)
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
|
|
|
|
mkdir -p /tank/photos
|
|
|
|
# copy files -> /tank/photos
|
|
|
|
|
|
|
|
apt install feh fim pqiv at-spi2-core
|
|
|
|
|
|
|
|
mkdir ~/.config/feh/
|
|
|
|
cat > ~/.config/feh/buttons <<EOF
|
|
|
|
# Left click: quit
|
|
|
|
# Middle click: toggle filenames
|
|
|
|
# Right click: toggle exif
|
|
|
|
quit
|
|
|
|
toggle_filenames
|
|
|
|
toggle_exif
|
|
|
|
pan
|
|
|
|
zoom
|
|
|
|
toggle_menu
|
|
|
|
quit 1
|
|
|
|
toggle_filenames 2
|
|
|
|
toggle_exif 3
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat > ~/.config/feh/keys <<EOF
|
|
|
|
quit
|
|
|
|
next_img
|
|
|
|
quit n, <Space>, <Right>, q
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat > ~/.pqivrc <<EOF
|
|
|
|
[keybindings]
|
|
|
|
<Mouse-1> { quit(); }
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat > ~/.xscreensaver<<EOF
|
|
|
|
timeout: 0:15:00
|
|
|
|
cycle: 0:05:00
|
|
|
|
lock: False
|
|
|
|
lockTimeout: 0:00:00
|
|
|
|
passwdTimeout: 0:00:30
|
|
|
|
splash: False
|
|
|
|
fade: False
|
|
|
|
unfade: False
|
|
|
|
dpmsEnabled: True
|
|
|
|
dpmsStandby: 0:45:00
|
|
|
|
dpmsSuspend: 1:00:00
|
|
|
|
dpmsOff: 1:30:00
|
|
|
|
|
|
|
|
mode: one
|
|
|
|
selected: 0
|
|
|
|
|
|
|
|
programs: \\
|
|
|
|
/usr/bin/pqiv \\
|
|
|
|
--slideshow-interval 5 \\
|
|
|
|
--fullscreen \\
|
|
|
|
--hide-info-box \\
|
|
|
|
--lazy-load \\
|
|
|
|
--slideshow \\
|
|
|
|
--low-memory \\
|
|
|
|
--shuffle \\
|
|
|
|
--watch-directories \\
|
|
|
|
/tank/photos \\n\\
|
|
|
|
EOF
|
|
|
|
|
|
|
|
```
|