This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| raspberry_pi_kiosk [2020/01/23 20:24] – herwarth | raspberry_pi_kiosk [2020/05/16 18:44] (current) – herwarth | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| + | ===== Introduction | ||
| This howto describes how to install a Chromium based kiosk using minimal installation. Everything is done as the root user in this howto. | This howto describes how to install a Chromium based kiosk using minimal installation. Everything is done as the root user in this howto. | ||
| - | ====== Installation | + | ===== Installation ===== |
| - | ===== Raspbian Buster Lite ===== | + | ==== Raspbian Buster Lite ==== |
| - | Download Raspbian | + | Download Raspbian |
| Use Etcher or whatever to install the downloaded zip on a SD card. | Use Etcher or whatever to install the downloaded zip on a SD card. | ||
| - | ===== Initial settings to enable remote configuration | + | ==== Initial settings to enable remote configuration ==== |
| Use raspi-config to set network and change password of the pi user and change the hostname: | Use raspi-config to set network and change password of the pi user and change the hostname: | ||
| < | < | ||
| Line 15: | Line 16: | ||
| systemctl start ssh.service | systemctl start ssh.service | ||
| </ | </ | ||
| - | ===== Making the system a read-only system | + | <code - / |
| + | [Time] | ||
| + | NTP=172.16.0.254 | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | </ | ||
| + | ==== Making the system a read-only system ==== | ||
| The goal is to make a Kiosk so we can disconnect the power and do no harm to the filesystem. We also want to limit SDCard wear. | The goal is to make a Kiosk so we can disconnect the power and do no harm to the filesystem. We also want to limit SDCard wear. | ||
| < | < | ||
| Line 32: | Line 41: | ||
| Edit fstab so it looks something like this. Your PARTUUIDs are different! | Edit fstab so it looks something like this. Your PARTUUIDs are different! | ||
| <code - / | <code - / | ||
| - | proc /proc | + | proc /proc proc defaults |
| - | PARTUUID=6c586e13-01 | + | PARTUUID=6c586e13-01 |
| - | PARTUUID=6c586e13-02 | + | PARTUUID=6c586e13-02 |
| - | tmpfs / | + | tmpfs / |
| - | tmpfs / | + | tmpfs / |
| - | tmpfs / | + | tmpfs / |
| - | tmpfs / | + | tmpfs / |
| - | tmpfs / | + | tmpfs / |
| - | tmpfs / | + | tmpfs / |
| + | tmpfs / | ||
| + | tmpfs / | ||
| </ | </ | ||
| < | < | ||
| Line 66: | Line 77: | ||
| TimeoutSec=30s | TimeoutSec=30s | ||
| </ | </ | ||
| - | Because /var/spool is also a tmpfs filesystem, we need to disable that directory to become mask 0755. Comment | + | Because /var/spool is also a tmpfs filesystem, we need to disable that directory to become mask 0755. Copy the following file |
| - | <code - /usr/lib/ | + | < |
| + | cp / | ||
| + | </ | ||
| + | comment | ||
| + | <code - /etc/ | ||
| . | . | ||
| . | . | ||
| Line 73: | Line 88: | ||
| #d /var/spool 0755 - - - | #d /var/spool 0755 - - - | ||
| </ | </ | ||
| - | ===== Disable ugly boot splash and rotate screen | + | ==== Disable ugly boot splash and rotate screen ==== |
| - | I need to rotate the screen, because I use the monitor in portrait mode. 0=normal, 1=90 degrees CW, 2=180 degrees CW, 3=90 degrees CCW, and 4=upside down | + | I need to rotate the screen, because I use the monitor in portrait mode. 0=normal, 1=90 degrees CW, 2=180 degrees CW, 3=90 degrees CCW, and 4=upside down. Add the following to the end of the file: |
| <code - / | <code - / | ||
| + | . | ||
| + | . | ||
| + | . | ||
| display_rotate=3 | display_rotate=3 | ||
| disable_splash=1 | disable_splash=1 | ||
| </ | </ | ||
| - | ===== R/O and R/W aliases to make writable filesystem easy ===== | + | ==== R/O and R/W aliases to make writable filesystem easy ==== |
| Bash aliases to remount filesystem RO and RW are very convenient. Add the following at the end of the following file: | Bash aliases to remount filesystem RO and RW are very convenient. Add the following at the end of the following file: | ||
| <code - / | <code - / | ||
| Line 89: | Line 107: | ||
| PS1=' | PS1=' | ||
| } | } | ||
| + | alias temp='/ | ||
| alias ro=' | alias ro=' | ||
| alias rw=' | alias rw=' | ||
| Line 101: | Line 120: | ||
| / | / | ||
| </ | </ | ||
| - | ====== Graphical User Interface | + | ===== Graphical User Interface ===== |
| Because we have a R/O filesystem now, we need to make it R/W when doing stuff. | Because we have a R/O filesystem now, we need to make it R/W when doing stuff. | ||
| < | < | ||
| rw | rw | ||
| </ | </ | ||
| - | ===== Install Xserver | + | ==== Install Xserver ==== |
| < | < | ||
| apt-get -y install --no-install-recommends xserver-xorg xinit xterm x11-xserver-utils | apt-get -y install --no-install-recommends xserver-xorg xinit xterm x11-xserver-utils | ||
| - | apt-get -y install --no-install-recommends | + | apt-get -y install --no-install-recommends |
| </ | </ | ||
| The pi user needs to be added to the tty group: | The pi user needs to be added to the tty group: | ||
| Line 115: | Line 134: | ||
| usermod -a -G tty pi | usermod -a -G tty pi | ||
| </ | </ | ||
| - | ===== Chromium browser | + | ==== Chromium browser ==== |
| Chromium supports kiosk mode, which is great for our purpose | Chromium supports kiosk mode, which is great for our purpose | ||
| < | < | ||
| apt-get -y install --no-install-recommends chromium-browser | apt-get -y install --no-install-recommends chromium-browser | ||
| </ | </ | ||
| - | ===== Autostart | + | ==== Autostart ==== |
| Edit the autostart script to start the browser once logged in: | Edit the autostart script to start the browser once logged in: | ||
| <code - / | <code - / | ||
| Line 133: | Line 152: | ||
| raspi-config | raspi-config | ||
| </ | </ | ||
| + | Reboot! Your Pi should now start in Chromium Kiosk mode! | ||
| + | {{tag> | ||