deep-wine-runner/mainwindow-termux-loader.sh

16 lines
450 B
Bash
Raw Normal View History

2024-07-21 11:34:44 +08:00
#!/data/data/com.termux/files/usr/bin/bash
2024-07-21 12:44:10 +08:00
CURRENT_DIR=$(dirname $(readlink -f "$0"))
2024-07-21 11:34:44 +08:00
if [[ $DISPLAY == "" ]] && [[ $WAYLAND_DISPLAY == "" ]]; then
# 自动配置 NoVNC
export DISPLAY=:5
vncserver $DISPLAY &
sleep 3
xfwm4 &
if [[ -f /data/data/com.termux/files/usr/bin/startxfce4 ]]; then
startxfce4 &
fi
$CURRENT_DIR/novnc/utils/novnc_proxy --vnc localhost:5905 &
fi
python3 $CURRENT_DIR/mainwindow.py