diana:batch_diana_on_headless_systems

This is an old revision of the document!


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:

  1. It uses a custom build of the Qt libraries that do not depend on X libraries.
  2. 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.

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.

If you are patching the files by hand then you should enter the sources directory and run a command of the following form on each of the patches in ascending numerical order; for example:

patch -p1 < ../qt4-headless/debian/patches/metno_00_remove_qpicture_checksum.diff
patch -p1 < ../qt4-headless/debian/patches/metno_01_identitymodel_feature_fix.diff
patch -p1 < ../qt4-headless/debian/patches/metno_02_wms_configuration.diff
patch -p1 < ../qt4-headless/debian/patches/metno_03_dummy_screen.diff
patch -p1 < ../qt4-headless/debian/patches/metno_04_qpa.diff

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

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • diana/batch_diana_on_headless_systems.1396014015.txt.gz
  • Last modified: 2022-05-31 09:23:14
  • (external edit)