Thread: Help with DBUS
View Single Post
christye's Avatar
Posts: 60 | Thanked: 9 times | Joined on Apr 2010 @ Swindon, UK
#1
Hey guys,

I had posted this in the N900 forum, however, I feel that this may be a better place for it, as I guess it isn't specifically an N900 issue.

Having a bit of a problem with DBUS.

What I'm trying to do is when my bluetooth headset is connected, I want the phone to start playing music. Once the phone is disconnected from the headset, I want it to stop. Sounded pretty simple, I had already played a little bit with dbus (underclocking when locked).

Anyway. I have the command to play music in a file (/usr/local/bin/connect) which contains this command:
Code:
dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.play
The line in the "dbus-scripts-settings" file looks like this:
Code:
/usr/local/bin/connect * * org.bluez.Adapter RemoteDeviceConnected 0C:6E:00:00:17:8F
I did try the GUI application as it would save me typing some. However, it didn't work with that, and it didn't work with me doing it manually either.

I typed in "dbus-scripts --debug" and at the end of the command it gave me the "Failed to open connection to session message bus null)". So I am all out of ideas. Are there any other ways I can test to find out where the fault lies?

Been trying this for hours now! Any help would be much appreciated.

Regards,
Chris