Restructure cistech-tunnel to match rego-tunnel pattern
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
- build/: Dockerfile + entrypoint.sh (base image with VNC/noVNC) - shared/: Runtime scripts mounted into container - xstartup: VNC startup, launches openconnect-vpn in xterm - openconnect-vpn: Main VPN script with menu, auto-connect, watchdog - Removed source/ folder (replaced by build/) - Updated docker-compose.json with proper volume mounts - Changed port to 6080 (noVNC default) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
39
apps/cistech-tunnel/shared/xstartup
Normal file
39
apps/cistech-tunnel/shared/xstartup
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
# VNC xstartup - launches terminal with openconnect-vpn script
|
||||
|
||||
unset SESSION_MANAGER
|
||||
unset DBUS_SESSION_BUS_ADDRESS
|
||||
|
||||
# Import environment variables from container (PID 1)
|
||||
# VNC doesn't inherit Docker env vars, so we source them here
|
||||
while IFS= read -r -d '' line; do
|
||||
export "$line"
|
||||
done < /proc/1/environ
|
||||
|
||||
export XDG_RUNTIME_DIR=/tmp/runtime-root
|
||||
mkdir -p $XDG_RUNTIME_DIR
|
||||
chmod 700 $XDG_RUNTIME_DIR
|
||||
|
||||
# GPU/WebKit workarounds
|
||||
export GDK_BACKEND=x11
|
||||
export WEBKIT_DISABLE_DMABUF_RENDERER=1
|
||||
|
||||
# Start dbus session
|
||||
[ -x /usr/bin/dbus-launch ] && eval $(dbus-launch --sh-syntax --exit-with-session)
|
||||
|
||||
# Start window manager
|
||||
openbox &
|
||||
sleep 2
|
||||
|
||||
# Disable screen blanking and power saving
|
||||
xset s off 2>/dev/null || true
|
||||
xset -dpms 2>/dev/null || true
|
||||
xset s noblank 2>/dev/null || true
|
||||
|
||||
# Make script executable and launch in terminal
|
||||
chmod +x /shared/openconnect-vpn 2>/dev/null || true
|
||||
xterm -fa 'Monospace' -fs 11 -bg black -fg white -geometry 130x45+10+10 \
|
||||
-title "Cistech VPN Terminal" \
|
||||
-e "bash -c '/shared/openconnect-vpn; exec bash'" &
|
||||
|
||||
wait
|
||||
Reference in New Issue
Block a user