Trying to learn Snap packaging and getting stuck

Hello guys, I’m trying to learn how to snap and so I picked a relatively simple app called Geopard (GitHub - ranfdev/Geopard: Colorful, adaptive gemini browser) that already has a flatpak, meaning it can run in a sandbox.

However, no matter what I try, I encounter this error.

(geopard:18193): GLib-GIO-ERROR **: 14:33:58.950: No GSettings schemas are installed on the system
Trace/breakpoint trap (core dumped)

in my snapcraft.yaml I tried dumping the tar.gz with the source code and manually moving the files to their respective locations (resources.gresource is needed in the location too. It would refuse to open with a different error unless I manually placed it to its location). I also staged the gsettings-desktop-schemas package. Even specified the gsettings plug.

I feel like I’m doing something fundamentally wrong but can’t figure out what

My snapcraft.yaml

name: geopard
base: core24
version: '1.6.0'
summary: Geopard is a browser for the Gemini protocol
description: |
  Geopard is a browser for the Gemini protocol, that is, a lighter alternative to the web.
  Use Geopard to browse the space and reach hundreds of Gemini capsules!
  Read stories, download files, play games...

grade: devel
confinement: devmode
layout:
  /usr/share/geopard:
    bind: $SNAP/usr/share/geopard

parts:
  resources:
    plugin: dump
    source: https://github.com/ranfdev/Geopard/releases/download/v1.6.0/geopard-1.6.0.tar.xz
    source-type: tar
    organize:
      "build/data/resources/resources.gresource": usr/share/geopard/resources.gresource
      "build/data/com.ranfdev.Geopard.gschema.xml": usr/share/glib-2.0/schemas/com.ranfdev.Geopard.gschema.xml

  geopard:
    source: https://github.com/ranfdev/Geopard/releases/download/v1.6.0/geopard-1.6.0.tar.xz
    plugin: meson
    build-packages:
      - libglib2.0-dev
      - libgtk-4-dev
      - rustc
      - cargo
      - libssl-dev
      - pkg-config
      - meson
      - gettext
      - libadwaita-1-dev
      - desktop-file-utils
      - python3
      - python3-gi
      - python3-pip
      - libglib2.0-bin
    meson-parameters:
      - "--prefix=/usr"
    stage-packages:
      - libgtk-4-1
      - libglib2.0-0
      - libssl3
      - libadwaita-1-0
      - libappstream5
      - libcurl3t64-gnutls
      - libldap2
      - libnghttp2-14
      - libpsl5t64
      - librtmp1
      - libsasl2-2
      - libssh-4
      - libstemmer0d
      - libxmlb2
      - gsettings-desktop-schemas

apps:
  geopard:
    command: usr/bin/geopard
    plugs:
      - wayland
      - x11
      - network
      - network-bind
      - opengl
      - home
      - gsettings
    

Hi tsugu-sk!

It looks like the issue here likely involves integration with GNOME. I was able to launch Geopard with your project file, all I changed was adding the GNOME extension to the geopard app entry. Note you can probably remove some of the plugs here too now since they’re implicitly added by the GNOME extension:

apps:
  geopard:
    command: usr/bin/geopard
    extensions: [gnome]
    plugs:
      - wayland
      - x11
      - network
      - network-bind
      - opengl
      - home
      - gsettings

Looks like this made a new set of warnings though - take a look and let me know if this fixes your issue or if it’s just replacing one set of problems with another :smile:

❯ geopard
touch: cannot touch '/home/imani/snap/geopard/common/.cache/desktop-runtime-date': No such file or directory
libpxbackend-1.0.so: cannot open shared object file: No such file or directory
Failed to load module: /home/imani/snap/geopard/common/.cache/gio-modules/libgiolibproxy.so
Warning: Schema “org.gnome.system.locale” has path “/system/locale/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy” has path “/system/proxy/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.http” has path “/system/proxy/http/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.https” has path “/system/proxy/https/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.ftp” has path “/system/proxy/ftp/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.socks” has path “/system/proxy/socks/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
/snap/geopard/x2/gnome-platform/usr/lib/x86_64-linux-gnu/gtk-4.0/4.0.0/media/libmedia-gstreamer.so: undefined symbol: gdk_cicp_params_set_matrix_coefficients
Failed to load module: /snap/geopard/x2/gnome-platform/usr/lib/x86_64-linux-gnu/gtk-4.0/4.0.0/media/libmedia-gstreamer.so
com.ranfdev.Geopard

(geopard:134434): Gtk-WARNING **: 14:44:32.503: No IM module matching GTK_IM_MODULE=fcitx found
1 Like

Many thanks! I will check how well this works when I get to my computer. Admittedly I have no clue what those files it can’t access do, so we will see.

if it’s just replacing one set of problems with another

Not at all, an app launching is better than refusing to launch with an error.