# Possible to modify Host OS or other suggested workaround for Dbus?

**URL:** <https://forums.balena.io/t/possible-to-modify-host-os-or-other-suggested-workaround-for-dbus/225292>\
**Category:** balenaOS\
**Tags:** bluetooth, wifi, docker, security\
**Created:** [December 19, 2020, 10:07am UTC](https://forums.balena.io/t/possible-to-modify-host-os-or-other-suggested-workaround-for-dbus/225292 "2020-12-19T10:07:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryanteck](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ryanteck/32/5108_2.png) [@Ryanteck](https://forums.balena.io/u/Ryanteck)\
**Post date:** [December 19, 2020, 10:07am UTC](https://forums.balena.io/t/possible-to-modify-host-os-or-other-suggested-workaround-for-dbus/225292/1 "2020-12-19T10:07:04Z")

</div>

For one of the pieces of software for one of the pieces of software we would like to ship that I’m working on containerising has to access parts of the host system using dbus to access bluetooth and wi-fi.

I’ve allowed dbus access via the dockerfiles but that still didn’t work. For Raspbian the software states to copy a configuration xml to /etc/dbus-1/system.d/ which didn’t do anything when I copied it in the container.

As a final resort I then remounted the host OS as write and created this XML config file on the host os and the software is now working.

So it seems that this configuration file is required to be on the host, however there isn’t a recommended method of modifying the Host OS from what I can find.

Is there a recommended way to possibly do this or a workaround that can be suggested?

Thanks

---

<div class="post-metadata">

**Author:** ![Ryanteck](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ryanteck/32/5108_2.png) [@Ryanteck](https://forums.balena.io/u/Ryanteck)\
**Post date:** [December 19, 2020, 10:24am UTC](https://forums.balena.io/t/possible-to-modify-host-os-or-other-suggested-workaround-for-dbus/225292/4 "2020-12-19T10:24:38Z")

</div>

Partially a duplicate of:

> [@BlueZ d-bus issue registering a BLE peripheral](https://forums.balena.io/t/bluez-d-bus-issue-registering-a-ble-peripheral/4193):
>
> Hi - in the past, before I used Resin, I wrote some Bluetooth Low Energy Peripheral code for the Raspberry Pi using a library from Github called [bluezero](https://github.com/mhazley/python-bluezero) which is basically a wrapper around the BlueZ dbus stuff. It worked well and I’d like to re-use it in my Resin container but I am having some trouble getting it running. In case its important, I am also [using dbus to communicate with NetworkManager](https://forums.balena.io/t/scanning-for-ssids-at-runtime/4153/4), so I have the following in my dockerfile: ENV DBUS\_SYSTEM\_BUS\_ADDRESS=unix:path=/host/run/dbu…

> [@I want to edit Host OS read-only files](https://forums.balena.io/t/i-want-to-edit-host-os-read-only-files/21266):
>
> I want to use NetworkManager with the systemd service running on the container pi user. Therefore, I want to edit /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf of host OS, but I can not do it because it is a read-only file system. And I want to do the editing from inside the container. Is there any way?

> [@Bluetooth configuration (with alpine linux)](https://forums.balena.io/t/bluetooth-configuration-with-alpine-linux/113733/):
>
> Hi everyone, I try to configure Bluetooth connection with my smartphone to a container. I take a look around the forum but can’t find an idea (I don’t know the Bluetooth protocol very well). From my understanding : bluetoothd communicate with the Bluetooth device and run on the BalenaOS host and them the container communicate with the daemon through dbus with an agent (bluetoothctl for example). I can pair my device but can’t connect it. I try to adapt what was done in the Bluetooth BalenaSo…
