View Single Post
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#1027
Originally Posted by ajalkane View Post
Logs as now are useful. But as I said in the logs it was clear that the script was launched, so it's probably something that the script does that doesn't work. If that happens again try running the script manually and see if it does anything: First run it through ProfileMatic's UI with Test button in custom action. If that doesn't work, run it from terminal. See if there's any output.
I think I did run the script in terminal and it worked. I should have remembered the test button since I'm the one who requested it. I'll keep my eyes open for similar cases.

Originally Posted by ajalkane View Post
That's safe, but I'm surprised that you can use it. It takes as parameter a serialized C++ object. I don't even know how it looks like building that from python or using dbus-send. Out of curiosity do you have some working sample?

The only caveat is that the object usually changes between each ProfileMatic release. But of course if you take an existing rule and only modify the parts you want, then that's pretty future proof also.
I have no idea how to build the object from scratch. I just dumped an existing rule's object and modify that.

I told you it's simple...

At the moment it just listens for the next_bootup_event signal which just so happens to be an epoch timestamp or zero for no alarms. This example works but is pretty stupid at the moment.

You'll need python python-dbus and python-gobject.
Attached Files
File Type: txt modifyrule.txt (2.4 KB, 132 views)
 

The Following User Says Thank You to slarti For This Useful Post: