Dbus on liferea

Hi

I am snapping liferea (the rss reader) and is already working in devmode, in edge in the store

I trying to use strict confinement and I have a problem with DBus. When I start liferea i get this:

Gtk-Message: 00:19:10.161: Failed to load module "appmenu-gtk-module"
Failed to register: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Connection ":1.473" is not allowed to own the service "net.sourceforge.liferea" due to AppArmor policy

If I use snappy-debug.scanlog to debug, I get this:

= AppArmor =
Time: Apr 17 00:19:10
Log: apparmor="DENIED" operation="dbus_bind"  bus="session" name="net.sourceforge.liferea" mask="bind" pid=13094 label="snap.liferea.liferea"
DBus access

So, I am not sure what to do. I tried to add dbus to the plugs but I think I do not understand interfaces well. I tried snap connect liferea:dbus :dbus but it didnt’t work.

Also, I know the solution must be in https://snapcraft.io/docs/dbus-interface but I am not sure if liferea is trying to read or write in dbus.

Thanks in advance

You need a top-level interface definition:

slots:
  dbus-liferea:
    interface: dbus
    bus: session
    name: net.sourceforge.liferea

apps:
  liferea:
    ...
    slots:
    - dbus-liferea

Note, this needs a snap declaration to use this well-known name. Since I saw this topic before your upload, I went ahead and issued it so your snap will (continue to) pass automated review.

2 Likes

So… excuse me. I do not understand what should I do…

Do I need to add de slots: in my snapcraft.yaml?

It worked!! I added the lines and worked

also, thansk @jdstrand for all the magic behind. If I understand, and I add those lines, the automated review process can send warings and errors?

Also, I am ashamed for not understand well the solution and have no experience with d-bus… But It works :smiley: