Thread
:
[ANNOUNCE] mbluetoothd
View Single Post
svs57
2009-02-27 , 13:41
Posts: 207 | Thanked: 31 times | Joined on Apr 2008
#
14
I accidentlly kill dbus daemon. IT rebooted and know everything wokr
One more question.
Is it possible to execute script via dbus-script on headphone button press?
Now I use python script to pause kagu when button press.
I have to start it from xterm each time when I start kagu.
Will be nice if need only start BT on IT and nothing more
#!/usr/bin/env python2.5
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)
import dbus
import gobject
import os
dbus_loop = gobject.MainLoop()
bus = dbus.SessionBus()
def on_button_pressed (sender=None):
os.system('echo pause > /home/user/.kagu/fifo')
headset = bus.get_object('com.nokia.osso_hp_ls_controller', '/com/nokia/osso_hp_ls_controller')
headset_iface = dbus.Interface(headset, dbus_interface='com.nokia.osso_hp_ls_controller.he adset')
headset_iface.connect_to_signal('button_pressed', on_button_pressed, sender_keyword='sender')
dbus_loop.run()
Quote & Reply
|
svs57
View Public Profile
Send a private message to svs57
Find all posts by svs57