jlesage / docker-firefox

Docker container for Firefox
MIT License
1.4k stars 266 forks source link

[Feature request] Improve VNC section of documentation. #224

Closed salamander2 closed 4 months ago

salamander2 commented 4 months ago

Idea

The instructions for how to connect using VNC to port 5900 are not complete enough. I had to spend an hour of trial and error to figure it out. Here's what would be useful. Please consider adding this to your main documentation. The actual commands that one has to run are extremely helpful. :bulb:

How to get VNC working with Docker on Linux

1. This is how you run the container. (The password "abcdef" is in plain text. I don't know how to fix this.)

docker run -d --name=firefox -e VNC_PASSWORD=abcdef -p 5800:5800 -p 5900:5900 jlesage/firefox

2. You have to create a VNC password file using the vncpasswd command

3. This command is not on the system so: sudo apt-get install tightvncserver

4. > vncpasswd Using password file /home/username/.vnc/passwd Password: abcdef Verify: abcdef Would you like to enter a view-only password (y/n)? n

5. Now connect using vncviewer: vncviewer -passwd .vnc/passwd localhost::5900

6. IT WORKS!

jlesage commented 4 months ago

What part was not clear enough ? Looks like only point 1) applies to the container. Other ones depends on the VNC client your are using and are not really specific to this container (i.e. they apply to any VNC server).

salamander2 commented 4 months ago

I think having a sample of each step, particularly #1, #2 and #5 would be very useful. Even though it is for only one version of VNC, when one looks at the syntax, one can easily make the changes to get a different version working.

Thank you for your incredible work!

jlesage commented 4 months ago

Everything related to the password seems to be specific to the VNC client you are using. Usually, people use VNC clients via their GUI and there is always an option to specify the password. The password might also be requested automatically when needed.

I try to keep documentation related to the container itself, otherwise it would be infinite. But I will see if better pointers could be provided.