Update display.sh

This commit is contained in:
Kroese
2026-09-05 20:21:25 +02:00
committed by GitHub
parent 13667bc9a3
commit c10eda304a
+16 -2
View File
@@ -6,6 +6,7 @@ set -Eeuo pipefail
: "${VGA:=""}" # VGA adapter : "${VGA:=""}" # VGA adapter
: "${GPU:=""}" # GPU acceleration : "${GPU:=""}" # GPU acceleration
: "${HELIOS:=""}" # Enable Helios : "${HELIOS:=""}" # Enable Helios
: "${VGPU:="auto"}" # vGPU level
: "${DISPLAY:="web"}" # Display type : "${DISPLAY:="web"}" # Display type
: "${LOSSY:="N"}" # Lossy VNC compression : "${LOSSY:="N"}" # Lossy VNC compression
: "${VNC_PORT:="5900"}" # VNC port : "${VNC_PORT:="5900"}" # VNC port
@@ -14,6 +15,7 @@ set -Eeuo pipefail
# Sanitize variables # Sanitize variables
VGA=$(strip "$VGA") VGA=$(strip "$VGA")
VGPU=$(strip "$VGPU")
LOSSY=$(strip "$LOSSY") LOSSY=$(strip "$LOSSY")
DISPLAY=$(strip "$DISPLAY") DISPLAY=$(strip "$DISPLAY")
VNC_PORT=$(strip "$VNC_PORT") VNC_PORT=$(strip "$VNC_PORT")
@@ -32,9 +34,21 @@ if [ -z "$VGA" ]; then
VGA="vmware" 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 if [ -s "$version_file" ]; then