#! /usr/bin/env sh
# Boot SuperCollider's interpreter (SuperDirt host) HEADLESS.
#
# sclang is built against Qt6 and, by default, connects to the Wayland compositor
# as a GUI client. That coupling is a liability for a live set: on 2026-07-25 an
# overnight suspend made kwin_wayland crash on resume (SIGABRT), and because sclang
# was a Wayland client it lost its display connection and died — cascade-killing
# scsynth (and Ardour, an X client on :1) with it. The audio hardware was fine; the
# *display stack* took down the sound.
#
# QT_QPA_PLATFORM=offscreen makes sclang's Qt run without connecting to any display
# server, so a compositor crash/restart can no longer touch it. SuperDirt needs no
# GUI; the interpreter and post window still work normally in this terminal.
export QT_QPA_PLATFORM=offscreen
sclang
./link_jack.sh
