mirror of
https://github.com/fcwu/docker-ubuntu-vnc-desktop
synced 2025-12-06 16:32:47 +01:00
feat: support VNC_PASSWORD
This commit is contained in:
parent
0f153bc41b
commit
4941a6f6c7
2 changed files with 25 additions and 0 deletions
18
README.md
18
README.md
|
|
@ -25,6 +25,24 @@ Browse http://127.0.0.1:6080/
|
||||||
<img src="https://raw.github.com/fcwu/docker-ubuntu-vnc-desktop/master/screenshots/lxde.png" width=400/>
|
<img src="https://raw.github.com/fcwu/docker-ubuntu-vnc-desktop/master/screenshots/lxde.png" width=400/>
|
||||||
|
|
||||||
|
|
||||||
|
Connect with VNC Viewer and protect by VNC Password
|
||||||
|
==================
|
||||||
|
|
||||||
|
Forward VNC service port 5900 to host by
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -it --rm -p 6080:80 -p 5900:5900 dorowu/ubuntu-desktop-lxde-vnc
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, open the vnc viewer and connect to port 5900. If you would like to protect vnc service by password, set environment variable `VNC_PASSWORD`, for example
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -it --rm -p 6080:80 -p 5900:5900 -e VNC_PASSWORD=mypassword dorowu/ubuntu-desktop-lxde-vnc
|
||||||
|
```
|
||||||
|
|
||||||
|
A prompt will ask password either in the browser or vnc viewer.
|
||||||
|
|
||||||
|
|
||||||
Troubleshooting
|
Troubleshooting
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,13 @@ chown -R ubuntu:ubuntu /home/ubuntu
|
||||||
sudo -u ubuntu -i bash -c "mkdir -p /home/ubuntu/.config/pcmanfm/LXDE/ \
|
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/"
|
&& 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 &
|
cd /usr/lib/web && ./run.py > /var/log/web.log 2>&1 &
|
||||||
nginx -c /etc/nginx/nginx.conf
|
nginx -c /etc/nginx/nginx.conf
|
||||||
exec /bin/tini -- /usr/bin/supervisord -n
|
exec /bin/tini -- /usr/bin/supervisord -n
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue