It appears from your run.sh script that both the 3D X server and the VNC server are running on the host instead of in the Docker container. In that case, I don't really understand why all of the xauth stuff is necessary. Can't you just share your existing ~/.Xauthority file with the Docker container with read/write access? In fact, you wouldn't even necessarily need to open up the 3D X server to all users. You could still use the vglusers group if you wanted. You would just need to run 'xauth merge /etc/opt/VirtualGL/vgl_xauth_key' to add the 3D X server cookie to ~/.Xauthority prior to starting the Docker instance. Otherwise, your basic approach seems reasonable to me.
If I've misunderstood and you are actually running one of the X servers (3D X server or VNC server) inside of the Docker container, then my answer would be different. The answer I gave in the linked thread below assumed that the 3D X server was running inside of the Docker container. That appears to be the case with the plumbee Dockerfile you posted. In your case, however, if there is no X server running in the Docker container, then you don't need to run vglserver_config in the Docker container at all. It appears that your run.sh sets things up so that the Docker container makes X connections out to the host, so that simplifies things considerably. In that case, your Docker container only needs the X11 and OpenGL client libraries, plus the VirtualGL faker libraries. It doesn't need any of the Xorg server infrastructure. On 8/17/18 8:53 AM, romangrothausmann wrote: > Hi DRC > > > Following > https://groups.google.com/d/msg/virtualgl-users/BHF8rHMeeh4/QgmTskSaAAAJ > and > https://github.com/plumbee/nvidia-virtualgl/blob/6ee0057490f192f2a2e0f9692b7103aeddc830b7/Dockerfile > I created a dockerfile for VGL accelerated ITKSnap docker image > (https://gitlab.com/romangrothausmann/dfitksnap/blob/itksnap-3.4_Qt4_VGL/) > which seem to work fine on a host with nvidia GPUs, drivers and > nvidia-docker2. > > Would you say the VGL configuration is appropriate? E.g. you recommended > +t while plumbee uses -t: > https://gitlab.com/romangrothausmann/dfitksnap/blob/49c4b7f4b90ade9eeace7296d2b20b1997431589/Dockerfile#L75 > In addition to what is recommended for X11 apps from within docker > (http://wiki.ros.org/docker/Tutorials/GUI#The_isolated_way) I had to add > both the 3D acc. X-display as well as the VNC display used for displaying: > https://gitlab.com/romangrothausmann/dfitksnap/blob/49c4b7f4b90ade9eeace7296d2b20b1997431589/run.sh#L9 > Is that the correct way for X11 with VGL over VNC? > With vglconnect (avoiding VNC) I get an error similar to: > ITK-SNAP: cannot connect to X server localhost:10.0 > Do I need to determine the display for the xauth setting differently then? > > VGL is great! Many thanks for continuous development, maintaining and > supporting. > > Best, > Roman -- You received this message because you are subscribed to the Google Groups "VirtualGL User Discussion/Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/virtualgl-users/d562a0b8-8039-679c-8abe-fc2e6cda57c8%40virtualgl.org. For more options, visit https://groups.google.com/d/optout.
