Hi All,
Most of the time Lock Session works. But once it fails even manually running the command:
dcop kdesktop KScreensaverIface lock
does nothing. And then I have to logout and log back in for it to work again.
.xsession-errors shows no errors. Both
dcop kdesktop KScreensaverIface isEnabled dcop kdesktop KScreensaverIface isBlanked
return 'true.' If I understand it right they should both show false when the session is not locked?
Anyone know how to use dcop to reset Lock Session so it works again?
Thanks, Michael
On 2023/05/04 04:00 AM, Michael via tde-users wrote:
Hi All,
Most of the time Lock Session works. But once it fails even manually running the command:
dcop kdesktop KScreensaverIface lock
does nothing. And then I have to logout and log back in for it to work again.
xsession-errors shows no errors. Both
dcop kdesktop KScreensaverIface isEnabled dcop kdesktop KScreensaverIface isBlanked
return 'true.' If I understand it right they should both show false when the session is not locked?
Anyone know how to use dcop to reset Lock Session so it works again?
hi Michael, probably killing kdesktop and kdesktop_lock and relaunching them will put the state back to "not blanked". Nevertheless the fact that the lock fails and isBlanked returns true, let me think that something goes wrong when the screensaver kicks in. Have you tried using a different screensaver and see if the same problem happen?
Cheers Michele
On Friday 05 May 2023 12:27:42 am Michele Calgaro via tde-users wrote:
On 2023/05/04 04:00 AM, Michael via tde-users wrote:
Hi All,
Most of the time Lock Session works. But once it fails even manually running the command:
dcop kdesktop KScreensaverIface lock
does nothing. And then I have to logout and log back in for it to work again.
xsession-errors shows no errors. Both
dcop kdesktop KScreensaverIface isEnabled dcop kdesktop KScreensaverIface isBlanked
return 'true.' If I understand it right they should both show false when the session is not locked?
Anyone know how to use dcop to reset Lock Session so it works again?
hi Michael, probably killing kdesktop and kdesktop_lock and relaunching them will put the state back to "not blanked". Nevertheless the fact that the lock fails and isBlanked returns true, let me think that something goes wrong when the screensaver kicks in. Have you tried using a different screensaver and see if the same problem happen?
Hi Michele (&dep),
It's not that easy to break, but trying to lock the screen in a desktop where Oracle VB is running will eventually do it. So, it's something with an app interfering with kdesktop_lock, not something wrong, per se, with kdesktop_lock. (imo)
Playing with it, I've found just killing kdesktop_lock
/usr/bin/pkill kdesktop_lock
causes the screen to lock. No matter what state isBlanked is in.
I can code with that, but is that normal?
Thanks much for the pointer to kdesktop, this has been nagging me for the last 5 or 6 years. I’m also copying at end my new ‘goodnight’ script for anyone who cares or uses what I’ve posted in the past.
Best Regards, Michael
PS: michael@local [~/data/trash]# dcop kdesktop KScreensaverIface isEnabled true michael@local [~/data/trash]# dcop kdesktop KScreensaverIface isBlanked false
Not a biggie, but I’m also somewhat curious why they are returning text values instead of 0 and 1?
# # # # # # # # # # # #
#!/bin/bash #### # Goodnight script to lock and blank the monitor. # Generally attached to a button in the taskbar / panel. ####
isBlanked=`dcop kdesktop KScreensaverIface isBlanked`
if [ "$isBlanked" = 'true' ] ; then /usr/bin/pkill kdesktop_lock else dcop kdesktop KScreensaverIface lock fi
sleep 3 xset dpms force standby
Hi Michael,
I can code with that, but is that normal?
I reiterate the point that there should not be a failure in the lock procedure in first place :-) If that is not a big deal for you and you are happy to kill kdesktop_lock, it's fine. kdesktop will respawn a new kdesktop_lock process.
Not a biggie, but I’m also somewhat curious why they are returning text values instead of 0 and 1?
They return a bool and the dcop client prints false/true in a readable way
Cheers Michele