16 lines
458 B
Bash
16 lines
458 B
Bash
|
|
#!/bin/bash
|
||
|
|
# Wrap a Godot invocation in a fresh Xvfb 1280x720x24 display so the GL
|
||
|
|
# renderer has something to draw into. If DISPLAY is already set (real
|
||
|
|
# display / nested X server), skip xvfb-run and exec Godot directly.
|
||
|
|
set -euo pipefail
|
||
|
|
|
||
|
|
: "${GODOT_BIN:=/opt/godot/godot}"
|
||
|
|
|
||
|
|
if [[ -n "${DISPLAY:-}" ]]; then
|
||
|
|
exec "$GODOT_BIN" "$@"
|
||
|
|
fi
|
||
|
|
|
||
|
|
exec xvfb-run -a \
|
||
|
|
--server-args="-screen 0 1280x720x24 -ac +extension GLX +render -noreset" \
|
||
|
|
"$GODOT_BIN" "$@"
|