Skip to content

Commit

Permalink
Able to have pass in vnc
Browse files Browse the repository at this point in the history
  • Loading branch information
budtmo committed Jun 18, 2020
1 parent ea5661f commit 7ad2eb4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README_CUSTOM_CONFIG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
VNC pass
--------

Passing ```VNC_PASSWORD="your_pass_here"``` will secure your vnc connection.

Proxy
-----

Expand Down
13 changes: 13 additions & 0 deletions src/vnc.sh
Original file line number Diff line number Diff line change
@@ -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}
2 changes: 1 addition & 1 deletion supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7ad2eb4

Please sign in to comment.