Unfortunately, that isn't feasible, because VirtualGL relies upon Direct
Rendering to handle most of the OpenGL commands. That's why VGL only
intercepts GLX commands and a few OpenGL commands-- basically everything
that's necessary to manage the redirecting of OpenGL contexts from the
2D X server to the 3D X server and from windows to Pbuffers, but nothing
more. Once an OpenGL context has been redirected into a Pbuffer on the
3D X server, VirtualGL gets out of the way, and OpenGL commands pass
through unimpeded until the frame has finished rendering. What you
propose would require a full OpenGL interposer, which would be a
maintenance nightmare given that OpenGL changes so frequently. Also,
there's the matter of what to do with the OpenGL commands once they
reach the hypothetical IPC server. Unless that IPC server was somehow
in-process with the 3D X server, the IPC server would be limited in its
ability to pass OpenGL commands to the 3D X server in much the same way
that VirtualGL is limited. I made an active decision in 2004 not to
create a full OpenGL interposer, for reasons described here:
https://virtualgl.org/About/Background. If you did want to build such a
solution, you'd be better off basing it on the Mesa source, since Mesa
keeps track of changes in the OpenGL API and already provides
dispatching mechanisms.
In general, the 3D X server in a VirtualGL server should be thought of
as a shared resource, and it shouldn't be used for any
security-conscious activities. If you need to use a local X server on
the VirtualGL server, then I strongly recommend configuring two X
servers-- one headless that is dedicated to VirtualGL and another one
that can be used for local activities. In a VirtualGL environment, it
doesn't really matter if an application takes over the keyboard and
mouse on the 3D X server, because VirtualGL is only using the 3D X
server to execute GLX commands. And VirtualGL is designed to run at the
display manager login prompt, which prevents anyone from having
unrestricted access to a local desktop.