Media Keys do not work in strictly confined snaps

Bug #1663565 reported by Martin Wimpress 
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd
Fix Released
Medium
Jamie Strandboge

Bug Description

I've created a snap for a music player. The mpris interface is hooked up (and works) and the following plugs are in use:

    plugs: [browser-support, gsettings, home, mount-observe, network, opengl, pulseaudio, unity7, x11]

However, the media keys are not being exposed by default so it is not possible to skip tracks or play/pause using media keys. Here is the output from /var/log/syslog when starting the snap.

Feb 10 11:26:44 skull dbus[1806]: apparmor="DENIED" operation="dbus_method_call" bus="session" path="/org/gnome/SettingsDaemon/MediaKeys" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.22" pid=16917 label="snap.spotify-client-test.spotify-client-test" peer_pid=2030 peer_label="unconfined"
Feb 10 11:26:44 skull dbus[1806]: apparmor="DENIED" operation="dbus_method_call" bus="session" path="/org/gnome/SettingsDaemon/MediaKeys" interface="org.gnome.SettingsDaemon.MediaKeys" member="GrabMediaPlayerKeys" mask="send" name=":1.22" pid=16917 label="snap.spotify-client-test.spotify-client-test" peer_pid=2030 peer_label="unconfined"

tags: added: isv
description: updated
description: updated
Zygmunt Krynicki (zyga)
tags: added: snapd-interface
Michael Vogt (mvo)
Changed in snappy:
status: New → Triaged
importance: Undecided → Medium
Changed in snapd:
status: New → Triaged
importance: Undecided → Medium
no longer affects: snappy
Changed in snapd:
status: Triaged → In Progress
assignee: nobody → Jamie Strandboge (jdstrand)
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This is in master and will be fixed in 2.23.

Changed in snapd:
status: In Progress → Fix Committed
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This was fixed some time ago (verified it is in 2.24, but comment #1 says could be earlier).

Changed in snapd:
status: Fix Committed → Fix Released
Revision history for this message
Jim Hodapp (jhodapp) wrote :

Is there anything that a strictly confined app needs to do to take advantage of this? I use the confined Spotify client (spotify-client-test). Should it automatically just work for this snap if I'm using snapd 2.24 or above?

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

@Jim, it was added to the unity7 interface, so there is nothing that else that needs to be done.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Indeed, I just installed spotify-client-test with snapd 2.24 (on 17.04) and the media keys worked fine.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

Perfect, thanks for the update and for testing that Jamie.

Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

Using Ubuntu 16.04.2 and snapd 2.25 I am still not able to control a strictly confined snap using skip/pause/play etc media keys.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

@Martin, can you file a new bug stating which snap and desktop environment you are using? Please add the 'snapd-interface' tag.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.