Trying to run the remmina snap (https://github.com/3v1n0/Remmina-snap) in a confined environment (with unity7 plug), there's a failure when trying to call the relevant methods to get a libappmenu indicator:
(remmina:24369): libappindicator-WARNING **: Unable to connect to the Notification Watcher: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.2651" (uid=1000 pid=24369 comm="remmina ") interface="org.kde.StatusNotifierWatcher" member="RegisterStatusNotifierItem" error name="(unset)" requested_reply="0" destination=":1.52" (uid=1000 pid=5960 comm="/usr/lib/x86_64-linux-gnu/indicator-application/in")
The journal says a little more infos:
nov 08 01:57:51 t460s dbus[5628]: apparmor="DENIED" operation="dbus_signal" bus="session" path="/org/ayatana/NotificationItem/remmina_icon/Menu" interface="com.canonical.dbusmenu" member="LayoutUpdated" mask="send" name="org.freedesktop.DBus" pid=24659 label="snap.remmina-unstable.remmina" peer_pid=5635 peer_label="unconfined"
nov 08 01:57:51 t460s dbus[5628]: apparmor="DENIED" operation="dbus_signal" bus="session" path="/org/ayatana/NotificationItem/remmina_icon/Menu" interface="com.canonical.dbusmenu" member="LayoutUpdated" mask="send" name="org.freedesktop.DBus" pid=24659 label="snap.remmina-unstable.remmina" peer_pid=5635 peer_label="unconfined"
nov 08 01:57:51 t460s dbus[5628]: apparmor="DENIED" operation="dbus_method_call" bus="session" path="/StatusNotifierWatcher" interface="org.kde.StatusNotifierWatcher" member="RegisterStatusNotifierItem" mask="send" name=":1.52" pid=24659 label="snap.remmina-unstable.remmina" peer_pid=5960 peer_label="unconfined"
The call inside libappindicator seems correct to me:
http://bazaar.launchpad.net/~indicator-applet-developers/libappindicator/trunk.16.10/view/head:/src/app-indicator.c#L1341
And the unity7.go interface should cover that case (in fact calling the very same method from gdbus inside the snap run --shell, works).
A weird thing is that if I check what happens with dbus-session, I see this call:
dbus-monitor --session --monitor "interface=org.kde.StatusNotifierWatcher"
method call time=1478560856.427274 sender=:1.2610 -> destination=:1.52 serial=13 path=/StatusNotifierWatcher; interface=org.kde.StatusNotifierWatcher; member=RegisterStatusNotifierItem string "/org/ayatana/NotificationItem/remmina_icon"
----
A simpler test case you can use is: https://code.launchpad.net/~3v1n0/+git/appindicator-snap
In this case the journalctl output is different, with some complains about DBusMenu's as well, but still it fails at the same point.
Looking this better, it seems more a problem related to the fact that the host can't access to the snap dbus interface. In fact calling the method with gdbus using a path as parameter, still fails.