configurable D-Bus blueman object path to fix #483
The path to object org.blueman.Mechanism was originally hard-coded to "/". But in some systems, the path may be "/org/blueman/mechanism". So this commit adds an extra parameter to configure the path.
This commit is contained in:
parent
9236b5279e
commit
747214f3da
1 changed files with 4 additions and 2 deletions
|
@ -5,6 +5,7 @@ Parameters:
|
||||||
* bluetooth.device : the device to read state from (default is hci0)
|
* bluetooth.device : the device to read state from (default is hci0)
|
||||||
* bluetooth.manager : application to launch on click (blueman-manager)
|
* bluetooth.manager : application to launch on click (blueman-manager)
|
||||||
* bluetooth.dbus_destination : dbus destination (defaults to org.blueman.Mechanism)
|
* bluetooth.dbus_destination : dbus destination (defaults to org.blueman.Mechanism)
|
||||||
|
* bluetooth.dbus_destination_path : dbus destination path (defaults to /)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -97,10 +98,11 @@ class Module(bumblebee.engine.Module):
|
||||||
state = "true"
|
state = "true"
|
||||||
|
|
||||||
dst = self.parameter("dbus_destination", "org.blueman.Mechanism")
|
dst = self.parameter("dbus_destination", "org.blueman.Mechanism")
|
||||||
|
dst_path = self.parameter("dbus_destination_path", "/")
|
||||||
|
|
||||||
cmd = "dbus-send --system --print-reply --dest={}"\
|
cmd = "dbus-send --system --print-reply --dest={}"\
|
||||||
" / org.blueman.Mechanism.SetRfkillState"\
|
" {} org.blueman.Mechanism.SetRfkillState"\
|
||||||
" boolean:{}".format(dst, state)
|
" boolean:{}".format(dst, dst_path, state)
|
||||||
|
|
||||||
bumblebee.util.execute(cmd)
|
bumblebee.util.execute(cmd)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue