Geant4 OGL visualiztion in Ubuntu 23.04

Hello I am having an issue with the OGL visualization after upgrading my Ubuntu from 22.04 to 23.04
I am having the following problem

Geant4 Version: 4.10.07.p04
Operating System: Ubuntu
Compiler/Version: 23.04
CMake Version: 3.25.1
Basically the visualization crashes.
Can anybody help me to figure out how can I try to fix this issue?
Thanks much in advance.
The snapshot of example B1 visualization is the following:

Hi @chchatte

You can try to reinstall directly from synaptic package manager;

libopengl-dev  libopengl0 x11-utils


Hi chchatte

It looks like all the ingredients are there and built into your app - Qt and OpenGL.

When you say “the visualization crashes”, could you give some more details. In particular:

  • What is the last thing printed in the output window (you may have to scroll down.

  • What error messages, if any, appear on the terminal from which the application was launched.


Hi @allison sorry for the late reply.
Yes everything was built up as I was using Geant4 since a while without any difficulties.
This ‘crash’ to be honest came without any big error messages. Other than the fact that ‘wayland’ is not supported or something like that. Upon investigation and googling I found that the ‘XDG_SESSION_TYPE=x11’ can be of help. After enabling the x11 session type, the display is working well. I am not sure, if I call this as a ‘solution’, but definitely this workaround works for me.

Hi chchatte.

Thanks for letting us know. This will be very useful know-how for other Unbuntu users.


Hi @allison,
I forgot last time to attach the link where I found the work-around. I am attaching the link here, I guess cross referencing does not violate the forum’s rule…


Good to know.