Spaces:
Paused
Paused
File size: 2,008 Bytes
bcb7498 dae5804 bcb7498 dae5804 bcb7498 dae5804 bcb7498 dae5804 bcb7498 dae5804 bcb7498 b92a4ae | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #!/bin/bash
set -e
# ── Clean up stale VNC locks ──────────────────────────────────
rm -f /tmp/.X1-lock
rm -f /tmp/.X11-unix/X1
# ── Create required dirs ──────────────────────────────────────
mkdir -p /tmp/.X11-unix
chmod 1777 /tmp/.X11-unix
mkdir -p /home/georgesnoe/.vnc
chown -R georgesnoe:georgesnoe /home/georgesnoe/.vnc
# ── Write VNC password ────────────────────────────────────────
echo "h7pp017t€" | su georgesnoe -c "vncpasswd -f > /home/georgesnoe/.vnc/passwd"
chmod 600 /home/georgesnoe/.vnc/passwd
chown georgesnoe:georgesnoe /home/georgesnoe/.vnc/passwd
# ── Start Xvnc directly as georgesnoe ────────────────────────
su georgesnoe -c "
Xvnc :1 \
-geometry 1280x800 \
-depth 24 \
-rfbport 5901 \
-rfbauth /home/georgesnoe/.vnc/passwd \
-SecurityTypes VncAuth \
-localhost no \
&
"
# ── Wait for Xvnc to be ready ────────────────────────────────
sleep 2
# ── Start XFCE4 as georgesnoe ────────────────────────────────
su georgesnoe -c "DISPLAY=:1 startxfce4 &"
# ── Start noVNC in background ─────────────────────────────────
websockify --web=/usr/share/novnc 7860 localhost:5901 &
# ── Start Cloudflare Quick Tunnel ────────────────────────────
echo ""
echo "========================================="
echo " Cloudflare Tunnel starting..."
echo " Ton URL apparaîtra ci-dessous"
echo "========================================="
exec cloudflared tunnel --url http://localhost:7860 --no-autoupdate |