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?