mirror of
https://github.com/helfrichmichael/prusaslicer-novnc.git
synced 2024-08-30 18:32:27 +00:00
fix: convert all environment variables to supervosord
Signed-off-by: vajonam <152501+vajonam@users.noreply.github.com>
This commit is contained in:
20
entrypoint.sh
Executable file
20
entrypoint.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash -x
|
||||
set -e
|
||||
rm -f /tmp/.X*-lock
|
||||
rm -f /tmp/.X11-unix/X*
|
||||
DISPLAY=${DISPLAY:-:10}
|
||||
DISPLAY_NUMBER=$(echo $DISPLAY | cut -d: -f2)
|
||||
export NOVNC_PORT=${NOVNC_PORT:-8080}
|
||||
VNC_RESOLUTION=${VNC_RESOLUTION:-1280x800}
|
||||
if [ -n "$VNC_PASSWORD" ]; then
|
||||
mkdir -p /root/.vnc
|
||||
echo "$VNC_PASSWORD" | vncpasswd -f > /root/.vnc/passwd
|
||||
chmod 0600 /root/.vnc/passwd
|
||||
fi
|
||||
# vncserver "$DISPLAY" -securitytypes TLSNone,X509None,None -depth 24 -geometry "$VNC_RESOLUTION"
|
||||
# websockify -D --web=/usr/share/novnc/ "$NOVNC_PORT" localhost:$((5900 + DISPLAY_NUMBER))
|
||||
# echo "NoVNC server started on port $NOVNC_PORT"
|
||||
# EXEC=$@
|
||||
# exec "$@"
|
||||
export VGLRUN=vglrun
|
||||
chown -R slic3r:slic3r /home/slic3r/ /configs/ /prints/ /dev/stdout && exec gosu slic3r supervisord # -e TRACE
|
@ -4,19 +4,19 @@ pidfile=/tmp/supervisord.pid
|
||||
|
||||
[program:vnc]
|
||||
priority=0
|
||||
command=/opt/TurboVNC/bin/vncserver :1 -fg -securitytypes TLSNone,X509None,None -depth 24 -geometry 1920x1080
|
||||
command=/opt/TurboVNC/bin/vncserver %(ENV_DISPLAY)s -fg -securitytypes TLSNone,X509None,None -depth 24 -geometry %(ENV_VNC_RESOLUTION)s
|
||||
autorestart=true
|
||||
redirect_stderr=true
|
||||
|
||||
[program:novnc]
|
||||
priority=0
|
||||
command=websockify --web=/usr/share/novnc/ 8080 localhost:5901
|
||||
command=websockify --web=/usr/share/novnc/ %(ENV_NOVNC_PORT)s localhost:5901
|
||||
autorestart=true
|
||||
redirect_stderr=true
|
||||
|
||||
[program:prusaslicer]
|
||||
priority=1
|
||||
environment=DISPLAY=:1
|
||||
command=/bin/bash -c 'vglrun /slic3r/slic3r-dist/prusa-slicer --datadir /configs/.config/PrusaSlicer/'
|
||||
command=/bin/bash -c '%(ENV_VGLRUN)s /slic3r/slic3r-dist/prusa-slicer --datadir /configs/.config/PrusaSlicer/'
|
||||
autorestart=true
|
||||
redirect_stderr=true
|
||||
|
Reference in New Issue
Block a user