Update display.sh

This commit is contained in:
Kroese 2024-02-02 16:25:20 +01:00 committed by GitHub
parent f0426bcc64
commit 554e503b3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,20 +4,21 @@ set -Eeuo pipefail
# Docker environment variables
: "${GPU:="N"}" # GPU passthrough
: "${VGA:="virtio-vga"}" # VGA adaptor
: "${DISPLAY:="web"}" # Display type
case "${DISPLAY,,}" in
vnc)
DISPLAY_OPTS="-display vnc=:0"
DISPLAY_OPTS="-display vnc=:0 -device $VGA"
;;
web)
DISPLAY_OPTS="-display vnc=:0,websocket=5700"
DISPLAY_OPTS="-display vnc=:0,websocket=5700 -device $VGA"
;;
none)
DISPLAY_OPTS="-display none"
;;
*)
DISPLAY_OPTS="-display $DISPLAY"
DISPLAY_OPTS="-display $DISPLAY -device $VGA"
;;
esac