Dbus system config for framework and app snaps

Jamie Strandboge jamie at canonical.com
Fri May 29 17:31:01 UTC 2015

On 05/29/2015 10:29 AM, Sergey Demyanov wrote:
> Hi everyone,
> I wanted to reiterate question on the way snap developers would configure dbus
> permissions if needed. Since we have to use System bus for snaps by default we
> cannot own and register objects on the bus. 
> As of now the only way is to copy own .config file
> into /etc/dbus-1/system.d/ but in recent builds that partition is read only and
> remounting seems like a big hack. 
> May be it is possible to allow some namespace prefix for snaps to own or include
> config into snap package and make snappy apply it during install?
> Should I open bug for this or first discuss here the way to do it? 

This was implemented just before 15.04 was released via 'bus-name' in the
package.yaml for frameworks[1]. Under the hood, when a framework snap service
specifies 'bus-name', snappy will update the system service to include BusName=
and Type=dbus and snappy will also create simple bus policy in
/etc/dbus-1/system.d. You can see 'hello-dbus' from the snappy-examples[2] for a
working example, or install them on your system:

$ sudo snappy install hello-dbus-fwk
$ sudo snappy install hello-dbus-app
$ hello-dbus-app.client


Jamie Strandboge                 http://www.ubuntu.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20150529/2406ed49/attachment.pgp>

More information about the snappy-devel mailing list