VirtualGL / virtualgl

Main VirtualGL repository

Home Page:https://VirtualGL.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After logging into the gdm3 desktop session, /tmp/.X11-unix/X0 disappears

julee opened this issue · comments

Version:
virtualgl: 3.1-20230315
System: Ubuntu 22.04.3 LTS
gdm3: 42.0-1ubuntu7.22.04.3

Question:
I installed and configured virtualgl according to the document.
After restarting the computer, without logging in to the desktop session, I connected to the computer through ssh, exported DISPLAY=:0, xauth merged /etc/opt/VirtualGL/vgl_xauth_key, and used glxinfo to confirm the normality of the current opengl (nvidia). At this time, the file /tmp/.X11-unix/X0 exists.

Keeping the current ssh session, log into the user desktop environment from gdm. At this time, /tmp/.X11-unix/X0 disappeared, only the desktop session corresponding /tmp/.X11-unix/X1.
At this time, opengl can no longer be used in the ssh session.

Howerver, if I log out from the desktop session, /tmp/.X11-unix/X0 will be restored, and the original SSH session can continue to use opengl.

I checked syslog, xorg and other logs, but did not find any useful help.

Is there any way to find a solution?

commented

That's just the way GDM works. It uses a separate X server for the greeter and the session. If you know you are logged in, then you can pass -d :1 to vglrun, and VirtualGL will use the session's X display as the 3D X server. Then once you log out, you can go back to using vglrun with no arguments (because :0 is the default value for VGL_DISPLAY/vglrun -d.) However, note that logging in or logging out will disrupt any applications currently running with VirtualGL. VirtualGL is most commonly deployed in multi-user environments with headless X servers, and no one ever logs in locally on such systems. It still works for single-user remote workstation access, but you have to understand what the display manager is doing so you can work around it.

You can also use VirtualGL with an EGL device by passing -d egl to it. That way, it will not use the 3D X server at all. But using VirtualGL with an EGL device may have compatibility issues, particularly with legacy applications. (I am slowly but surely working through the compatibility issues with that mode of operation.) You can also use LightDM instead of GDM, since LightDM still uses the same X server for the greeter and session. But note that logging out will still disrupt applications running with VirtualGL, because LightDM resets the X server.