sidorares / dbus-native

D-bus protocol client and server for node.js written in native javascript
Other
259 stars 93 forks source link

Unkown bus address Error #280

Closed BelkaDev closed 3 years ago

BelkaDev commented 3 years ago

Issue description

Using the library throws an error.

Steps to reproduce the issue

var dbus = require('dbus-native');
var bus = dbus.sessionBus();

What's the actual result?

Error: unknown bus address
    at createStream (/node_modules/dbus-native/index.js:22:26)
    at createConnection (/node_modules/dbus-native/index.js:76:31)
    at Object.module.exports.createClient (/node_modules/dbus-native/index.js:136:20)

Additional details / screenshot

OS: Arch DE: KDE

sidorares commented 3 years ago

can you show what's in your DBUS_SESSION_BUS_ADDRESS environment variable @BelkaDev ?

BelkaDev commented 3 years ago

can you show what's in your DBUS_SESSION_BUS_ADDRESS environment variable @BelkaDev ?

It was empty and I had to export it manually This did the trick:

echo "export $(dbus-launch | head -n1)" >> .zshrc