Runtime selection between headless, offscreen, and onscreen rendering modes in ParaView

This blog documents a major change introduced in ParaView 6.0.0. It also applies to VTK 9.5.0
The ParaView command-line executables pvserver
, pvpython
and pvbatch
now support all three modes of rendering – headless, offscreen, and onscreen in one build. The rendering backend is automatically selected at runtime based upon the system capabilities such as availability of an X server or EGL drivers.
Use the new --opengl-window-backend
command-line option to specify the OpenGL window backend used in these applications. Supported values are: ‘GLX’, ‘EGL’, ‘OSMesa’, and ‘Win32’. If not specified, the default backend is used. The default backend is determined by the build configuration and the hardware configuration of the machine automatically.
You can also force use of a specific backend by setting the environment variable VTK_DEFAULT_OPENGL_WINDOW
to any of these values:
vtkOSOpenGLRenderWindow
for software headless rendering with OSMesa on Linux and Windows.vtkEGLRenderWindow
for hardware accelerated headless rendering on Linux.vtkXOpenGLRenderWindow
for non-headless rendering on Linux.vtkWin32OpenGLRenderWindow
for non-headless rendering on Windows.
Note: the --opengl-window-backend
command-line option and environment variable VTK_DEFAULT_OPENGL_WINDOW
are not supported in the ParaView GUI client.
Note: the universal binary for Linux platform requires that the system has X libraries installed. In the future, we will further improve the logic so that even the X library is deferred to runtime and only loaded if it exists.