Unverified Commit cbb7e3a0 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

fix: Display fallback (#636)

parent 61238eb1
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -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"
    ;;
  *)
+1 −2
Original line number Diff line number Diff line
@@ -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
@@ -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=$?; } || :