0

I am using vncserver to connect to a CentOS7 machine in the network. In order to make use of 3D graphics accelerations I am using VirtualGL. So any OpenGL program needs to be launched with vglrun to make use of OpenGL.

This works like a charm but only if I log myself in on DISPLAY 0 and launch at least one OpenGL application beforehand. In other words:

If I

  • reboot the machine,
  • directly start a vncserver and
  • connect to it with a client,

no OpenGL application is working and I get the error

[VGL] ERROR: Could not open display :0.

As soon as I log myself in on DISPLAY 0 and start an OpenGL application the error does not occur anymore until the machine is rebooted again.

My question:
How can I run OpenGL applications with vglrun without first running an OpenGL application on DISPLAY 0 after rebooting the machine?

Woltan
  • 81
  • 1
  • 2
  • 7

1 Answers1

0

As posted in this question: Setting up vnc server and no physical display : Ubuntu 16.04 LTS

The solution to the problem is to have the following lines in /etc/X11/xorg.conf:

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    Option         "AllowEmptyInitialConfiguration" "True" # <-- This line is new
    EndSubSection
EndSection
Woltan
  • 81
  • 1
  • 2
  • 7