Check if display is available
The application I work on uses VTK for visualization. Sometimes, no display is available, e.g. because one runs the application on a server. This leads to segmentation faults in the call to XSync
in vtkXRenderWindowInteractor::Initialize()
.
It seems like every way I could use VTK to test for the existence of a display - e.g. by calling vtkRenderWindow::GetScreenSize - aborts program execution if no display is found, so it seems like VTK at the moment can't be used to check if a display is available and I have to write custom, e.g. X11 and therefore system dependent code.
Am I missing something there? Otherwise I would like to request the ability to check whether a display is available before VTK aborts the program or the ability to catch the error VTK throws when no display is available as a feature.