Seungmin Kim hace 1 año
padre
commit
ed0e7dd1a2
Se han modificado 1 ficheros con 7 adiciones y 7 borrados
  1. 7 7
      entrypoint.sh

+ 7 - 7
entrypoint.sh

@@ -131,13 +131,13 @@ sed -i '/Driver\s\+"nvidia"/a\    Option         "AllowExternalGpus" "True"' /et
 # Add custom generated modeline to the configuration
 sed -i '/Section\s\+"Monitor"/a\    '"$MODELINE" /etc/X11/xorg.conf
 # Prevent interference between GPUs, add this to the host or other containers running Xorg as well
-echo -e "Section \"ServerFlags\"\n    Option \"DontVTSwitch\" \"true\"\n    Option \"AllowMouseOpenFail\" \"true\"\n    Option \"AutoAddGPU\" \"false\"\nEndSection" | tee -a /etc/X11/xorg.conf > /dev/null
+echo -e "Section \"ServerFlags\"\n    Option         \"DontVTSwitch\" \"true\"\n    Option         \"AllowMouseOpenFail\" \"true\"\n    Option         \"AutoAddGPU\" \"false\"\nEndSection" | tee -a /etc/X11/xorg.conf > /dev/null
 
 # This symbolic link enables running Xorg inside a container with `-sharevts`
 ln -snf /dev/ptmx /dev/tty7 || sudo-root ln -snf /dev/ptmx /dev/tty7 || echo 'Failed to create /dev/tty7 device'
 
 # Run Xorg server with required extensions
-/usr/bin/Xorg vt7 -noreset -novtswitch -sharevts -dpi "${DISPLAY_DPI}" +extension "COMPOSITE" +extension "DAMAGE" +extension "GLX" +extension "RANDR" +extension "RENDER" +extension "MIT-SHM" +extension "XFIXES" +extension "XTEST" "${DISPLAY}" &
+/usr/bin/Xorg "${DISPLAY}" vt7 -noreset -novtswitch -sharevts -dpi "${DISPLAY_DPI}" +extension "COMPOSITE" +extension "DAMAGE" +extension "GLX" +extension "RANDR" +extension "RENDER" +extension "MIT-SHM" +extension "XFIXES" +extension "XTEST" &
 
 # Wait for X server to start
 echo 'Waiting for X Socket' && until [ -S "/tmp/.X11-unix/X${DISPLAY#*:}" ]; do sleep 0.5; done && echo 'X Server is ready'
@@ -149,17 +149,17 @@ if [ "$(echo ${KASMVNC_ENABLE} | tr '[:upper:]' '[:lower:]')" = "true" ]; then
   .command_line.prompt = false |
   .desktop.allow_resize = '$(echo ${SELKIES_ENABLE_RESIZE-false} | tr '[:upper:]' '[:lower:]')' |
   .logging.log_dest = "/tmp/kasmvnc.log" |
+  .network.interface = 0.0.0.0 |
   .network.ssl.require_ssl = '$(echo ${SELKIES_ENABLE_HTTPS-false} | tr '[:upper:]' '[:lower:]')' |
-  .encoding.max_frame_rate = '${DISPLAY_REFRESH}' |
-  .server.advanced.kasm_password_file = "'${XDG_RUNTIME_DIR}'/.kasmpasswd"
+  .encoding.max_frame_rate = '${DISPLAY_REFRESH}'
   ' /etc/kasmvnc/kasmvnc.yaml
   if [ -n "${SELKIES_HTTPS_CERT}" ]; then yq -i '.network.ssl.pem_certificate = "'${SELKIES_HTTPS_CERT-/etc/ssl/certs/ssl-cert-snakeoil.pem}'"' /etc/kasmvnc/kasmvnc.yaml; fi
   if [ -n "${SELKIES_HTTPS_KEY}" ]; then yq -i '.network.ssl.pem_certificate = "'${SELKIES_HTTPS_KEY-/etc/ssl/private/ssl-cert-snakeoil.key}'"' /etc/kasmvnc/kasmvnc.yaml; fi
   if [ "$(echo ${SELKIES_ENABLE_RESIZE} | tr '[:upper:]' '[:lower:]')" = "true" ]; then export KASM_RESIZE_FLAG="-r"; fi
-  (echo "${SELKIES_BASIC_AUTH_PASSWORD:-${PASSWD}}"; echo "${SELKIES_BASIC_AUTH_PASSWORD:-${PASSWD}}";) | kasmvncpasswd -u "${SELKIES_BASIC_AUTH_USER:-${USER}}" -o "${XDG_RUNTIME_DIR}/.kasmpasswd"
+  (echo "${SELKIES_BASIC_AUTH_PASSWORD:-${PASSWD}}"; echo "${SELKIES_BASIC_AUTH_PASSWORD:-${PASSWD}}";) | kasmvncpasswd -u "${SELKIES_BASIC_AUTH_USER:-${USER}}" -o
   if [ "$(echo ${SELKIES_ENABLE_BASIC_AUTH} | tr '[:upper:]' '[:lower:]')" = "false" ]; then export NO_KASM_AUTH_FLAG="-disableBasicAuth"; fi
-  if [ -n "$KASMVNC_VIEWPASS" ]; then (echo "${KASMVNC_VIEWPASS}"; echo "${KASMVNC_VIEWPASS}";) | kasmvncpasswd -u "view" "${XDG_RUNTIME_DIR}/.kasmpasswd"; fi
-  kasmvncserver "${KASM_DISPLAY}" -websocketPort 8080 -geometry "${DISPLAY_SIZEW}x${DISPLAY_SIZEH}" -depth "${DISPLAY_CDEPTH}" -FrameRate "${DISPLAY_REFRESH}" -fg -noxstartup -AlwaysShared ${NO_KASM_AUTH_FLAG}
+  if [ -n "$KASMVNC_VIEWPASS" ]; then (echo "${KASMVNC_VIEWPASS}"; echo "${KASMVNC_VIEWPASS}";) | kasmvncpasswd -u "view"; fi
+  kasmvncserver "${KASM_DISPLAY}" -interface 0.0.0.0 -websocketPort 8080 -geometry "${DISPLAY_SIZEW}x${DISPLAY_SIZEH}" -depth "${DISPLAY_CDEPTH}" -FrameRate "${DISPLAY_REFRESH}" -fg -noxstartup -AlwaysShared ${NO_KASM_AUTH_FLAG}
   until [ -S "/tmp/.X11-unix/X${KASM_DISPLAY#*:}" ]; do sleep 0.5; done;
   kasmxproxy -a "${DISPLAY}" -v "${KASM_DISPLAY}" -f "${DISPLAY_REFRESH}" ${KASM_RESIZE_FLAG} &
 fi