diff --git a/README_CUSTOM_CONFIG.md b/README_CUSTOM_CONFIG.md index 1fc3846..4889dd1 100644 --- a/README_CUSTOM_CONFIG.md +++ b/README_CUSTOM_CONFIG.md @@ -1,3 +1,8 @@ +VNC pass +-------- + +Passing ```VNC_PASSWORD="your_pass_here"``` will secure your vnc connection. + Proxy ----- diff --git a/src/vnc.sh b/src/vnc.sh new file mode 100755 index 0000000..d8132fd --- /dev/null +++ b/src/vnc.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +vnc="/usr/bin/x11vnc -display ${DISPLAY} -forever -shared " + +pass_path="/root/vncpass" +if [ ! -z "${VNC_PASSWORD}" ]; then + /usr/bin/x11vnc -storepasswd ${VNC_PASSWORD} ${pass_path} + param="-rfbauth ${pass_path}" +else + param="-nopw" +fi + +${vnc}${param} diff --git a/supervisord.conf b/supervisord.conf index 36d275a..63a6b10 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -17,7 +17,7 @@ stderr_logfile=%(ENV_LOG_PATH)s/openbox.stderr.log priority=2 [program:x11vnc] -command=/usr/bin/x11vnc -display %(ENV_DISPLAY)s -nopw -forever -shared +command=./src/vnc.sh stdout_logfile=%(ENV_LOG_PATH)s/x11vnc.stdout.log stderr_logfile=%(ENV_LOG_PATH)s/x11vnc.stderr.log priority=2