Batch Diana on Headless Systems

Normally, Diana is configured to run on systems with an X server, using OpenGL for accelerated rendering of maps and data. When running Diana in batch mode with the bdiana tool, nothing is displayed on the screen via the X server, but the user is often running bdiana on a system with an X server present. When building Diana normally, the bdiana tool that is produced is linked to the X libraries on the system and can be run by users on workstations without problems.

On servers, where it is not desirable to run an X server, we cannot use the bdiana tool produced by the normal Diana build without some kind of X server. Traditionally, Xvfb has been used to provide the support that this version of bdiana needs to run. However, this was not always a reliable solution, so we have used an alternative configuration of Diana to produce a version of bdiana that runs without an X server. This does two things to avoid dependencies on X:

It uses a custom build of the Qt libraries that do not depend on X libraries.

It provides a wrapper that redirects OpenGL calls to Qt, rendering products entirely in software. Only the subset of OpenGL functions that Diana uses are wrapped.

Building Qt

We build an alternative set of Qt libraries using the standard Qt 4.8.1 sources, applying some patches and using an “embedded” configuration to remove the dependency on X.

The patches we use are part of the Debian packaging we use to build packages for Ubuntu 12.04. These can be obtained from a git repository:

git clone https://projects.met.no/~davidb/projects/qt4-headless/git qt4-headless

The standard Debian package building process involves applying the patches found in the debian/patches directory to the Qt 4.8.1 sources then running the configure script in the way described in the debian/rules file.

Configuring Diana

Note: This is a work in progress. More details to be added.