#!/usr/bin/env bash # Boot, then run focus_persistence.py. NO skip_intro -- the probe finds the title # itself by the plate pulse, which is the gate that works on a screen whose sweep # leaves never stop (harness-title-gate-assumes-a-static-title.md). set -u export HOME=/sylph-home/re SDL_AUDIODRIVER=dummy DISPLAY=:98 SD="$(cd "$(dirname "$0")" && pwd)" OUT="${OUT:-/sylph-home/re/focuspersist}"; mkdir -p "$OUT" LOG="$OUT/canary.stdout" bash "$SD/ensure_single_emulator.sh" if ! xdpyinfo -display "$DISPLAY" >/dev/null 2>&1; then rm -f "/tmp/.X${DISPLAY#:}-lock" 2>/dev/null || true nohup bash -c 'Xvfb "$0" -screen 0 1280x720x24 -ac -nolisten tcp \ +extension GLX +extension RANDR >/tmp/xvfb98.log 2>&1' "$DISPLAY" /dev/null 2>&1 & for _ in $(seq 1 50); do xdpyinfo -display "$DISPLAY" >/dev/null 2>&1 && break; done nohup env DISPLAY="$DISPLAY" HOME=/sylph-home openbox /tmp/openbox98.log 2>&1 & fi xdpyinfo -display "$DISPLAY" >/dev/null 2>&1 || { echo "DISPLAY UNAVAILABLE"; exit 1; } # The profile is NOT optional: naming a XUID with no profile opens a sign-in # dialog, and IsUIActive() then swallows every keystroke for the rest of the run. XUID="${SYLPH_XUID:-$(ls "${XENIA_CONTENT:-$HOME/.local/share/Xenia/content}" 2>/dev/null | head -1)}" [ -n "$XUID" ] || { echo "NO PROFILE"; exit 2; } echo "── EFFECTIVE CONFIG ──────────────────────────────" echo " out dir = $OUT" echo " profile = $XUID" echo " title gate= plate pulse (NOT skip_intro's stillness test)" echo " log = $LOG [RE-INPUT] delivery confirmation reads this" cd /sylph-home/re nohup run-canary --apu=sdl --log_mask=13 --log_level=2 \ --logged_profile_slot_0_xuid="$XUID" "$LOG" 2>&1 & python3 "$SD/focus_persistence.py" "$LOG" "$OUT" "${WAIT:-900}"