From 6ff17249d0afea44679446c675202b06669a4ec6 Mon Sep 17 00:00:00 2001 From: cheeweng-tan-partior Date: Wed, 10 Jan 2024 07:58:36 +0000 Subject: [PATCH] update --- start.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/start.sh b/start.sh index 6ee7a82f..6a6547cb 100755 --- a/start.sh +++ b/start.sh @@ -35,6 +35,7 @@ hash autocutsel 2>/dev/null || { } info "updating vnc startup initialization script @ ~/.vnc/xstartup" +mkdir -p ~/.vnc cat > ~/.vnc/xstartup << EOF #!/bin/bash xrdb $HOME/.Xresources @@ -44,11 +45,12 @@ EOF display=$(/opt/TurboVNC/bin/vncserver -list | grep -E "^:" | awk '{print $1}') -if [ -z $display ]; then - info "restarting vnc server" +if [ ! -z $display ]; then + info "restarting vnc server on display $display" /opt/TurboVNC/bin/vncserver -kill $display - /opt/TurboVNC/bin/vncserver -localhost -depth 24 -geometry 3440x1440 fi +/opt/TurboVNC/bin/vncserver -localhost -depth 24 -geometry 3440x1440 + cd utils # Start noVNC