Spaces:
Paused
Paused
Create start.sh
Browse files
start.sh
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# 1. Start Xvfb (Virtual Framebuffer/Monitor)
|
| 4 |
+
# We set the resolution to 1400x900 to match your app's geometry
|
| 5 |
+
Xvfb :1 -screen 0 1440x960x24 &
|
| 6 |
+
export DISPLAY=:1
|
| 7 |
+
|
| 8 |
+
# 2. Start Fluxbox (Window Manager to handle minimizing/moving windows)
|
| 9 |
+
fluxbox &
|
| 10 |
+
|
| 11 |
+
# 3. Start your Tkinter App in the background
|
| 12 |
+
python main.py &
|
| 13 |
+
|
| 14 |
+
# 4. Start X11VNC (Connects the virtual monitor to a VNC stream)
|
| 15 |
+
x11vnc -display :1 -nopw -forever -quiet &
|
| 16 |
+
|
| 17 |
+
# 5. Start NoVNC (The web interface that Hugging Face displays)
|
| 18 |
+
# It bridges the VNC stream to the web port 7860
|
| 19 |
+
/usr/share/novnc/utils/launch.sh --vnc localhost:5900 --listen 7860
|