Is /org/freedesktop/DBus accessible from a web browser?
1
vote
0
answers
498
views
We have some homebrewn applications running in top of a Xubuntu 18.04 OS, communicating with each other using D-Bus. The UI part is run in a web browser and web socket is being used for the communication with the applications.
Our aim is to migrate every communication made to D-Bus, but I have tried accessing the
/org/freedesktop/DBus
from the chromium browser for testing purposes and had no luck. I used this library :
var dbus = require('dbus-native')
var conn = dbus.createConnection()
conn.message({
path: '/org/freedesktop/DBus',
destination: 'org.freedesktop.DBus',
'interface': 'org.freedesktop.DBus',
member: 'Hello',
type: dbus.messageType.methodCall
})
conn.on('message', function (msg) { console.log(msg) })
And this is what I see in the browser console:
Uncaught Error: unknown bus address
at createStream (index.js?26d9:22)
at Object.createConnection (index.js?26d9:76)
This is what I see when running dbus-monitor
, but I don't know if it can even be related to my connection attempt:
signal time=1626258028.185483 sender=org.freedesktop.DBus -> destination=:1.196 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.196"
signal time=1626258028.185641 sender=org.freedesktop.DBus -> destination=:1.196 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
string ":1.196"
method call time=1626258031.724118 sender=:1.195 -> destination=org.freedesktop.PowerManagement serial=7 path=/org/freedesktop/PowerManagement/Inhibit; interface=org.freedesktop.PowerManagement.Inhibit; member=UnInhibit
uint32 39
method return time=1626258031.724440 sender=:1.27 -> destination=:1.195 serial=151 reply_serial=7
method call time=1626258031.724721 sender=:1.195 -> destination=org.freedesktop.DBus serial=8 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
string "type='signal', path='/org/freedesktop/DBus/Local',interface='org.freedesktop.DBus.Local', member='Disconnected'"
method return time=1626258031.724743 sender=org.freedesktop.DBus -> destination=:1.195 serial=7 reply_serial=8
signal time=1626258031.725311 sender=org.freedesktop.DBus -> destination=:1.195 serial=5 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
string ":1.195"
signal time=1626258031.725517 sender=org.freedesktop.DBus -> destination=(null destination) serial=339 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string ":1.195"
string ":1.195"
string ""
Is the freedesktop DBus accessible from the web browser or maybe do I need to make some tweak in the DBus daemon configuration to allow it? I'm kind of new to D-Bus.
Asked by Aritz
(123 rep)
Jul 14, 2021, 10:24 AM
Last activity: Mar 24, 2023, 05:56 PM
Last activity: Mar 24, 2023, 05:56 PM