Reply
Thread Tools
Posts: 318 | Thanked: 735 times | Joined on Oct 2009
#1
Hello,

I would like to know which is the best way to run a script (my own script) on a specific dbus event.
It requires me to make a daemon ?
 

The Following User Says Thank You to b0unc3 For This Useful Post:
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#2
Originally Posted by b0unc3 View Post
Hello,

I would like to know which is the best way to run a script (my own script) on a specific dbus event.
It requires me to make a daemon ?
with python scripts , you could use the QT/GTK dbus wrappers to listen to the dbus signals , to perform what you want perhaps.

or you could write a simple daemon to do the same
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 
Posts: 318 | Thanked: 735 times | Joined on Oct 2009
#3
Originally Posted by krk969 View Post
with python scripts , you could use the QT/GTK dbus wrappers to listen to the dbus signals , to perform what you want perhaps.

or you could write a simple daemon to do the same
Yes, but to make my app listen on dbus signals requires that my app has to be (always) running and this is not what I want. I only need my application up and running only on a specific dbus event and I hope I could do this without writing a daemon.


Regards
 

The Following User Says Thank You to b0unc3 For This Useful Post:
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#4
Originally Posted by b0unc3 View Post
Yes, but to make my app listen on dbus signals requires that my app has to be (always) running and this is not what I want. I only need my application up and running only on a specific dbus event and I hope I could do this without writing a daemon.

Regards
somebody has to listen to the dbus event , no ?
and to add that the app/script will be in an almost idle state until the signal is recieved.
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 
Posts: 318 | Thanked: 735 times | Joined on Oct 2009
#5
Originally Posted by krk969 View Post
somebody has to listen to the dbus event , no ?
and to add that the app/script will be in an almost idle state until the signal is recieved.
Yes I think so
But, I'm wondering, is there someone else who listen to dbus event? maybe a system daemon, and use this directly would be better (or maybe I'm simply wrong).
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#6
Originally Posted by b0unc3 View Post
But, I'm wondering, is there someone else who listen to dbus event? maybe a system daemon, and use this directly would be better (or maybe I'm simply wrong).
No
Dont worry you wont load the system by listening to the dbus.Thats the whole purpose of having dbus so apps can communicate with other apps/middleware, add yours as well
let me know if you find something else
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 
Posts: 318 | Thanked: 735 times | Joined on Oct 2009
#7
Originally Posted by krk969 View Post
No
Dont worry you wont load the system by listening to the dbus.Thats the whole purpose of having dbus so apps can communicate with other apps/middleware, add yours as well
let me know if you find something else
Uhm... ok I will try so.
Anyway, thanks for the help.
 

The Following User Says Thank You to b0unc3 For This Useful Post:
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#8
You should look at the programs dbus-scripts and dbus-scripts-settings which are available in extras-devel. dbus-scripts is a daemon that listens on the dbus and runs scripts when specific events happen.
__________________
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 User Says Thank You to Matan For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 08:42.