Snap won't start without sudo

Hi !
Now that the jack1 interface is available for snapd - on the candidate channel - I’ve snap’ed a very cool piece of software called idjc - Internet DJ Console.
But I have a problem : the snap builds and installs without error, but I can’t run it without sudo :

yannick@heimdall:~/dev/idjc (master)$ type idjc
idjc est /snap/bin/idjc
yannick@heimdall:~/dev/idjc (master)$ idjc
/snap/idjc/x23/command-idjc.wrapper: 2: exec: /snap/idjc/x23/bin/idjc: not found
yannick@heimdall:~/dev/idjc (master)$ sudo idjc
Gtk-Message: 19:01:40.500: Failed to load module "canberra-gtk-module"
....

I must have missed something, but I don’t understant what.

My snapcraft.yaml file is at https://github.com/ymauray/idjc

Thanks in advance for your help !

Is there anything weird about the permissions on /snap/idjc/x23/bin/idjc or its parent directory?

Not that I can see :

yannick@heimdall:~$ ls -ld /snap/idjc/
drwxr-xr-x 4 root root 4096 jui 27 17:25 /snap/idjc/
yannick@heimdall:~$ ls -ld /snap/idjc/x23
drwxr-xr-x 11 root root 174 jui 27 17:24 /snap/idjc/x23
yannick@heimdall:~$ ls -ld /snap/idjc/x23/bin
drwxr-xr-x 2 root root 27 jui 27 17:24 /snap/idjc/x23/bin
yannick@heimdall:~$ ls -ld /snap/idjc/x23/bin/idjc
-rwxr-xr-x 1 root root 1131 jui 27 17:23 /snap/idjc/x23/bin/idjc

Maybe snapd wants to access a file somewhere ? but I don’t know how to find out which one.

1 Like

i’d assume the jack device in /dev/shm/jack-* is root owned ?
(i dont think the message comes from snapd but rather from your idjc binary)

The message comes from the shebang on the bin/idjc file referencing /usr/bin/python3. This needs to not use an absolute path or be absolute to /snap/idjc/current/usr/bin/python3.

Ah, that would explain, indeed !
So I need to add Python as dependency in snapcraft.yaml ?