Eclipse UI tests fail with gtk_init_check() on a Redhat Jenkins server Eclipse UI tests fail with gtk_init_check() on a Redhat Jenkins server jenkins jenkins

Eclipse UI tests fail with gtk_init_check() on a Redhat Jenkins server


A virtual desktop must run. One can use Xvfb for this as described at http://www-01.ibm.com/support/docview.wss?uid=swg21421214. On Redhat one can use:

yum install xorg-x11-server-XvfbXvfb :5 -screen 0 1280x1024x8 -fbdir /tmp &export DISPLAY=:5

The number for the display can be chosen arbitrarily. In the Jenkins job the environment variable must be set as well (via set-env plugin).

For enabling this for all jobs a script as desribed here: https://superuser.com/questions/319040/proper-way-to-start-xvfb-on-startup-on-centos should be setup with chkconfig. Finally the environment variable DISPLAY should be made available by adding a shell script to /etc/profile.d/ which contains the sole line:

export DISPLAY=:5

During experimenting I set the default runlevel to 5 in /etc/inittab/ but I did no further research whether this is strictly necessary.