I have a code in ubuntu server that needs to create opengl context therefore it is required to have a window object. I installed Nvidia drivers (there is a gpu on the machine) and xorg. Rendering must be done with the gpu. Then I created a virtual display using xvfb and set the DISPLAY variable accordingly. But window creation always fails, however the virtual display seems to be working. I tried using x apps on it, (xeyes etc) and scrot to capture the state of the screen and it seem fine. What to do?

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.