Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate X11 forwarding as opposed to VNC #2

Closed
mtscout6 opened this issue Nov 17, 2014 · 8 comments
Closed

Investigate X11 forwarding as opposed to VNC #2

mtscout6 opened this issue Nov 17, 2014 · 8 comments

Comments

@mtscout6
Copy link
Member

Initial issue derived from elgalu/docker-selenium#10

According to the Docker Official Repo Guidelines These images should not derive from phusion/baseimage. However, the initial reason to base off that image was to provide stability when running a Selenium node with VNC and Xvfb support.

There was an IRC conversation with @psftw regarding a possible means of utilizing a separate container for debug purposes using X11 forwarding. This approach would remove the need to support VNC in the same container as the Selenium node, thus getting us one step closer to a more efficient image.

I have done some initial work on this on my personal x11 branch which is still a ROUGH DRAFT. In there I was able to achieve using Xvfb and the Selenium node in a single process tree. The next goal is to figure out how to attach another container and perform an SSH connection with X11 forwarding.

@mtscout6 mtscout6 self-assigned this Nov 17, 2014
mtscout6 added a commit that referenced this issue Nov 20, 2014
These debug images are not meant to be included in the official docker
supported debug solution, they are merely a stop gap till #2 is
resolved.

Part of #3
mtscout6 added a commit that referenced this issue Nov 20, 2014
These debug images are not meant to be included in the official docker
supported debug solution, they are merely a stop gap till #2 is
resolved.

Part of #3
@neural-wetware
Copy link

How about we just expose the X server domain socket in a volume like this:

http://stackoverflow.com/a/25168483

@elgalu
Copy link
Member

elgalu commented Jun 8, 2016

It grants the container full access to the xserver on the host

@BrennanRoberts
Copy link

Just to clarify, is the current usage of xvfb incompatible with the approach of mounting the host's X socket in, say, a StandaloneChrome container?

@BrennanRoberts
Copy link

BrennanRoberts commented Nov 4, 2016

Correct me if I'm wrong, but I believe the answer to ^ is "yes". xvfb sets up it's own X server, which is diametrically opposed to passing the socket from the host's X server in. Unwrapping the java ... -jar /opt/selenium/selenium-server-standalone.jar from xvfb-run, and passing DISPLAY/mounting /tmp/.X11-unix at docker run time works as desired.

Would an option to bypass the xvfb-run segment of each entrypoint be an acceptable solution? Something conceptually like:

if [ ! -z "$NO_XVFB" ]; then
  java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
    ${SE_OPTS} &
else
  xvfb-run -n $SERVERNUM --server-args="-screen 0 $GEOMETRY -ac +extension RANDR" \
    java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
    ${SE_OPTS} &
fi

@elgalu
Copy link
Member

elgalu commented Nov 5, 2016

I agree is now incompatible as of now.

I confirmed the x11 redirect works ~1yr ago on version v2.46.0-x11 while playing with Xephyr to redirect X to the docker host and passing -v /tmp/.X11-unix/X${XE_DISP_NUM}:/tmp/.X11-unix/X${XE_DISP_NUM} among other things.

But drop it after because didn't really want to support this use case back then but if someone wants to implement it for real and become officially supported that might help.

@BrennanRoberts
Copy link

Pushed #346 and looking for feedback.

@diemol
Copy link
Member

diemol commented Aug 6, 2018

Hi all,

Is this still relevant? This issue and the PR have been stale for ~1.5 years.

@diemol
Copy link
Member

diemol commented Aug 21, 2018

Closing issue since it is completely stale (also the related PR).

@diemol diemol closed this as completed Aug 21, 2018
Tracking automation moved this from Backlog to Done Aug 21, 2018
@lock lock bot locked and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Tracking
  
Done
Development

No branches or pull requests

5 participants