Script using dbus-send - not very reliable

Leonti Bielski prishelec at gmail.com
Mon Mar 16 15:16:30 CET 2009


Hi!
I was using mdbus to request CPU and Display resources but it's too slow.
So I decided to use dbus-send since it's very quick.
Here my script:

#!/bin/sh
dbus-send --system --type=method_call --dest=org.shr.ophonekitd.Usage
/org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource
string:CPU

It's also on:
http://pastebin.com/m3563e31c

The problem is that it does not work first time. I have to run the
script twice to make it work.
Same goes to other scripts that I modified from mdbus to dbus-send.

Any ideas?

Leonti




More information about the community mailing list