Gnome Commander snap revisited

Still trying to get GCMD running as snap, I’m at a point in desperate need for help. With some trick I managed to resolve dependancies, but the snap won’t run afterwards:

$ gnome-commander
Gtk-Message: 21:36:10.604: Failed to load module “gail”
Gtk-Message: 21:36:10.605: Failed to load module “atk-bridge”
Gtk-Message: 21:36:10.609: Failed to load module “canberra-gtk-module”

** (gnome-commander:15235): WARNING **: 21:36:10.609: Couldn’t load installed file type pixmap, trying to load …/pixmaps/gnome_cmd_arrow_up.xpm instead

** (gnome-commander:15235): WARNING **: 21:36:10.609: Can’t find the pixmap anywhere. Make sure you have installed the program or is executing gnome-commander from the gnome-commander-1.12.2/src directory

** (gnome-commander:15235): WARNING **: 21:36:10.610: Couldn’t load installed file type pixmap, trying to load …/pixmaps/gnome_cmd_arrow_down.xpm instead

** (gnome-commander:15235): WARNING **: 21:36:10.610: Can’t find the pixmap anywhere. Make sure you have installed the program or is executing gnome-commander from the gnome-commander-1.12.2/src directory
[…]

This is my snapcraft.yaml:

name: gnome-commander
version: 1.12.2
summary: Testversion of SNAP for GNOME Commander
description: |
GNOME Commander is a fast, flexible and well known file manager.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode
base: core20

#plugs:
#  gnome-3-38-2004:
#    interface: content
#    target: $SNAP/gnome-platform
#    default-provider: gnome-3-38-2004
#  gtk-3-themes:
#    interface: content
#    target: $SNAP/data-dir/themes
#    default-provider: gtk-common-themes
#  icon-themes:
#    interface: content
#    target: $SNAP/data-dir/icons
#    default-provider: gtk-common-themes
#  sound-themes:
#    interface: content
#    target: $SNAP/data-dir/sounds
#    default-provider: gtk-common-themes

slots:
  # for GtkApplication registration
  gnome-commander:
    interface: dbus
    bus: session
    name: org.gnome.gnome-commander

apps:
  gnome-commander:
    plugs:
      - desktop
      - desktop-legacy
      - gsettings
#      - wayland
#      - unity7
    desktop: usr/share/applications/gnome-commander.desktop
    extensions: [gnome-3-38]
    command: usr/bin/gnome-commander
#    command: bin/desktop-launch usr/bin/gnome-commander
     
    environment:
        LD_LIBRARY_PATH: $SNAP/usr/lib/gnome-commander
    ##  LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/gnome-commander

parts:
  desktop-gnome-platform:
    source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
    source-subdir: gtk
    plugin: make
    make-parameters: ["FLAVOR=gtk2"]
    build-packages:
      - build-essential
      - libgtk-3-dev
    override-build: |
      snapcraftctl build
      mkdir -pv $SNAPCRAFT_PART_INSTALL/gnome-platform
         
  gnome-commander:
    after: [desktop-gnome-platform]
    build-attributes: [debug]
    plugin: autotools
    autotools-configure-parameters: 
#       - --sysconfdir=
       - --prefix=/usr
#      - --exec-prefix=/usr
#      - --datarootdir=/usr/share
#      - --with-gnu-ld
    source: https://download.gnome.org/sources/gnome-commander/1.12/gnome-commander-1.12.2.tar.xz

    organize:
      snap/gnome-commander/current/usr: usr

    build-packages:
     - chrpath
     - libglib2.0-0
     - build-essential
     - itstool
     - libglib2.0-dev 
     - libxml2-utils
     - desktop-file-utils
     - gettext
     - gawk
     - gnome-common
     - gnome-pkg-tools
     - intltool
     - libgtk2.0-dev
     - libxml2-dev
     - libsoup2.4-dev
     - libunique-dev
     - libgnomevfs2-dev
     - file-roller
     - libavahi-glib1
     - libgconf-2-4
     - libgnomevfs2-0
     - libgtk2.0-0
     - libffi7
     - libexif-dev
    override-build: |
      echo "deb http://archive.ubuntu.com/ubuntu bionic universe" > /etc/apt/sources.list
      apt update
      snapcraftctl build
      glib-compile-schemas /root/parts/gnome-commander/install/usr/share/glib-2.0/schemas
      libtool --finish /root/parts/gnome-commander/install/usr/lib/gnome-commander/plugins
    stage-packages:
     - libavahi-glib1
     - libgconf-2-4
     - libgnomevfs2-0
     - libgtk2.0-0
     - libunique-1.0-0
     - libglib2.0-0
     - libxml2-utils
     - libffi7
     - libxml2
     - libgtk-3-0
     - libgtk-3-common
     - libexif12
     - libpango-1.0-0

Please let me know what may be done here.

Best regards

schollsky

Could you edit your post to show the snapcraft.yaml file as preformatted text? The easiest way to do this would be to add lines containing three backticks before and after. It’s hard to read as it currently displays.

1 Like

Sorry, hope it’s better now. :slight_smile:

1 Like