I am trying to run a macro in interactive mode. For example: ./executable vis_macro.mac.
The vis_macro.mac works fine but it stops at /vis/scene/create, as follows:
***** COMMAND NOT FOUND </vis/scene/create> *****
***** Batch is interrupted!! *****
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (100)
Error code : 100
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
The code works fine in batch mode (when I cancel out /vis/… commands). But I would also like to visualize it sometimes.
PS when I run the executable alone (./executable) it gives a different error:
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 19 (X_DeleteProperty)
Resource id in failed request: 0x0
Serial number of failed request: 100
Current serial number in output stream: 104
Can you not start with a clean environment, then set the G4 environment as described in the Installation Guide - source geant4make.sh? (That might be source geant4.sh.)
But for many years now, I think, you do not need any VIS environment variables if you follow the Installation Guide…
If you cannot figure out how to start with a clean environment, there is an unset shell command. Try
env | grep G4 # to see what G4 environment variables have been set
unset G4VIS_NONE # for example