Skip to content

Commit

Permalink
fix: Display fallback (#636)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Dec 20, 2024
1 parent 61238eb commit cbb7e3a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 6 additions & 4 deletions src/display.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ set -Eeuo pipefail
: "${DISPLAY:="web"}" # Display type
: "${RENDERNODE:="/dev/dri/renderD128"}" # Render node

[[ "$DISPLAY" == ":0" ]] && DISPLAY="web"

case "${DISPLAY,,}" in
vnc)
"vnc" )
DISPLAY_OPTS="-display vnc=:0 -vga $VGA"
;;
web)
"web" )
DISPLAY_OPTS="-display vnc=:0,websocket=5700 -vga $VGA"
;;
disabled)
"disabled" )
DISPLAY_OPTS="-display none -vga $VGA"
;;
none)
"none" )
DISPLAY_OPTS="-display none -vga none"
;;
*)
Expand Down
3 changes: 1 addition & 2 deletions src/network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ configureUser() {
configureNAT() {

local tuntap="TUN device is missing. $ADD_ERR --device /dev/net/tun"
local tables="The 'ip_tables' kernel module is not loaded. Try this command: sudo modprobe ip_tables iptable_nat"

# Create the necessary file structure for /dev/net/tun
if [ ! -c /dev/net/tun ]; then
Expand All @@ -198,8 +199,6 @@ configureNAT() {
fi
fi

local tables="The 'ip_tables' kernel module is not loaded. Try this command: sudo modprobe ip_tables iptable_nat"

# Create a bridge with a static IP for the VM guest

{ ip link add dev dockerbridge type bridge ; rc=$?; } || :
Expand Down

0 comments on commit cbb7e3a

Please sign in to comment.