How to watch xvfb session that's inside a docker on remote server from my local browser? How to watch xvfb session that's inside a docker on remote server from my local browser? selenium selenium

How to watch xvfb session that's inside a docker on remote server from my local browser?


There is a recent tool called Selenoid. It is launching browsers in Docker containers (i.e. headless as you require). It has a standalone UI capable to show live session screen via VNC. So you can launch multiple sessions in parallel and then look and even intercept actions happening in target browser. All this stuff perfectly works in cloud environment.


I have faced the same issue before with vnc, you need to know your xvfb/vnc in which port is using then open that port on you aws secuirty group once you done with that then you should be able to connect.

On my case i was starting selenium docker "https://github.com/elgalu/docker-selenium" and used this command to start the docker machine "docker run -d --name=grid -p 4444:24444 -p 5900:25900 \ -v /dev/shm:/dev/shm -e VNC_PASSWORD=hola \ -e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1480 \ elgalu/selenium"

The VNC port as per the command is "5900" so i opened that port on instance security group, and connected using VNC viewer on port 5900