My snap-installed app is a wxWidgets application. It runs fine after compilation and linkage, but it doesn't work once installed from a snap. I'm assuming that when I type the name of my app, that perhaps 'snapd' goes and runs the wrapper under the /snap/<myappname>/x1/ directory. In any case, I get...

Gtk-Message: Failed to load module "overlay-scrollbar"
Gtk-Message: Failed to load module "gail"
Gtk-Message: Failed to load module "atk-bridge"
Gtk-Message: Failed to load module "unity-gtk-module"
23:11:06: Error: Unable to initialize GTK+, is DISPLAY set properly?

My only guess is that not all dependencies are found and placed inside the /snap/<mayappname>/x1/usr/lib/x86_64-linux-gnu/ directory by snap install. I tried to test this hypothesis in two ways. First, by running out of the prime directory before installation, but the bug isn't reproducible there. And second, by copying what I believed to be the needed libraries into the said directory, but it is read-only, even if I change the snapcraft confinement to devmode and use the --devmode flag during installation, and even if I try chmod 777 . as root for crying out loud.

If anyone is interested in taking a look at my stupid project, it can be cloned from...


The snapcraft.yaml file is configured to run off of scons. I wouldn't try snapcrafting in the project root. I copy the snapcraft.yaml file over to some other directory before trying that.

I've come a long way and feel so close to actually making this thing work...just one road-block after another...I suck.

1 Answer 1


So let's take this appart as there are many issues here:

Running from prime

When you run from prime straight of from your classic system you will see all the libraries your classic system has so it is not really the best way to do it. When run as a snap the root filesystem that is actually seen is, in this case, ubuntu-core or core.

In order to experience what the environment will feel like, it might be better to hop into a shell for that environment, you can do so by running:

snap run --shell <snap-name>.<app-name>

Read only snap

Snaps when installed for an actual snap are a mount to a squashfs, this filesystem is read only and the reason you cannot write and make modifications to the installed snap.

During development it might be better to do from your project directory:

snap try prime [--devmode]

By doing so, you can make live edits to your prime directory to test out variations of things.

Getting the app to launch

The module load warnings are not that bad, they happen on some snaps as well. What is bad is that it cannot find a display. To get started quickly there are desktop launchers that can get you bootstrapped pretty fast.

They are delivered as parts, to get a feel for how this works out with snapcraft, run

snapcraft update
snapcraft search desktop

And to see what one of these parts do, run

snapcraft define <part-name>

There is more information about desktop launchers available on https://insights.ubuntu.com/2016/07/06/ubuntu-app-developer-blog-announcing-new-snap-desktop-launchers/

  • Thank you for your help; you've given me a lot to go on here. I'll have to do some more work now with the direction you've given me. Clearly I still have a lot to learn about snaps. Sep 9, 2016 at 18:39
  • Thanks again. I was able to add the desktop-gtk2 bootstrapper for my snap, and that worked. Admittedly, there is a lot of "black magic" going on with all this snapping in the sense that...while I've gotten things to work, I still don't know exactly what I'm doing. sigh...line upon line...precept upon precept. Sep 10, 2016 at 4:57
  • To be fair, all this black magic is what distros generally do for you anyways :-)
    – sergiusens
    Sep 14, 2016 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.