Hi, I am using xdg-screensaver with KDE4, and whereas Inhibit seems to disable the screen saver, it does not disable the screen autolock feature. Looking for the bug, I found that SimulateUserActivity had to be used, but I modified xdg-screensaver in a way that should make it still compatible with other window managers, by adding the look calling SimulateUserActivity in the track_window() function, while waiting for the xprop process to exit.
Regards. diff --git a/scripts/xdg-screensaver.in b/scripts/xdg-screensaver.in index 579b80e..84369cb 100644 --- a/scripts/xdg-screensaver.in +++ b/scripts/xdg-screensaver.in @@ -216,6 +216,13 @@ track_window() echo "$window_id:$xprop_pid" >> $tmpfile $MV "$tmpfile" "$screensaver_file" unlockfile + # in KDE4, simulating user activity prevents the screensaver autolock + if [ "$DE" = "kde" -a x"$KDE_SESSION_VERSION" = x"4" ]; then + while kill -0 $xprop_pid; do + qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity > /dev/null + sleep 5 + done + fi # Wait for xprop to edit, it means that the window disappeared wait $xprop_pid # Clean up the administration and resume the screensaver -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to xdg-utils in Ubuntu. https://bugs.launchpad.net/bugs/310351 Title: Kubuntu screensaver xdg-screensaver broken Status in Xdg-utils: Unknown Status in xdg-utils package in Ubuntu: Confirmed Status in xdg-utils package in Debian: Confirmed Bug description: Binary package hint: kscreensaver xdg-screensaver returns "bad call" for all values tested. Looking at the script, I'd guess it is because it detects the KDE desktop and tries to use dcop when KDE4 has moved to dbus, but that's just a guess. For example: $ xdg-screensaver activate call failed lsb_release -rd -> Ubuntu 8.10 Flavor is kbuntu To manage notifications about this bug go to: https://bugs.launchpad.net/xdg-utils/+bug/310351/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp

