-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvnc-startup.sh
More file actions
28 lines (21 loc) · 861 Bytes
/
vnc-startup.sh
File metadata and controls
28 lines (21 loc) · 861 Bytes
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
#!/bin/bash
echo "Starting VNC server setup..."
# Kill any existing VNC servers
vncserver -kill :1 2>/dev/null || true
# Clean up any existing X11 locks
rm -rf /tmp/.X1-lock /tmp/.X11-unix/X1 2>/dev/null || true
# Start VNC server on display :1
echo "Starting VNC server on display :1..."
vncserver :1 -geometry 1920x1080 -depth 24 -localhost no -SecurityTypes None --I-KNOW-THIS-IS-INSECURE
# Set DISPLAY environment variable
export DISPLAY=:1
# Start your JavaFX application with proper module path
echo "Starting JavaFX application..."
java --module-path /opt/javafx/lib \
--add-modules javafx.controls,javafx.fxml \
-Djava.awt.headless=false \
-cp /app/g2gnet-1.0-SNAPSHOT.jar \
org.geooo.Client
# Keep the container running even if the JavaFX app exits
echo "Application finished. Keeping VNC server running..."
tail -f /dev/null