Able to have pass in vnc

This commit is contained in:
butomo1989 2020-06-18 16:08:48 +02:00
parent ea5661fa41
commit 7ad2eb45c8
3 changed files with 19 additions and 1 deletions

View file

@ -1,3 +1,8 @@
VNC pass
--------
Passing ```VNC_PASSWORD="your_pass_here"``` will secure your vnc connection.
Proxy Proxy
----- -----

13
src/vnc.sh Executable file
View file

@ -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}

View file

@ -17,7 +17,7 @@ stderr_logfile=%(ENV_LOG_PATH)s/openbox.stderr.log
priority=2 priority=2
[program:x11vnc] [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 stdout_logfile=%(ENV_LOG_PATH)s/x11vnc.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/x11vnc.stderr.log stderr_logfile=%(ENV_LOG_PATH)s/x11vnc.stderr.log
priority=2 priority=2