Hello everyone,
I’m working on making a snap package for a java swing/fx app. I am using core22 and the gnome extension:
name: autopsy
base: core22
confinement: strict
...
apps:
autopsy:
extensions: [gnome]
...
This appears to work fine on xubuntu 22.04, but I’m hitting issues on other OS’s (i.e. Fedora, Mint, Ubuntu 20.04). Specifically:
(java:8048): Gtk-WARNING **: 11:07:39.254: GTK+ module /snap/autopsy/x1/gnome-platform/usr/lib/gtk-3.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
I looked into it a bit, (I did snap try
and launched it into sh
), and from the snap’s view nothing of consequence is at that gnome-platform
path. I also looked at the env vars that were set, and it looks like I have a bunch pointing to $SNAP/gnome-platform
that I’m assuming are coming from the gnome
extension, but don’t seem to point to much of anything.
For diagnostic purposes, I added this env var change: export GTK_PATH=/snap/gnome-42-2204/120/usr/lib/x86_64-linux-gnu/gtk-3.0:/snap/gnome-42-2204/120/usr/lib/gtk-3.0
, pointing the GTK_PATH to where the snap could see it. That seemed to work at least well enough for the GUI to launch, but I don’t think that’s a long term fix.
Is there something I should be doing to configure either my snapcraft.yaml
or the gnome
extension specifically so that the application launches properly?