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
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 SimulateUserAct ivity 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 SimulateUserAct ivity 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 xdg-screensaver .in xdg-screensaver .in id:$xprop_ pid" >> $tmpfile SESSION_ VERSION" = x"4" ]; then .ScreenSaver /ScreenSaver SimulateUserAct ivity > /dev/null
index 579b80e..84369cb 100644
--- a/scripts/
+++ b/scripts/
@@ -216,6 +216,13 @@ track_window()
echo "$window_
$MV "$tmpfile" "$screensaver_file"
unlockfile
+ # in KDE4, simulating user activity prevents the screensaver autolock
+ if [ "$DE" = "kde" -a x"$KDE_
+ while kill -0 $xprop_pid; do
+ qdbus org.freedesktop
+ 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