View Single Post
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#146
The best is to write a small daemon that listens to the d-bus. The problem is that the relevant events have array and list arguments, which dbus-scripts does not support.

The second best, but much easier, is depend on the package dbus-scripts, and include in your package a file /et/dbus-scripts.d/fmtx including a line:

/usr/bin/fmtx-power * * com.nokia.policy info connected 1

This way the script /usr/bin/fmtx-power will be called whenever fmtx is enabled. The main problem I have is that this event looks generic, and not fmtx specific, though I did not see it generate by anything else. I suggest that the script should first check that the power_level is non-zero, before writing 118.
 

The Following 5 Users Say Thank You to Matan For This Useful Post: