Announcement

Collapse
No announcement yet.

Programatic control "Screen Energy Saving" dbus??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Programatic control "Screen Energy Saving" dbus??

    I am looking to add some controls to a startup script for a program that will

    DISABLE Screen Energy Saving when the program starts
    RE-ENABLE Screen Energy Saving when the sprogram shutsdown.

    dbus

    via qdbus org.freedesktop.PowerManagement ?

    I am not a dbus guru, and what I am finding in searches is well, not really outlining how to use this to DISABLE/RE-ENABLE this as I want..

    Basically the BASH script would

    qdbus org.freedesktop.PowerManagement (DISABLE SCREEN ENERGY SAVING)
    /me/program/Program
    qdbus org.freedesktop.PowerManagement (RE-ENABLE SCREEN ENERGY SAVING)

    I don't mind the screen dimming, whille this runs, but manually changing this setting each time is well so wrong.

    Any pointers to do this? dbus? Something else?

    Thanks!

    #2
    (I presume you know about exploring the dbus with qdbus.)

    Perhaps
    Code:
    qdbus org.freedesktop.ScreenSaver /org/freedesktop/ScreenSaver org.freedesktop.ScreenSaver.Inhibit "my purpose" "my reason"  
    12482
    # sometime later
    qdbus org.freedesktop.ScreenSaver /org/freedesktop/ScreenSaver org.freedesktop.ScreenSaver.UnInhibit 12482
    I didn't check whether that had any effect.
    Regards, John Little

    Comment

    Working...
    X