thank you for your reply.
My version of WSL2 is the latest version. I built geant4 again with the following command
GEANTDIR=/home/dboccanfuso/geant4_local/geant4-v11.2.1
cmake -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_QT=ON -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/qt5 -DCMAKE_INSTALL_PREFIX=$GEANTDIR-install $GEANTDIR
Then, when I run any example I get errors like those that I showed in my previous reply. Then I used the command vis/open TSG and it works! The ‘default’ viewer that is giving me trouble is (OpenGLStoredQt), while after running the command you wrote it becomes (TOOLSSG_QT_GLES).
Is there a way to set it as the default viewer?
On a side note, I have to start an X server manually, otherwise nothing happens.