Registered Member
|
My goal: temporarily disable the screensaver from the command line without changing the config file.
When I use QDBusViewer > Session Bus > org.kde.screensaver > ScreenSaver > Method: Inhibit and type a & b. This works. But if I type on the command line: qdbus org.kde.screensaver /ScreenSaver Inhibit 'a' 'b'. This does not work. I also tried dbus-send, xdg-screensaver, which uses the dbus-send command, and systemd-inhibit, but I could not inhibit the screensaver from the command line. Is there a way to display if Inhibit is set when done via qdbus? systemd-inhibit has a --list option. Any documentation or pointers appreciated. |
Registered Member
|
Is it better to use dbus-send or qdbus when communicating with dbus on the Plasma desktop?
Anyone using qdbus? Anyone using with success:
The experience is the same on KDE 4 and KDE 5. If I use Inhibit from qdbusviewer it works (no screen saver), but if I execute the command using qdbus on the command line it doesn't work (screen saver kicks in). Yeah for consistency. Boo for not working. I've been reading KDE phabricator and came across the two items below . I want to inhibit the screen lock, so the first question is, am I using the right interface? It seems "org.kde.screensaver" was renamed to "org.freedesktop.ScreenSaver", but then on 2015 it says that it is outdated; Both these interfaces are present. If the later is outdated, what should users be using? In 2018, PowerManagement.Inhibit should only prevent suspend. Mar 19 2018 For preventing screen standby or screen locking the org.freedesktop.ScreenSaver.Inhibit must be used. Both calls erroneously did the same. (Referring to: org.freedesktop.PowerManagement.Inhibit should only prevent suspend) https://phabricator.kde.org/D11182 Jan 27 2015 inhibit the screen lock when playing some media some apps may still use the outdated org.freedesktop.Screensaver inhibit interface so we still have to query the inhibition state from https://phabricator.kde.org/R871:d3924f ... ppMIAAqsvI Mar 4 2007 renamed org.kde.screensaver to org.freedesktop.ScreenSaver and renamed functions accordingly (also removed some, that have a replacement now) https://phabricator.kde.org/R524:c8e7dc ... 98a36a01da I added to the front "QDBUS_DEBUG=1" to both the qdbus command (doesn't work) and the qdbusviewer (works) and there is a difference. For the qdbus command, althought I got a cookie, I also got an error that I never saw on the console: "The given match rule wasn't found and can't be removed" "Delivery is suspended". |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]