From 7855b30b9e9739acadb8fa2cdf96ddef8bbb559c Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Fri, 29 Sep 2023 05:06:57 -0300 Subject: [PATCH] Fix entrypoints command name --- .gitattributes | 7 +--- scripts/start_server | 67 +++++++++++++++++++++++++++++++- stacks/analog-heavy.Dockerfile | 4 +- stacks/analog-xk.Dockerfile | 4 +- stacks/analog-xm.Dockerfile | 4 +- stacks/digital-ator.Dockerfile | 4 +- stacks/digital-heavy.Dockerfile | 4 +- stacks/digital-icarus.Dockerfile | 4 +- stacks/heavy.Dockerfile | 4 +- 9 files changed, 82 insertions(+), 20 deletions(-) diff --git a/.gitattributes b/.gitattributes index c139350..3a838b4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,8 +4,5 @@ *.png filter=lfs diff=lfs merge=lfs -text *.sh text eol=lf *.bat text eol=crlf -desktopinit text eol=lf -klayout text eol=lf -setwallpaper text eol=lf -startserver text eol=lf -*.desktop text eol=lf \ No newline at end of file +*.desktop text eol=lf +scripts/* text eol=lf \ No newline at end of file diff --git a/scripts/start_server b/scripts/start_server index 5e44b33..22b4a97 100644 --- a/scripts/start_server +++ b/scripts/start_server @@ -2,7 +2,72 @@ cd /home/designer # Run VNC server -eval $(vncserver -dry-run) & +/usr/sbin/Xvnc $DISPLAY \ + -httpd '/usr/share/kasmvnc/www' \ + -DLP_RegionAllowClick '0' \ + -QueryConnect '0' \ + -VideoScaling '2' \ + -DLP_ClipDelay '0' \ + -DLP_Log 'off' \ + -KasmPasswordFile '/home/designer/.kasmpasswd' \ + -MaxVideoResolution '1920x1080' \ + -ImprovedHextile '1' \ + -QueryConnectTimeout '10' \ + -Log '*:stdout:100' \ + -DynamicQualityMin '7' \ + -RectThreads '0' \ + -WebpVideoQuality '-1' \ + -DLP_ClipTypes 'chromium/x-web-custom-data,text/html,image/png' \ + -udpFullFrameFrequency '0' \ + -UseIPv6 '1' \ + -DLP_RegionAllowRelease '0' \ + -AcceptCutText '1' \ + -DLP_ClipAcceptMax '0' \ + -http-header 'Cross-Origin-Embedder-Policy=require-corp' \ + -http-header 'Cross-Origin-Opener-Policy=same-origin' \ + -MaxConnectionTime '0' \ + -fp '/usr/share/fonts/75dpi,/usr/share/fonts/100dpi' \ + -TreatLossless '10' \ + -interface '0.0.0.0' \ + -SendPrimary '0' \ + -RawKeyboard '0' \ + -DynamicQualityMax '8' \ + -MaxDisconnectionTime '0' \ + -BlacklistTimeout '10' \ + -DisconnectClients '0' \ + -DLP_ClipSendMax '0' \ + -AcceptKeyEvents '1' \ + -IgnoreClientSettingsKasm '0' \ + -AcceptPointerEvents '1' \ + -websocketPort '8445' \ + -BlacklistThreshold '5' \ + -depth '24' \ + -MaxIdleTime '0' \ + -cert '/etc/ssl/certs/ssl-cert-snakeoil.pem' \ + -DLP_KeyRateLimit '0' \ + -VideoTime '5' \ + -auth '/home/designer/.Xauthority' \ + -SendCutText '1' \ + -VideoOutTime '3' \ + -UseIPv4 '1' \ + -sslOnly '0' \ + -VideoArea '45' \ + -desktop "$(hostname):$DISPLAY (designer)" \ + -CompareFB '2' \ + -PrintVideoArea '0' \ + -FrameRate '60' \ + -AcceptSetDesktopSize '1' \ + -AvoidShiftNumLock '0' \ + -key '/etc/ssl/private/ssl-cert-snakeoil.key' \ + -JpegVideoQuality '-1' \ + -geometry '1024x768' \ + -IdleTimeout '0' \ + -AllowOverride 'AcceptPointerEvents,SendCutText,AcceptCutText,SendPrimary' \ + -rfbauth '/home/designer/.vnc/passwd' \ + -rfbwait '30000' \ + -rfbport '5901' \ + >> "/home/designer/.vnc/$(hostname):$DISPLAY.log" 2>&1 + echo -e "${LOGIN_PASSWORD}\n${LOGIN_PASSWORD}\n" | vncpasswd -u ${LOGIN_USER} -w -r # Wait for VNC server to start diff --git a/stacks/analog-heavy.Dockerfile b/stacks/analog-heavy.Dockerfile index 268c5de..31baa48 100644 --- a/stacks/analog-heavy.Dockerfile +++ b/stacks/analog-heavy.Dockerfile @@ -21,10 +21,10 @@ RUN sudo pacman -Scc FROM analog-heavy as analog-heavy-desktop # Initialize the environment keeping container alive -CMD ["sleep", "infinity"] +ENTRYPOINT ["start_desktop"] # - Web build FROM analog-heavy as analog-heavy-web # Run VNC server & desktop environment -CMD ["startserver"] +ENTRYPOINT ["start_server"] diff --git a/stacks/analog-xk.Dockerfile b/stacks/analog-xk.Dockerfile index 0c60322..da3ec95 100644 --- a/stacks/analog-xk.Dockerfile +++ b/stacks/analog-xk.Dockerfile @@ -22,10 +22,10 @@ RUN sudo pacman -Scc FROM analog-xk as analog-xk-desktop # Initialize the environment keeping container alive -CMD ["sleep", "infinity"] +ENTRYPOINT ["start_desktop"] # - Web build FROM analog-xk as analog-xk-web # Run VNC server & desktop environment -CMD ["startserver"] +ENTRYPOINT ["start_server"] diff --git a/stacks/analog-xm.Dockerfile b/stacks/analog-xm.Dockerfile index e636291..86ce0f6 100644 --- a/stacks/analog-xm.Dockerfile +++ b/stacks/analog-xm.Dockerfile @@ -20,10 +20,10 @@ RUN sudo pacman -Scc FROM analog-xm as analog-xm-desktop # Initialize the environment keeping container alive -CMD ["sleep", "infinity"] +ENTRYPOINT ["start_desktop"] # - Web build FROM analog-xm as analog-xm-web # Run VNC server & desktop environment -CMD ["startserver"] +ENTRYPOINT ["start_server"] diff --git a/stacks/digital-ator.Dockerfile b/stacks/digital-ator.Dockerfile index 37a50c0..0605993 100644 --- a/stacks/digital-ator.Dockerfile +++ b/stacks/digital-ator.Dockerfile @@ -20,10 +20,10 @@ RUN sudo pacman -Scc FROM digital-ator as digital-ator-desktop # Initialize the environment keeping container alive -CMD ["sleep", "infinity"] +ENTRYPOINT ["start_desktop"] # - Web build FROM digital-ator as digital-ator-web # Run VNC server & desktop environment -CMD ["startserver"] +ENTRYPOINT ["start_server"] diff --git a/stacks/digital-heavy.Dockerfile b/stacks/digital-heavy.Dockerfile index 15760f1..d5d7e70 100644 --- a/stacks/digital-heavy.Dockerfile +++ b/stacks/digital-heavy.Dockerfile @@ -21,10 +21,10 @@ RUN sudo pacman -Scc FROM digital-heavy as digital-heavy-desktop # Initialize the environment keeping container alive -CMD ["sleep", "infinity"] +ENTRYPOINT ["start_desktop"] # - Web build FROM digital-heavy as digital-heavy-web # Run VNC server & desktop environment -CMD ["startserver"] +ENTRYPOINT ["start_server"] diff --git a/stacks/digital-icarus.Dockerfile b/stacks/digital-icarus.Dockerfile index 26e364c..71bb5c7 100644 --- a/stacks/digital-icarus.Dockerfile +++ b/stacks/digital-icarus.Dockerfile @@ -20,10 +20,10 @@ RUN sudo pacman -Scc FROM digital-icarus as digital-icarus-desktop # Initialize the environment keeping container alive -CMD ["sleep", "infinity"] +ENTRYPOINT ["start_desktop"] # - Web build FROM digital-icarus as digital-icarus-web # Run VNC server & desktop environment -CMD ["startserver"] +ENTRYPOINT ["start_server"] diff --git a/stacks/heavy.Dockerfile b/stacks/heavy.Dockerfile index cd0a0de..41c7889 100644 --- a/stacks/heavy.Dockerfile +++ b/stacks/heavy.Dockerfile @@ -26,10 +26,10 @@ RUN sudo pacman -Scc FROM heavy as heavy-desktop # Initialize the environment keeping container alive -CMD ["sleep", "infinity"] +ENTRYPOINT ["start_desktop"] # - Web build FROM heavy as heavy-web # Run VNC server & desktop environment -CMD ["startserver"] +ENTRYPOINT ["start_server"]