Summary: | Provide a way to check if the display is locked | ||
---|---|---|---|
Product: | [Unmaintained] kscreensaver | Reporter: | kde2eran |
Component: | general | Assignee: | kscreensaver bugs tracking <kscreensaver-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | adminimus, l.lunak, mgraesslin, ossi |
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Bug Depends on: | |||
Bug Blocks: | 224450 |
Description
kde2eran
2005-11-14 03:30:14 UTC
doing this via kdm is certainly simple, but really ugly. the "lock" command is only a hint, and ugly enough as it is. it would be way better if kdm could find this out another way ... which brings us back to your request. unfortunately, i know neither what exists nor what would make sense if we need to invent something (and convince everybody else to use it). This has nothing to do with kdm. There's dcop interface for kdesktop (dcop kdesktop KScreensaverIface) but there's no isLocked(), only isBlanked(), and that's KDE-specific anyway. I myself don't quite see the purpose of finding out whether the screen is locked. Here's one use for this functionality: http://thinkwiki.org/wiki/Script_for_theft_alarm_using_HDAPS It activates an alarm if the laptop is physically moved when the display is locked. To check the locking, it employd an ugly distribution-specific kludge. More generally, a locked screen indicates the user doesn't want others to mess with the computer, and this may have implications for other devices. I guess just checking whether the screen is blanked can do as well there. No, a blanked screen means just that the user hasn't typed/mouses for a while, not that he wants to restrict access. When you sit with a laptop on your lap in a lecture, you don't want an alarm to go off whenever the screensaver kicks in. i have to agree with eran, in all points. the kdm "lock" command is a security feature: prevent auto-relogin if the session (was) crashed while the screen locker was running. it would be *very* advantageous if this worked out of the box without making all screen lockers kdm-aware first. in kde4, the GetActive function and the ActiveChanged signal of the the org.freedesktop.ScreenSaver D-Bus interface can be used to track the saver's status. it does not tell whether the saver is actually a locker, though. In Plasma 5 the signal and function from comment #7 is a sufficient solution. It reflects correctly whether the screen is locked. As there are no screen savers any more it will return "true" whenever the screen is locked. |