Problem with installation of Gate

I tried to install gate with sudo snap install gate. The installation worked fine, but when I want to open gate it sometimes says: update.go:85: cannot change mount namespace according to change mount (/snap/gtk-common-themes/1535/share/gtk2/Materia-compact /snap/gate/41/data-dir/themes/Materia-compact none bind,ro 0 0): cannot write to “/snap/gtk-common-themes/1535/share/gtk2/Materia-compact” because it would affect the host in “/snap” update.go:85: cannot change mount namespace according to change mount (/snap/gtk-common-themes/1535/share/gtk2/Materia-dark-compact /snap/gate/41/data-dir/themes/Materia-dark-compact none bind,ro 0 0): cannot write to “/snap/gtk-common-themes/1535/share/gtk2/Materia-dark-compact” because it would affect the host in “/snap” update.go:85: cannot change mount namespace according to change mount (/snap/gtk-common-themes/1535/share/gtk2/Yaru-MATE-dark /snap/gate/41/data-dir/themes/Yaru-MATE-dark none bind,ro 0 0): cannot use “/snap/gtk-common-themes/1535/share/gtk2/Yaru-MATE-dark” as bind-mount source: not a directory update.go:85: cannot change mount namespace according to change mount (/snap/gtk-common-themes/1535/share/gtk2/Yaru-MATE-light /snap/gate/41/data-dir/themes/Yaru-MATE-light none bind,ro 0 0): cannot use “/snap/gtk-common-themes/1535/share/gtk2/Yaru-MATE-light” as bind-mount source: not a directory

But sometimes it also starts without saying this. When it starts normal and I try to open a macro, it has problems with permissions. It says: I/O error : Permission denied I/O error : Permission denied I/O warning : failed to load external entity “./Materials.xml” I/O warning: Discard the previous warning if your simulation doesn’t transport OPTICAL PHOTONS. Otherwise, please copy the ./Materials.xml file from the gate-source directory in the directory where you run your main macro. I/O warning : failed to load external entity “./Materials.xml” I/O warning: Discard the previous warning if your simulation doesn’t transport OPTICAL PHOTONS. Otherwise, please copy the ./Materials.xml file from the gate-source directory in the directory where you run your main macro.

Do you know, what I did wrong and how I can solve this problem? I have that problem on two different computers. I am new using ubuntu, so I have no clue, what I can do. I also tried to open it with sudo, but it didn’t work out.

Thank you in advance, I hope, you can help me!

The top half isn’t a major issue, it sometimes happens and tends to resolve itself (across all snaps, not just the Gate one). At worst it means there might be some temporary issues with theming but usually resolves itself without any involvement on subsequent runs.

The second half depends on your simulation, you can download the materials.xml for Gate V9.2 here:

image

You’d place this file alongside your macro and it would (hopefully) remove the second warning. However depending on your simulation, you might not actually need this file at all.

I would recommend not running snaps with sudo though unless they’re designed for it, often it’ll cause permission issues that stick around in the caches. It might be worth running

sudo snap remove gate --purge
sudo snap install gate

To reset the app state back to defaults. There shouldn’t be another big download as the snap will still be cached.

Unfortunately despite publishing Gate, I’m very much not a user of it; so while I can validate it against the built in tests and believe it works well as a snap, you’d be likely better off asking for application specific help on the Gate mailings list. https://listserv.in2p3.fr/cgi-bin/wa?A0=OPENGATE-L

Thank you for your help!

I tried to copy the file to the same folder as my macro, but it still states the second error warning. Or did you mean another folder somewhere directly in the gate installation?

No, it should be in the current working directory of the Macro you’re in. The installation folder will be uneditable by design since it’s a snap.

To be sure this isn’t a snap confinement issue, it’s worth making a subfolder in home for your project, e.g, $HOME/mygatemacro/, and you’d put Materials.xml as $HOME/mygatemacro/Materials.xml while running gate from $HOME/mygatemacro.

Thank you! I finally make it work! Now, I got a new problem, because I think the visualization OGL does not work, propably because it’s not included in the download of gate via snap. Do you have any idea how to solve that? Otherwhise I’ll ask in the other forum you suggested. When I try to use: /vis/open OGL it states: -------- WWWW ------- G4Exception-START -------- WWWW ------- *** G4Exception : UIMAN0123 issued by : G4UImanager::ApplyCommand “OGLSQt” is not compatible with your chosen session, and no fallback
system found. 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
(short names): ATree DAWNFILE HepRepFile OGL OGLI OGLIQt OGLS OGLSQt RayTracer
RayTracerX VRML2FILE gMocrenFile Error code : 1 *** This is just a warning message. *** -------- WWWW -------- G4Exception-END --------- WWWW ------- And I tried to install it with: sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev

But it did not make it work.

Thank you and kind regards!

Just to confirm, are you running Gate --qt? I don’t think you can open the OpenGL viewer from the pure CLI version, you’d need to start the GUI in advance.

Thank you! I think, that was the problem! Before we reinstalled the program, the visualization worked also from CLI version, but I think it was due to the singularity exec mode we opened the program with.

Thank you so much for your help! :slight_smile:

Hello again. I tried to use Gate --qt on my other computer as well, but here I get a new error warning. I really don’t know why, because I did the same thing on both computers. It says: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. qt.qpa.plugin: Could not find the Qt platform plugin “wayland-egl” in “” This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

CAUGHT SIGNAL: 6 ### address: 0x3e80000156c, signal = SIGABRT, value = 6, description = abort program (formerly SIGIOT).

Backtrace: [PID=5484, TID=-2][ 0/15]> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb) [0x7f507abff00b] [PID=5484, TID=-2][ 1/15]> /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b) [0x7f507abde859] [PID=5484, TID=-2][ 2/15]> /snap/gate/41/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x85aad) [0x7f507f5caaad] [PID=5484, TID=-2][ 3/15]> /snap/gate/41/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5(_ZN22QGuiApplicationPrivate25createPlatformIntegrationEv+0x111e) [0x7f5079e0a7ae] [PID=5484, TID=-2][ 4/15]> /snap/gate/41/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5(_ZN22QGuiApplicationPrivate21createEventDispatcherEv+0x38) [0x7f5079e0b708] [PID=5484, TID=-2][ 5/15]> /snap/gate/41/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN23QCoreApplicationPrivate4initEv+0xae5) [0x7f507f7d1f55] [PID=5484, TID=-2][ 6/15]> /snap/gate/41/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5(_ZN22QGuiApplicationPrivate4initEv+0x33) [0x7f5079e0d543] [PID=5484, TID=-2][ 7/15]> /snap/gate/41/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(_ZN19QApplicationPrivate4initEv+0xd) [0x7f507a4483bd] [PID=5484, TID=-2][ 8/15]> /snap/gate/41/usr/local/lib/libG4interfaces.so(ZN4G4QtC2EiPPcS0+0xf6) [0x7f507faeb746] [PID=5484, TID=-2][ 9/15]> /snap/gate/41/usr/local/lib/libG4interfaces.so(ZN4G4Qt11getInstanceEiPPcS0+0x55) [0x7f507faeb8b5] [PID=5484, TID=-2][10/15]> /snap/gate/41/usr/local/lib/libG4interfaces.so(_ZN6G4UIQtC1EiPPc+0x26c) [0x7f507fad5b2c] [PID=5484, TID=-2][11/15]> /snap/gate/41/usr/local/lib/libG4interfaces.so(_ZN13G4UIExecutiveC2EiPPcRK8G4String+0x664) [0x7f507fab8064] [PID=5484, TID=-2][12/15]> /snap/gate/41/usr/local/bin/Gate(+0xe6dc3) [0x5557eaca6dc3] [PID=5484, TID=-2][13/15]> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f507abe0083] [PID=5484, TID=-2][14/15]> /snap/gate/41/usr/local/bin/Gate(+0x12a58e) [0x5557eacea58e]

: Aborted (Signal sent by tkill() 5484 1000) Aborted (core dumped)

Thank you in advance and I’m sorry for bothering you again!

Hello,

Apologies on the delay; real life has been hectic lately.

I’ve finally gotten around to upgrading Gate to v9.3. Alongside it comes Core22 as the base snap and all the goodies that brings (relevant to this post, Mesa libraries and Qt, which would play a huge part in the GUI not working).

Hopefully this might sort out your other machine. It’s on the store now, so if you haven’t gotten Gate 9.3 automatically by the time you read this, you should be able to run sudo snap refresh (as long as Gate isn’t running already!).

I think essentially the problem was that the GUI wouldn’t work on Wayland due to missing Wayland libs in the snap and some old logic in the script that sets up the sandbox (Snapcraft Desktop Helpers for those in the know) demanding Wayland is used even if the libs aren’t there. The libs are still missing, but I’ve changed the desktop-launch script a little to force XWayland to be used until I have the time in the future to look into it proper.

(QT_QPA_PLATFORM being the main culprit for anyone interested).