Notices


Reply
Thread Tools
Posts: 36 | Thanked: 42 times | Joined on Jan 2010
#1
dbus-scripts

I've recently played with dbus-scripts and it's really a great
toy/tool. It's a kind of swiss chainsaw for dbus .

It's a daemon that allow you to wait on choosed dbus events to run
external command. You don't need to code your own python daemon each
time, you can use dbus-scripts to launch shell or perl scripts.

Yes I know you can find some informations about dbus-scripts in some
threads but there's no thread about it and I think it deserves it.

Just few examples of things you can wait for :
  • keyboard slide
  • battery full, low or empty
  • connection or disconnection from a network
  • sms or phone call
  • ...

I've created a wiki page with complete examples and links to
other ones like :
  • when connect on my wifi home network register only SIP ad turn on noisy ring
  • turn to 2g when connected to wifi network
  • automatically register on public wifi network when connected

Thanks to Graham Cobb for dbus-scripts, really a great toy for
hardcore users
 

The Following 29 Users Say Thank You to nbc For This Useful Post:
Posts: 155 | Thanked: 61 times | Joined on Nov 2009
#2
One of my jobs for tonight was to create a dbus-scripts wiki page!!! Brilliant timing.
 
Posts: 21 | Thanked: 0 times | Joined on Nov 2009
#3
Lovely just what i was looking for, lets make this wiki real good!
 
Posts: 193 | Thanked: 61 times | Joined on Jan 2010
#4
this sounds very interesting! perhaps this can help with a sms blacklist app, similar to what mcleaner does for s60!
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#5
Some information which might be useful in the wiki:

dbus-scripts does not reread edited configuration automatically. After editing (or creating/removing) a configuration file, you need to restart it.
On N900 it can easily be done with killall dbus-scripts, since it is then restarted by upstart. On 770/N800/N810, use /etc/init.d/dbus-scripts restart.

The package dbus-scripts-settings contains a script logit.sh which simply logs its parameters to the file /media/mmc1/logit.log. If you want to find out if some event generates dbus events, and what configuration line to use for it, create a file in /etc/dbus-scripts.d/ containing:
Code:
/usr/bin/logit.sh *
And generate the event. Reading the log file will show you all the dbus activity.
__________________
My repository

"N900 community support for the MeeGo-Harmattan" Is the new "Mer is Fremantle for N810".

No more Nokia devices for me.
 

The Following 3 Users Say Thank You to Matan For This Useful Post:
Posts: 36 | Thanked: 42 times | Joined on Jan 2010
#6
Good idea, I will add this to the wiki. Thank you.
 
Posts: 64 | Thanked: 109 times | Joined on Mar 2010
#7
Nice. Could you also add Command to Turn Screen On & Off

http://talk.maemo.org/showthread.php...ghlight=x11vnc
 

The Following User Says Thank You to mauron85 For This Useful Post:
Posts: 267 | Thanked: 183 times | Joined on Jan 2010 @ Campinas, SP, Brazil
#8
I hope you don't mind but I just linked to your dbus-scripts page from the Phone Control wiki page.
 
Posts: 267 | Thanked: 183 times | Joined on Jan 2010 @ Campinas, SP, Brazil
#9
Originally Posted by Matan View Post
The package dbus-scripts-settings contains a script logit.sh which simply logs its parameters to the file /media/mmc1/logit.log. If you want to find out if some event generates dbus events, and what configuration line to use for it, create a file in /etc/dbus-scripts.d/ containing:
Code:
/usr/bin/logit.sh *
And generate the event. Reading the log file will show you all the dbus activity.
Don't you mean
Code:
/usr/bin/logit.sh '*'
Because if you use a '*' it will expand to the names of every file in the current directory, try it:
Code:
echo *
I didn't install dbus-scripts but I think the quotes may be necessary.
 
Posts: 155 | Thanked: 61 times | Joined on Nov 2009
#10
No he means what he wrote. That splat is parsed by dbus-scripts against dbus message parameters - it is not passed to the shell to be globbed. (I've not tested it, but I expect that putting quotes there wont break anything - just wont do anything useful.)
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 13:18.