Hi all! I have run into this old thread because I’m facing the same exact problem with MacOs Ventura 13.3.1.
Following the suggestions I found here, I’ve checked my X11 installation and I have the same configuration as @allison, meaning:
- Geant4 compiled with OpenGL capabilities, and X11 found as:
and my installation being

and

I found the following error message when I try to run my G4 application in visual mode:
G4OpenGLXViewer::G4OpenGLXViewer couldn’t open display.
G4OpenGLStoredX::CreateViewer: error flagged by negative view id in G4OpenGLStoredXViewer creation.
Destroying view and returning null pointer.
ERROR in G4VisManager::CreateViewer: null pointer during OpenGLStoredX viewer creation.
No action taken.
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
WARNING: No viewer created.
Error code : 1
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Invoked command has failed - see above. Available graphics systems are:
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)
OpenGLImmediateX (OGLIX, OGLI)
OpenGLStoredX (OGLSX, OGL, OGLS)
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG)
Error code : 1
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
***** Illegal parameter (1) </vis/open OGL> *****
***** Batch is interrupted!! *****
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (1)
Error code : 1
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
What seems odd to me is that OGL is stored among the registered graphics systems, yet it says: Illegal parameter (1) </vis/open OGL>
.
Do you have any clue about what is going on here?
Thanks!