#!/usr/bin/env bash
# Arcline OS — live session: start X on vt1 and launch the graphical installer.
# Runs as root in the live session; Xorg needs -allow-root for that.
set -euo pipefail

export DISPLAY=:0
# clear any stale lock from a previous session in the same live boot
rm -f /tmp/.X0-lock /tmp/.X11-unix/X0

exec xinit /usr/local/bin/arcline-installer -- \
  /usr/bin/Xorg -allow-root -nolisten tcp -keeptty :0 vt1
