Giter VIP home page Giter VIP logo

Comments (8)

neural-wetware avatar neural-wetware commented on May 20, 2024

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

http://stackoverflow.com/a/25168483

from docker-selenium.

elgalu avatar elgalu commented on May 20, 2024

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

from docker-selenium.

BrennanRoberts avatar BrennanRoberts commented on May 20, 2024

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?

from docker-selenium.

BrennanRoberts avatar BrennanRoberts commented on May 20, 2024

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

from docker-selenium.

elgalu avatar elgalu commented on May 20, 2024

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.

from docker-selenium.

BrennanRoberts avatar BrennanRoberts commented on May 20, 2024

Pushed #346 and looking for feedback.

from docker-selenium.

diemol avatar diemol commented on May 20, 2024

Hi all,

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

from docker-selenium.

diemol avatar diemol commented on May 20, 2024

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

from docker-selenium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.