Is it possible to call non-Snap application dbus methods from Snaps?
For example, I want to access com.redhat.tuned
provided by the tuned
native Ubuntu package.
I added the following to my snapcraft.yaml
file:
apps:
tuned-switcher:
...
plugs:
...
- tuned-dbus
plugs:
tuned-dbus:
interface: dbus
bus: system
name: com.redhat.tuned
But AppArmor blocks access:
= AppArmor =
Time: Jul 24 17:51:18
Log: apparmor="DENIED" operation="dbus_method_call" bus="system" path="/Tuned" interface="com.redhat.tuned.control" member="profiles" mask="send" name="com.redhat.tuned" pid=13010 label="snap.tuned-switcher.tuned-switcher" peer_pid=7524 peer_label="unconfined"
DBus access
Trying to connect slots manually, but got an error:
ubuntu@ubuntu:~$ sudo snap connect tuned-switcher:systemd-dbus
error: snap "snapd" has no "dbus" interface slots
ubuntu@ubuntu:~$ sudo snap connect tuned-switcher:tuned-dbus
error: snap "snapd" has no "dbus" interface slots