Available UI session types: [ Qt, tcsh, csh ] Invalid MIT-MAGIC-COOKIE-1 keyqt.qpa.xcb: could not connect to display :0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found

Yes, run then build, and then it should be possible to run the executable

$ cd $HOME/geant4/geant4-11.0.0/examples/basic/B1-build
$ rm -Rf ./*
$ cmake -DCMAKE_PREFIX_PATH=$HOME/geant4/geant4-v11.0.0-install ..
$ make
$ ./exampleB1