fcwu / docker-ubuntu-vnc-desktop

A Docker image to provide web VNC interface to access Ubuntu LXDE/LxQT desktop environment.
Apache License 2.0
3.95k stars 1.43k forks source link

Simple vnc connection problem #222

Closed DevinBayly closed 3 years ago

DevinBayly commented 3 years ago

I can't follow the instructions to start a connection to this docker container running in a remote server from my laptop (ubuntu 20.04).

Here's what I've tried running on the remote server

docker run -p 5900:5900 -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vn

which outputs

2021-01-30 18:24:34,824 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2021-01-30 18:24:34,825 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2021-01-30 18:24:34,829 INFO RPC interface 'supervisor' initialized
2021-01-30 18:24:34,829 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2021-01-30 18:24:34,829 INFO supervisord started with pid 12
2021-01-30 18:24:35,832 INFO spawned: 'nginx' with pid 14
2021-01-30 18:24:35,835 INFO spawned: 'web' with pid 15
2021-01-30 18:24:35,838 INFO spawned: 'xvfb' with pid 16
2021-01-30 18:24:35,840 INFO spawned: 'wm' with pid 17
2021-01-30 18:24:35,843 INFO spawned: 'lxpanel' with pid 18
2021-01-30 18:24:35,846 INFO spawned: 'pcmanfm' with pid 19
2021-01-30 18:24:35,849 INFO spawned: 'x11vnc' with pid 20
2021-01-30 18:24:35,852 INFO spawned: 'novnc' with pid 21
2021-01-30 18:24:36,119 INFO  Listening on http://localhost:6079 (run.py:87)
2021-01-30 18:24:36,876 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-01-30 18:24:36,876 INFO success: web entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-01-30 18:24:36,876 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-01-30 18:24:36,876 INFO success: wm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-01-30 18:24:36,877 INFO success: lxpanel entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-01-30 18:24:36,877 INFO success: pcmanfm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-01-30 18:24:36,877 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-01-30 18:24:36,878 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

but I've tried connecting with a bunch of VNC programs and none of them work

I used remmina with this configuration , but it times out without connecting. image

I tried tightvncconnect myserverip in the terminal but it doesn't output anything or bring up any new graphical applications.

I'm sure I'm missing something super basic, so hopefully this isn't a tricky one. Thanks for the help!

dennisvanderpool commented 3 years ago

Hi @DevinBayly ,

Herewith the command i run to start my container.

docker run \ -d \ -p 47387:443 \ -p 6885:5900 \ -v /dev/shm:/dev/shm \ -e RESOLUTION=2560x1440 \ -e VNC_PASSWORD=yourvncpwd \ -e USER=dennis \ -e PASSWORD=youruserpwd \ -e SSL_PORT=443 \ --cap-add=SYS_PTRACE \ --mount source=ubuntu-desktop-home-dennis,target=/home/dennis \ --mount type=bind,source=/etc/localtime,target=/etc/localtime \ --mount type=bind,source=/root/ssl/ubuntu-desktop,target=/etc/nginx/ssl \ --restart=always \ --name ubuntu-desktop \ dennisvanderpool/ubuntu-desktop

I've created a Dockerfile based on this one.

If that still doesn't work try checking if port might be blocked on the firewall (check iptables) or check --network argument

DevinBayly commented 3 years ago

@dennisvanderpool Thanks for the info! What program are you using for your vnc client if I may ask, and do you just make it connect to the host ip running the container on port 6885?

dennisvanderpool commented 3 years ago

@DevinBayly Remmina on Linux and used 2 different VNC clients on Windows, they all work. Screenshot from 2021-02-01 18-22-00

DevinBayly commented 3 years ago

alright good to know. I was able to connect using the turbovnc client and the ./vncviewer with the hostip::6885 and then my provided password.

Couldn't get remmina, but that's ok. Thanks for your help!