From c5c89d60c712b8e95a4bb3f7cb341cfa14249782 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Tue, 3 Dec 2024 12:39:00 +0700 Subject: [PATCH] Docker: Node env vars to disable/enable VNC view only, password Signed-off-by: Viet Nguyen Duc --- NodeBase/start-vnc.sh | 4 ++-- README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NodeBase/start-vnc.sh b/NodeBase/start-vnc.sh index 524d41580c..8af8d2564d 100755 --- a/NodeBase/start-vnc.sh +++ b/NodeBase/start-vnc.sh @@ -14,7 +14,7 @@ if [ "${START_XVFB:-$SE_START_XVFB}" = true ]; then fi done VNC_NO_PASSWORD=${VNC_NO_PASSWORD:-$SE_VNC_NO_PASSWORD} - if [ ! -z $VNC_NO_PASSWORD ]; then + if [ "${VNC_NO_PASSWORD}" = "true" ] || [ "${VNC_NO_PASSWORD}" = "1" ]; then echo "Starting VNC server without password authentication" X11VNC_OPTS= else @@ -22,7 +22,7 @@ if [ "${START_XVFB:-$SE_START_XVFB}" = true ]; then fi VNC_VIEW_ONLY=${VNC_VIEW_ONLY:-$SE_VNC_VIEW_ONLY} - if [ ! -z $VNC_VIEW_ONLY ]; then + if [ "${VNC_VIEW_ONLY}" = "true" ] || [ "${VNC_VIEW_ONLY}" = "1" ]; then echo "Starting VNC server with viewonly option" X11VNC_OPTS="${X11VNC_OPTS} -viewonly" fi diff --git a/README.md b/README.md index aaae095c35..6798b43f72 100644 --- a/README.md +++ b/README.md @@ -1661,9 +1661,9 @@ Then, you would use in your VNC client: If you get a prompt asking for a password, it is: `secret`. If you wish to change this, you can set the environment variable `SE_VNC_PASSWORD`. -If you want to run VNC without password authentication you can set the environment variable `SE_VNC_NO_PASSWORD=1`. +If you want to run VNC without password authentication you can set the environment variable `SE_VNC_NO_PASSWORD=true`. -If you want to run VNC in view-only mode you can set the environment variable `SE_VNC_VIEW_ONLY=1`. +If you want to run VNC in view-only mode you can set the environment variable `SE_VNC_VIEW_ONLY=true`. If you want to modify the open file descriptor limit for the VNC server process you can set the environment variable `SE_VNC_ULIMIT=4096`.