Permission problem trying to package Bottles

Hi all snapcrafters!
I’m trying to package my application as a snap but I can’t get an executable build.

This is my current snapcraft.yml:

But when I try to run the dangerous installed snap, I get the following error:

`/snap/bottles/x2/snap/command-chain/snapcraft-runner: 6: exec: /snap/bottles/x2/usr/local/bin/bottles: Permission denied`

I have been around this forum for about a month, testing different fixes of those who have had the same problem as me but none of them seem to solve the problem.

I also tried using the desktop-launch command:

    command: bin/desktop-launch bin/bottles

but the following error come out:

Failed to generate snap metadata: The specified command 'bin/desktop-launch bin/bottles' defined in the app 'bottles' does not exist.
Ensure that 'bin/desktop-launch bin/bottles' is installed with the correct path.

I also tried using core20 but the behavior does not change.

My application is compiled and installed via meson and ninja and generates a binary in /usr/local/bin which works in other packages.

Who helps me understand where (for sure) I’m wrong?

The configuration is not complete, I know that once this problem is solved there will be others, for example for libhandy but I would like to get to the execution before proceeding to complete the configuration.

1 Like

If using desktop-launch, it should be something like:

    command: bin/desktop-launch $SNAP/usr/local/bin/bottles

But I don’t think you have desktop-launch installed given the yaml. Perhaps you want to use a gnome extension?

I have completely missed this:

    command: bin/desktop-launch $SNAP/usr/local/bin/bottles
    extensions: [gnome-3-34]

now it runs and I can move on to the next error. Thanks!


Just thought I’d mention that when using extensions, you don’t need to specify desktop-launch manually; but if you do specifically it manually, it’ll effectively be running twice resulting in slower startups and possibly some undefined behaviour. I’d recommend removing it from the command entry in this instance.

(Internally, extensions use an hidden command-wrapper entry instead, you can use snapcraft expand-extensions to see the end result and what else the extensions do, such as adding theme content snap entries).