#!/bin/sh # If not running X, run sclang in a xvfb environment. # This ensures getting around a bug with QPixmaps that needs a X server to run: # https://github.com/supercollider/supercollider/issues/1736 # NOTE: For headless sclang to work properly changes to SCClassLibrary have to # be applied: https://github.com/supercollider/supercollider/issues/1209 set -euo pipefail IFS=$'\n\t' if [ -x /usr/bin/xset ] && [ ! /usr/bin/xset q &>/dev/null ];then xvfb-run -a /usr/bin/sclang "$@" else /usr/bin/sclang "$@" fi