Error trying to access to dbus

Jamie Strandboge jamie at canonical.com
Tue Dec 13 19:59:03 UTC 2016


On Tue, 2016-12-13 at 15:32 -0300, Sergio Cazzolato wrote:
> I am trying to access to dbus from a python script in my snap and I am
> getting the error dbus.exceptions.DBusException:
> org.freedesktop.DBus.Error.AccessDenied: Failed to connect to socket
> /var/run/dbus/system_bus_socket: Permission denied, it happens when I do
> bus = dbus.SystemBus(mainloop=DBusGMainLoop())
> 
> Any idea how to fix it?
> 

To unblock yourself, you can install your snap with --devmode and then you
shouldn't be blocked.

If you are trying to make your snap work in strict confinement, you need to plug
an interface that uses the system bus. If your script is trying to use a well-
known service like network-manager, you need only 'plugs: [ network-manager ]'
and then connect your snap to it with the 'snap connect' command. If you are
implementing a new system service, a new interface will need to be created for
it or you can soon try out the about-to-land 'dbus' interface[1].

[1]https://bugs.launchpad.net/snappy/+bug/1590679

-- 
Jamie Strandboge             | http://www.canonical.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20161213/0dbb289c/attachment.sig>


More information about the Snapcraft mailing list