dbusjs / node-dbus-next

🚌 The next great dbus library for node
https://www.npmjs.com/package/dbus-next
155 stars 52 forks source link

no response frpm method #109

Open akaJes opened 2 years ago

akaJes commented 2 years ago

Linux jes-MS-7680 5.15.0-27-generic #28-Ubuntu SMP Thu Apr 14 04:55:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy

"dbus-next": "^0.10.2"

const dbus = require('dbus-next')
const bus = dbus.systemBus()

const addWorking = () =>
  bus.getProxyObject('org.freedesktop.login1', '/org/freedesktop/login1')
  .then(obj => obj.getInterface('org.freedesktop.login1.Manager')
      .Inhibit('sleep', 'who', 'services working', 'block')
//      .ListInhibitors()
  )
addWorking().then(console.log).then(a=> bus.disconnect())

list works good but Inhibut stucks with no response expected result is file descriptor https://www.freedesktop.org/wiki/Software/systemd/inhibit/