Skip to content

Commit

Permalink
Fix KasmVNC
Browse files Browse the repository at this point in the history
  • Loading branch information
ehfd authored Jun 24, 2024
1 parent 348f48a commit 5372f5e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kasmvnc-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ if [ "$(echo ${SELKIES_ENABLE_RESIZE} | tr '[:upper:]' '[:lower:]')" = "true" ];
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"; fi

# 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'

# Run KasmVNC
kasmvncserver "${KASM_DISPLAY}" -geometry "${DISPLAY_SIZEW}x${DISPLAY_SIZEH}" -depth "${DISPLAY_CDEPTH}" -noxstartup -FrameRate "${DISPLAY_REFRESH}" -websocketPort 8081 -AlwaysShared -BlacklistTimeout 0 ${NO_KASM_AUTH_FLAG}

Expand Down
8 changes: 8 additions & 0 deletions supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ chmod=0700

[supervisord]
logfile=/tmp/supervisord.log
logfile_maxbytes=5MB
logfile_backups=0
loglevel=info
pidfile=/tmp/supervisord.pid
Expand All @@ -27,6 +28,7 @@ files = /etc/supervisor/conf.d/*.conf
[program:entrypoint]
command=bash -c "dbus-run-session -- /etc/entrypoint.sh"
stdout_logfile=/tmp/entrypoint.log
stdout_logfile_maxbytes=5MB
stdout_logfile_backups=0
redirect_stderr=true
stopasgroup=true
Expand All @@ -38,6 +40,7 @@ priority=1
[program:selkies-gstreamer]
command=bash -c "if [ $(echo %(ENV_KASMVNC_ENABLE)s | tr '[:upper:]' '[:lower:]') != true ]; then /etc/selkies-gstreamer-entrypoint.sh; else sleep infinity; fi"
stdout_logfile=/tmp/selkies-gstreamer-entrypoint.log
stdout_logfile_maxbytes=5MB
stdout_logfile_backups=0
redirect_stderr=true
stopasgroup=true
Expand All @@ -49,6 +52,7 @@ priority=20
[program:kasmvnc]
command=bash -c "if [ $(echo %(ENV_KASMVNC_ENABLE)s | tr '[:upper:]' '[:lower:]') = true ]; then /etc/kasmvnc-entrypoint.sh; else sleep infinity; fi"
stdout_logfile=/tmp/kasmvnc-entrypoint.log
stdout_logfile_maxbytes=5MB
stdout_logfile_backups=0
redirect_stderr=true
stopasgroup=true
Expand All @@ -60,6 +64,7 @@ priority=20
[program:nginx]
command=bash -c "until head -n 1 /etc/nginx/sites-available/default | grep -q 'Selkies'; do sleep 0.5; done; /usr/sbin/nginx -g \"daemon off;\""
stdout_logfile=/tmp/nginx.log
stdout_logfile_maxbytes=5MB
stdout_logfile_backups=0
redirect_stderr=true
stopasgroup=true
Expand All @@ -76,6 +81,7 @@ priority=10
command=bash -c "until [ -S \"/tmp/.X11-unix/X${DISPLAY#*:}\" ]; do sleep 0.5; done; /usr/bin/pipewire"
environment=PIPEWIRE_LATENCY="32/48000",DISPLAY=":0",DISABLE_RTKIT="y",XDG_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",PIPEWIRE_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",PULSE_RUNTIME_PATH="%(ENV_XDG_RUNTIME_DIR)s/pulse"
stdout_logfile=/tmp/pipewire.log
stdout_logfile_maxbytes=5MB
stdout_logfile_backups=0
redirect_stderr=true
stopasgroup=true
Expand All @@ -87,6 +93,7 @@ autorestart=true
command=bash -c "until [ \"$(echo ${XDG_RUNTIME_DIR}/pipewire-*.lock)\" != \"${XDG_RUNTIME_DIR}/pipewire-*.lock\" ]; do sleep 0.5; done; /usr/bin/wireplumber"
environment=PIPEWIRE_LATENCY="32/48000",DISPLAY=":0",DISABLE_RTKIT="y",XDG_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",PIPEWIRE_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",PULSE_RUNTIME_PATH="%(ENV_XDG_RUNTIME_DIR)s/pulse"
stdout_logfile=/tmp/wireplumber.log
stdout_logfile_maxbytes=5MB
stdout_logfile_backups=0
redirect_stderr=true
stopasgroup=true
Expand All @@ -98,6 +105,7 @@ autorestart=true
command=bash -c "until [ \"$(echo ${XDG_RUNTIME_DIR}/pipewire-*.lock)\" != \"${XDG_RUNTIME_DIR}/pipewire-*.lock\" ]; do sleep 0.5; done; /usr/bin/pipewire-pulse"
environment=PIPEWIRE_LATENCY="32/48000",DISPLAY=":0",DISABLE_RTKIT="y",XDG_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",PIPEWIRE_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s",PULSE_RUNTIME_PATH="%(ENV_XDG_RUNTIME_DIR)s/pulse"
stdout_logfile=/tmp/pipewire-pulse.log
stdout_logfile_maxbytes=5MB
stdout_logfile_backups=0
redirect_stderr=true
stopasgroup=true
Expand Down

0 comments on commit 5372f5e

Please sign in to comment.