Mpris support on 16.04 missing?

I just pushed an Auryo snap to the store. It’s an electron app which streams audio from soundcloud. Read more about it over on OMGUbuntu. It supports mpris, and on 17.10 this works…

On 16.04 it doesn’t…

I haven’t tested this on any other distros or desktops, as these are the main two I have to hand. Is this a known bug, being tracked?

Are there any security policy denials? Does it work if you logout and back in? /me wonders if this has something to do with indicator-sound

Tested from a clean boot.

alan@cleanamd64:~$ snappy-debug.security scanlog
INFO: following '/var/log/syslog'. If have dropped messages, use:
INFO: $ sudo journalctl --output=short --follow --all | sudo snappy-debug.security scanlog
sysctl: permission denied on key 'kernel.printk_ratelimit'
= AppArmor =
Time: Nov  7 17:33:42
Log: apparmor="DENIED" operation="open" profile="snap.auryo.auryo" name="/etc/xdg/user-dirs.conf" pid=2920 comm="xdg-user-dirs-u" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /etc/xdg/user-dirs.conf (read)
Suggestion:
* adjust program to read necessary files from $SNAP, $SNAP_DATA, $SNAP_COMMON, $SNAP_USER_DATA or $SNAP_USER_COMMON

= AppArmor =
Time: Nov  7 17:33:42
Log: apparmor="DENIED" operation="file_mmap" profile="snap.auryo.auryo" name="/home/alan/.config/dconf/user" pid=2865 comm="auryo" requested_mask="m" denied_mask="m" fsuid=1000 ouid=1000
File: /home/alan/.config/dconf/user (mmap)

= AppArmor =
Time: Nov  7 17:33:51
Log: apparmor="DENIED" operation="dbus_method_call"  bus="session" path="/org/gnome/SessionManager" interface="org.gnome.SessionManager" member="Inhibit" mask="send" name="org.gnome.SessionManager" pid=2865 label="snap.auryo.auryo" peer_pid=1552 peer_label="unconfined"
DBus access

= AppArmor =
Time: Nov  7 17:34:01
Log: apparmor="DENIED" operation="dbus_method_call"  bus="session" path="/org/gnome/SessionManager" interface="org.gnome.SessionManager" member="Uninhibit" mask="send" name="org.gnome.SessionManager" pid=2865 label="snap.auryo.auryo" peer_pid=1552 peer_label="unconfined"
DBus access

The inhibit/uninhibit denials should go away if you plugs screen-inhibit-control. The /etc/xdg/user-dirs.conf is fixed in core from candidate channel. The mmap denial is due to execstack. Since you pasted the mmap denial, that suggests the paste came from the 17.10 system, not the 16.04 (unless your 16.04 system is running a newer kernel).

All that said, I can confirm that auryo does show the controls in 17.10 and not 16.04. The controls work in 17.10. I didn’t have any denials in 16.04 (and only the one mmap denial in 17.10). I can confirm with d-feet that on 16.04 auryo (and 17.10) is listening on the mpris DBus interface (for auryo-player, not auryo) and through d-feet I was able to play and pause music. This issue seems to be in Unity7 not picking it up and doesn’t seem to be related to the security policy. Perhaps you need to stage something else?

I tried testing vlc on 16.04 and its controls didn’t show up in indicator-sound either. I then recalled that for vlc to show up, the desktop file in /var/lib/snapd/desktop/applications needed to be renamed from vlc_vlc.desktop to vlc.desktop (this is a bug in Unity7 not being able to map the running executable to the desktop file, iirc). I did that for vlc and indeed, it did work. I did it for auryo, but it didn’t work. I then installed auryo in devmode, still didn’t work.

The desktop file issue I was referring to is: https://bugs.launchpad.net/snappy/+bug/1604887

This also worked for the Spotify snap. Thanks!