#!/bin/sh
# Starts the kiosk X server on vt7 for user "kiosk" (via Xorg.wrap).
# A fresh MIT cookie per start; Chromium reads it via XAUTHORITY.
set -eu
AUTH="${RUNTIME_DIRECTORY:-/run/daynivo-kiosk-x}/Xauthority"
umask 077
: > "$AUTH"
xauth -q -f "$AUTH" add :0 . "$(mcookie)"
exec /usr/bin/Xorg :0 vt7 -keeptty -novtswitch -nolisten tcp -nocursor -s 0 -dpms -auth "$AUTH"
