Host screen turns off when I start X server in docker container

﹥>﹥吖頭↗ 提交于 2019-12-04 09:45:33
Adrian Mouat

I don't think this is going to work - you're effectively trying to use two X servers - the host and the container - and I suspect they are both expecting to have exclusive use of the video card.

What you can do instead is use the X server on the host from the container by bind-mounting the X Server socket. This SO answer explains how: https://stackoverflow.com/a/25334301/4332

I'm not sure this will help in your particular case, but I don't entirely understand why you need an XServer running in the container at all. I think you should still have access to the GPU with --privileged.

If you don't mind using CPU for OpenGL, you can set up an X server inside the container with the Xdummy video driver with GLX extensions. But of course you won't be able to see a thing because the video driver is, well, dummy.

If you do want to play with GUIs, try TurboVNC + VirtualGL and use the Xdummy server as the 3D X server.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!