#!/bin/sh # Makes greetd the boot target so the machine comes up straight in the kiosk Sway # session. Identical logic to hosts/thin-client's 0200-greetd.hook.chroot. set -eu . /etc/touchpanel-agent/config.env chmod 0755 /usr/local/bin/kiosk-session if ! id greeter >/dev/null 2>&1; then useradd --system --create-home --home-dir /var/lib/greetd --shell /usr/sbin/nologin greeter fi systemctl enable greetd systemctl set-default graphical.target # live-config would otherwise autologin its own account on tty1 and fight greetd for # the VT. build-touch-panel-iso.sh passes `noautologin` on the kernel command line; # masking the getty on vt1 makes that robust even if someone edits the boot args. systemctl mask getty@tty1.service mkdir -p "/home/${KIOSK_USERNAME}/.config/sway" chown -R "${KIOSK_USERNAME}:${KIOSK_USERNAME}" "/home/${KIOSK_USERNAME}/.config"