diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0e14c401e5ea9a9b729eb95c1bb48718bdec9a55..c64dcc1cd63462bd45bde5c75c57844ec97cfb19 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -112,11 +112,13 @@ ELSEIF(UNIX)
 	endif ()
 
 	if(EXISTS "/etc/debian_version")
-	   set (PLATFORM "Debian")
+		set (PLATFORM "Debian")
+		ADD_DEFINITIONS("-DTARGET_OS_Linux_Debian")
 	endif(EXISTS "/etc/debian_version")
 
 	if(EXISTS "/etc/fedora-release")
-	   set (PLATFORM "Fedora")
+		set (PLATFORM "Fedora")
+		ADD_DEFINITIONS("-DTARGET_OS_Linux_Fedora")
 	endif(EXISTS "/etc/fedora-release")
 
 ELSE(WIN32)
diff --git a/kernel/src/kernel/player/ovkCOgreVisualisation.cpp b/kernel/src/kernel/player/ovkCOgreVisualisation.cpp
index 3f8116d3a649d6eb121e53b699598d1ab424a441..93b2b12aaca7b6cf7836943ebfe5a173c23cdd8c 100644
--- a/kernel/src/kernel/player/ovkCOgreVisualisation.cpp
+++ b/kernel/src/kernel/player/ovkCOgreVisualisation.cpp
@@ -11,6 +11,26 @@
 	#include "Overlay/OgreOverlaySystem.h"
 #endif
 
+#if defined(TARGET_OS_Linux_Fedora)
+	// @FIXME this is an awful hack to avoid crashes on our Fedora CI running on CloudStack VM.
+	// It seems that there we get difficult to track X11 errors from inside Ogre that
+	// 1) abort the application
+	// 2) do not seem to appear on a non-VM computer
+	// 3) seem to be of no concern to the automatic testing?
+	// Hence we just specify a dummy error handler until we can solve the problem.
+	#include <stdio.h>
+	#include <X11/Xlib.h>
+
+	static int errorHandlerHack(Display *display, XErrorEvent *event)
+	{
+		(void) fprintf(stderr,
+						"WARNING: Ignored Xlib error: error_code=%d, request_code=%d\n",
+						event->error_code,
+						event->request_code) ;
+		return 0 ;
+	}
+#endif
+
 using namespace std;
 using namespace Ogre;
 using namespace OpenViBE;
@@ -135,6 +155,10 @@ boolean COgreVisualisation::initializeOgre(void) throw (std::exception)
 			//init Ogre w/o creating a default window
 			m_pRoot->initialise(false);
 			m_bOgreInitialised = true;
+
+#if defined(TARGET_OS_Linux_Fedora)
+			XSetErrorHandler(errorHandlerHack);
+#endif
 		}
 
 #if (OGRE_VERSION_MAJOR > 1) || ((OGRE_VERSION_MAJOR == 1) && (OGRE_VERSION_MINOR >= 9))