diff options
author | David Runge <dave@sleepmap.de> | 2016-05-13 23:24:08 +0200 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2016-05-13 23:24:08 +0200 |
commit | c6befb9cd1026eaeb1000701cb62573239e2f2be (patch) | |
tree | e2ca4ffaf698ef82e4f48cf5f0382bb26b88d366 | |
parent | da7477e35327817f4e75bf3ac6212261747c6233 (diff) | |
download | dotfiles-c6befb9cd1026eaeb1000701cb62573239e2f2be.tar.gz dotfiles-c6befb9cd1026eaeb1000701cb62573239e2f2be.tar.bz2 dotfiles-c6befb9cd1026eaeb1000701cb62573239e2f2be.tar.xz dotfiles-c6befb9cd1026eaeb1000701cb62573239e2f2be.zip |
bin/sclang: Updating check for sclang run by xvfb-run. Now involving xset as dependency.
-rwxr-xr-x | bin/sclang | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -1,10 +1,15 @@ #!/bin/sh -# If not running my laptop (with X screen), run sclang in a xvfb environment. -# This ensures getting around a bug with QPixmaps that needs a X server to run. -if [[ $HOSTNAME == *pitheunlord* ]]; then - echo "/usr/bin/sclang in fake X screen" - /usr/bin/xvfb-run -s "-screen 1, 1280x800x24" -a -e ~/.log/xvfb-run-sclang.error /usr/bin/sclang "$@" +# 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 - echo "/usr/bin/sclang" /usr/bin/sclang "$@" fi |