]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Improve vnc script: indicate errors on start vncserver.
authorspo <sergey.pokhodenko@opencascade.com>
Tue, 1 Sep 2015 13:20:21 +0000 (16:20 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Tue, 1 Sep 2015 13:22:27 +0000 (16:22 +0300)
vnc-run
vnc.sh

diff --git a/vnc-run b/vnc-run
index 9e730ce1a0497b0c45bf70edcf5b6c3633635da2..8684ec10d9f2cb214cfe0eb8836c0302c7b348f8 100755 (executable)
--- a/vnc-run
+++ b/vnc-run
@@ -141,9 +141,12 @@ MCOOKIE=$(mcookie)
 XAUTHORITY=$AUTHFILE xauth source - << EOF >>"$ERRORFILE" 2>&1
 add :$SERVERNUM $XAUTHPROTO $MCOOKIE
 EOF
-XAUTHORITY=$AUTHFILE vncserver ":$SERVERNUM" -noxstartup >>"$ERRORFILE" 2>&1 &
+XAUTHORITY=$AUTHFILE vncserver ":$SERVERNUM" >>"$ERRORFILE" 2>&1 &
 VNCPID=$!
 sleep "$STARTWAIT"
+if ! wait ${VNCPID}; then
+  exit 5
+fi
 
 # Start the command and save its exit status.
 set +e
diff --git a/vnc.sh b/vnc.sh
index fafc049effcbc38f5655270d0a88423be3f81967..6d72768f9cdbffe25c7ed3ed7ad1d00136b0ab81 100755 (executable)
--- a/vnc.sh
+++ b/vnc.sh
@@ -7,4 +7,4 @@ fi
 echo "DISPLAY is :${DISPLAY_PORT}"
 
 export PATH=/dn23/NEWGEOM/NEWGEOM_JENKINS_BUILD_AREA/tools:/opt/TurboVNC/bin:${PATH}
-./vnc-run --server-num ${DISPLAY_PORT} vglrun "$@"
+./vnc-run --server-num ${DISPLAY_PORT} -e vnc.err vglrun "$@"