Visualization problem

Hello, I’m trying to run an example and I get the following message:

# Use this open statement to create an OpenGL view:
/vis/open OGL 600x600-0+0
/vis/sceneHandler/create OGL
parameter value (OGL) is not listed in the candidate List.
  Candidates are: ASCIITree ATree DAWNFILE G4HepRepFile HepRepFile RayTracer VRML2FILE gMocrenFile TOOLSSG_OFFSCREEN TSG_OFFSCREEN TOOLSSG_OFFSCREEN TSG_OFFSCREEN TSG_FILE TSG
sub-command "/vis/sceneHandler/create" failed.
Registered graphics systems are:
  ASCIITree (ATree)
  DAWNFILE (DAWNFILE)
  G4HepRepFile (HepRepFile)
  RayTracer (RayTracer)
  VRML2FILE (VRML2FILE)
  gMocrenFile (gMocrenFile)
  TOOLSSG_OFFSCREEN (TSG_OFFSCREEN)
  TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE, TSG)
Default graphics system is: TSG_OFFSCREEN (based on build flags).
Default window size hint is: 600x600-0+0 (based on G4VisManager initialisation).
Note: Parameters specified on the command line will override these defaults.
      Use "vis/open" without parameters to get these defaults.

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
      issued by : G4UImanager::ApplyCommand
Invoked command has failed - see above.
Error code : 500
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

***** Illegal parameter (0) </vis/open OGL 600x600-0+0> *****

***** Batch is interrupted!! *****

while building the example I used the following instruction:

cmake -DCMAKE_INSTALL_PREFIX=/home/elisa/g4/geant4-v11.2.1-install /home/elisa/simulazione_GEANT4_SFGD/KDAR_G4/B5 -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_QT=ON -DGEANT4_USE_OPENGL_X11=ON

but I guess OpenGL doesn’t exactly work this way.
Is there a quick way to fix this?
I’m a beginner so this is all very new and complicated to me, sorry.

Geant4 Version: 11.2.1
Operating System: Ubuntu, Linux
Compiler/Version: 11.4.0
CMake Version:


Emphasis mine - these arguments only apply to the build of Geant4 itself, not applications using it. How did you build/install Geant4?

honestly I don’t quite remember… Should I just delete the previous geant4-build directory then use cmake specifying -DGEANT4_USE_OPENGL=ON?

If the build directory still exists, you don’t need to delete it. Just rerun cmake in it with any new arguments you want, then rebuild and resinstall. Doing

cd <to_your_Geant4_builddir>
cmake -DGEANT4_USE_QT=ON -DGEANT4_USE_OPENGL_X11=ON .
cmake --build .
cmake --install .

should be enough. Then rebuilding your example should pick up/use the resinstalled libraries with the GL/Qt capability enabled.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.