From c10eda304a89b50fda2c1aead879cf71fea26829 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 5 Sep 2026 20:21:25 +0200 Subject: [PATCH] Update display.sh --- src/display.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/display.sh b/src/display.sh index 3ef981ad..073f7820 100644 --- a/src/display.sh +++ b/src/display.sh @@ -6,6 +6,7 @@ set -Eeuo pipefail : "${VGA:=""}" # VGA adapter : "${GPU:=""}" # GPU acceleration : "${HELIOS:=""}" # Enable Helios +: "${VGPU:="auto"}" # vGPU level : "${DISPLAY:="web"}" # Display type : "${LOSSY:="N"}" # Lossy VNC compression : "${VNC_PORT:="5900"}" # VNC port @@ -14,6 +15,7 @@ set -Eeuo pipefail # Sanitize variables VGA=$(strip "$VGA") +VGPU=$(strip "$VGPU") LOSSY=$(strip "$LOSSY") DISPLAY=$(strip "$DISPLAY") VNC_PORT=$(strip "$VNC_PORT") @@ -32,9 +34,21 @@ if [ -z "$VGA" ]; then VGA="vmware" - if ! enabled "$GPU"; then + if enabled "$DEBUG"; then + VGA+=",debug=on" + fi - version_file="$(stateFile "ver")" + if enabled "$GPU"; then + + if [[ "${VGPU,,}" != "auto" ]]; then + VGA+=",vgpu=$VGPU" + fi + + else + + VGA+=",3d=off" + + version_file="$(st)" if [ -s "$version_file" ]; then