-
-
Notifications
You must be signed in to change notification settings - Fork 6
chore(kasmvnc): move from porting/ to apps/ #2254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ec23958
chore(kasmvnc): move from porting/ to apps/
Crow-Control 612ab36
fix(kasmvnc): update dri symlink to use arch-specific path
Claude 4fc23bb
chore(kasmvnc): move from porting/ to apps/ with Ubuntu 24.04 compati…
Claude b647a3e
Update base image version to Ubuntu 26.04
Crow-Control 7798f04
fix(kasmvnc): add libcrypt-dev and patch CMakeLists.txt for Ubuntu 26…
Claude a96ae48
fix(kasmvnc): remove /usr/local/man symlink before COPY to prevent co…
Claude 6c0fa58
Update Dockerfile
Crow-Control c992eca
fix(kasmvnc): update runtime dependencies for Ubuntu 26.04
Claude a13263e
fix(kasmvnc): make external downloads non-fatal and handle existing U…
Claude 7301619
fix(kasmvnc): fix Dockerfile COPY paths and start.sh runtime issues
Claude 8df5026
Update Dockerfile
Crow-Control 2d6cef6
fix(kasmvnc): fix nginx config directory to use conf.d
Claude 2e59284
fix(kasmvnc): correct COPY command to only copy start.sh
Claude 7d4d891
Merge branch 'main' into chore/move-kasmvnc-to-apps
Crow-Control d5e546d
Update Dockerfile
Crow-Control File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/trueforge-org/forgetool/refs/heads/main/pkg/containers/test/container-test.schema.json | ||
|
|
||
| tcp: | ||
| - port: '3000' | ||
| - port: '3001' | ||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/trueforge-org/forgetool/refs/heads/main/schemas/container-settings.schema.json | ||
| schema_version: 1 | ||
| upstream_env_url: "https://github.com/kasmtech/KasmVNC" | ||
| ports: | ||
| - port: 3000 | ||
| protocol: tcp | ||
| required: false | ||
| - port: 3001 | ||
| protocol: tcp | ||
| required: false | ||
| env: | ||
| - name: TZ | ||
| default: "Etc/UTC" | ||
| required: false | ||
| - name: CUSTOM_PORT | ||
| default: "3000" | ||
| required: false | ||
| - name: CUSTOM_HTTPS_PORT | ||
| default: "3001" | ||
| required: false | ||
| - name: CUSTOM_USER | ||
| default: "apps" | ||
| required: false | ||
| - name: PASSWORD | ||
| default: "" | ||
| required: false | ||
| - name: SUBFOLDER | ||
| default: "/" | ||
| required: false | ||
|
Crow-Control marked this conversation as resolved.
|
||
| volumes: | ||
| - path: /config | ||
| required: true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,167 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # default file copies first run | ||
| if [[ ! -f /config/.config/openbox/autostart ]]; then | ||
| mkdir -p /config/.config/openbox | ||
| cp /defaults/autostart /config/.config/openbox/autostart | ||
| chown -R apps:apps /config/.config/openbox | ||
| fi | ||
| if [[ ! -f /config/.config/openbox/menu.xml ]]; then | ||
| mkdir -p /config/.config/openbox | ||
| cp /defaults/menu.xml /config/.config/openbox/menu.xml | ||
| chown -R apps:apps /config/.config | ||
| fi | ||
|
|
||
| # XDG Home | ||
| export XDG_RUNTIME_DIR="${HOME}/.XDG" | ||
| if [ ! -d "${XDG_RUNTIME_DIR}" ]; then | ||
| mkdir -p "${XDG_RUNTIME_DIR}" | ||
| chown apps:apps "${XDG_RUNTIME_DIR}" | ||
| fi | ||
|
|
||
| # Create cache directory for openbox | ||
| if [ ! -d "/config/.cache/openbox" ]; then | ||
| mkdir -p "/config/.cache/openbox" | ||
| chown -R apps:apps "/config/.cache" | ||
| fi | ||
|
|
||
| # Locale Support | ||
| if [ ! -z ${LC_ALL+x} ]; then | ||
| export LANGUAGE="${LC_ALL%.UTF-8}" | ||
| export LANG="${LC_ALL}" | ||
| fi | ||
|
|
||
| # Remove window borders (write to /tmp since /etc is read-only with --read-only) | ||
| if [[ ! -z ${NO_DECOR+x} ]] && [[ ! -f /tmp/decorlock ]]; then | ||
| if [ -w /etc/xdg/openbox/rc.xml ]; then | ||
| sed -i \ | ||
| 's|</applications>| <application class="*"> <decor>no</decor> </application>\n</applications>|' \ | ||
| /etc/xdg/openbox/rc.xml | ||
| fi | ||
| touch /tmp/decorlock | ||
| fi | ||
|
|
||
| # Fullscreen everything in openbox unless the user explicitly disables it | ||
| if [[ ! -z ${NO_FULL+x} ]] && [[ ! -f /tmp/fulllock ]]; then | ||
| if [ -w /etc/xdg/openbox/rc.xml ]; then | ||
| sed -i \ | ||
| '/<application class="\*"><maximized>yes<\/maximized><\/application>/d' \ | ||
| /etc/xdg/openbox/rc.xml | ||
| fi | ||
| touch /tmp/fulllock | ||
| fi | ||
|
|
||
| # Add proot-apps if available | ||
| if [ -d /proot-apps ] && [ "$(ls -A /proot-apps 2>/dev/null)" ]; then | ||
| if [ ! -f "${HOME}/.local/bin/proot-apps" ]; then | ||
| mkdir -p ${HOME}/.local/bin/ | ||
| cp /proot-apps/* ${HOME}/.local/bin/ 2>/dev/null || true | ||
| echo 'export PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bashrc | ||
| chown -R apps:apps ${HOME}/.local/ ${HOME}/.bashrc 2>/dev/null || true | ||
| elif [ -f /proot-apps/pversion ] && [ -f ${HOME}/.local/bin/pversion ] && ! diff -q /proot-apps/pversion ${HOME}/.local/bin/pversion > /dev/null 2>&1; then | ||
| cp /proot-apps/* ${HOME}/.local/bin/ 2>/dev/null || true | ||
| chown -R apps:apps ${HOME}/.local/bin/ 2>/dev/null || true | ||
| fi | ||
| fi | ||
|
|
||
| # nginx Path - use /tmp since we may not be able to write to /etc/nginx | ||
| NGINX_CONFIG=/tmp/nginx-default.conf | ||
|
|
||
| # user passed env vars | ||
| CPORT="${CUSTOM_PORT:-3000}" | ||
| CHPORT="${CUSTOM_HTTPS_PORT:-3001}" | ||
| CUSER="${CUSTOM_USER:-apps}" | ||
| SFOLDER="${SUBFOLDER:-/}" | ||
|
|
||
| # create self signed cert | ||
| if [ ! -f "/config/ssl/cert.pem" ]; then | ||
| mkdir -p /config/ssl | ||
| openssl req -new -x509 \ | ||
| -days 3650 -nodes \ | ||
| -out /config/ssl/cert.pem \ | ||
| -keyout /config/ssl/cert.key \ | ||
| -subj "/C=US/ST=CA/L=Carlsbad/O=Linuxserver.io/OU=LSIO Server/CN=*" | ||
| chmod 600 /config/ssl/cert.key | ||
| chown -R apps:apps /config/ssl | ||
| fi | ||
|
|
||
| # modify nginx config | ||
| cp /defaults/default.conf ${NGINX_CONFIG} | ||
| sed -i "s/3000/$CPORT/g" ${NGINX_CONFIG} | ||
| sed -i "s/3001/$CHPORT/g" ${NGINX_CONFIG} | ||
| sed -i "s|SUBFOLDER|$SFOLDER|g" ${NGINX_CONFIG} | ||
| if [ ! -z ${DISABLE_IPV6+x} ]; then | ||
| sed -i '/listen \[::\]/d' ${NGINX_CONFIG} | ||
| fi | ||
| if [ ! -z ${PASSWORD+x} ]; then | ||
| mkdir -p /tmp/nginx | ||
| printf "${CUSER}:$(openssl passwd -apr1 ${PASSWORD})\n" > /tmp/nginx/.htpasswd | ||
| sed -i 's/#//g' ${NGINX_CONFIG} | ||
| sed -i "s|/etc/nginx/.htpasswd|/tmp/nginx/.htpasswd|g" ${NGINX_CONFIG} | ||
| fi | ||
|
|
||
| # Copy nginx config to the right place if writable | ||
| if [ -w /etc/nginx/conf.d/ ]; then | ||
| cp ${NGINX_CONFIG} /etc/nginx/conf.d/default.conf | ||
| elif [ -d /etc/nginx/http.d/ ] && [ -w /etc/nginx/http.d/ ]; then | ||
| cp ${NGINX_CONFIG} /etc/nginx/http.d/default.conf | ||
| fi | ||
|
|
||
| # Set DISPLAY for X server | ||
| export DISPLAY=:1 | ||
|
|
||
| # Start PulseAudio in the background | ||
| /usr/bin/pulseaudio \ | ||
| --log-level=0 \ | ||
| --log-target=stderr \ | ||
| --exit-idle-time=-1 > /dev/null 2>&1 & | ||
|
|
||
| # Start Xvnc server in background | ||
| # Pass gpu flags if mounted | ||
| HW3D="" | ||
| if ls /dev/dri/renderD* 1> /dev/null 2>&1 && [ -z ${DISABLE_DRI+x} ] && ! which nvidia-smi > /dev/null 2>&1; then | ||
| HW3D="-hw3d" | ||
| fi | ||
| DRINODE="${DRINODE:-/dev/dri/renderD128}" | ||
|
|
||
| /usr/local/bin/Xvnc $DISPLAY \ | ||
| ${HW3D} \ | ||
| -PublicIP 127.0.0.1 \ | ||
| -drinode ${DRINODE} \ | ||
| -disableBasicAuth \ | ||
| -SecurityTypes None \ | ||
| -AlwaysShared \ | ||
| -http-header Cross-Origin-Embedder-Policy=require-corp \ | ||
| -http-header Cross-Origin-Opener-Policy=same-origin \ | ||
| -geometry 1024x768 \ | ||
| -sslOnly 0 \ | ||
| -RectThreads 0 \ | ||
| -websocketPort 6901 \ | ||
| -interface 0.0.0.0 \ | ||
| -Log *:stdout:10 & | ||
|
|
||
| # Wait for X server to be ready | ||
| sleep 2 | ||
|
|
||
| # Start window manager | ||
| cd $HOME | ||
| /bin/bash /defaults/startwm.sh & | ||
|
|
||
| # Wait for window manager to start | ||
| sleep 2 | ||
|
|
||
| # Start nginx (kill any zombie processes first) | ||
| if pgrep -f "[n]ginx:" >/dev/null; then | ||
| echo "Zombie nginx processes detected, cleaning up" | ||
| pkill -ef '[n]ginx:' 2>/dev/null || true | ||
| sleep 1 | ||
| fi | ||
|
|
||
| # Start nginx in background | ||
| if [ -f /etc/nginx/conf.d/default.conf ] || [ -f /etc/nginx/http.d/default.conf ] || [ -f ${NGINX_CONFIG} ]; then | ||
| /usr/sbin/nginx -g 'daemon off;' -c /etc/nginx/nginx.conf & | ||
| fi | ||
|
|
||
| # Start kclient Node.js wrapper in foreground (this becomes our main process) | ||
| cd /kclient | ||
| exec node index.js |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.