1
0
mirror of https://github.com/fcwu/docker-ubuntu-vnc-desktop synced 2026-08-05 16:12:41 +02:00

feat: support VNC_PASSWORD

This commit is contained in:
Doro Wu
2017-05-02 17:38:25 +08:00
parent 0f153bc41b
commit 4941a6f6c7
2 changed files with 25 additions and 0 deletions
+7
View File
@@ -12,6 +12,13 @@ chown -R ubuntu:ubuntu /home/ubuntu
sudo -u ubuntu -i bash -c "mkdir -p /home/ubuntu/.config/pcmanfm/LXDE/ \
&& cp /usr/share/doro-lxde-wallpapers/desktop-items-0.conf /home/ubuntu/.config/pcmanfm/LXDE/"
if [ -n "$VNC_PASSWORD" ]; then
echo -n "$VNC_PASSWORD" > /.password1
x11vnc -storepasswd $(cat /.password1) /.password2
chmod 400 /.password*
sed -i 's/^command=x11vnc.*/& -rfbauth \/.password2/' /etc/supervisor/conf.d/supervisord.conf
fi
cd /usr/lib/web && ./run.py > /var/log/web.log 2>&1 &
nginx -c /etc/nginx/nginx.conf
exec /bin/tini -- /usr/bin/supervisord -n