[kde-linux] Howto issue commands on locking an unlocking the session

Kevin Krammer kevin.krammer at gmx.at
Thu Nov 1 12:33:55 UTC 2007


Hi Nico,

On Wednesday 31 October 2007, Nico Gulden wrote:

> I was inspired by the behavior kopete is showing on locking the session
> manually (e.g. turning on the screensaver with a black screen) and
> automatically setting the away status of my instant messenger. For
> Jabber I'd like to use a different client (gajim) that is not as
> integrated in kde as kopete is. The client provides a dbus interface and
> I'm able to change the status issuing some commands.
>
> How can I use the kde infrastructure to easily issue the appropriate
> commands on locking and unlocking the screensaver? I preferably use the
> facility kde provides for locking the session. Are there any events I
> can hook upon? Any hints to the documentation for reading or ideas how
> to implement it would help me.

I think KDE calls the kdesktop_lock helper tools when it wants to lock the 
session, so you could rename this utility and create a script with the 
original name that does your additional commands and the calls the renamed 
tool.

Not sure about the unlocking, my guess is that kdesktop_lock blocks (does not 
return) until the unlock, so the script might be able to handle the 
additional unlocking operations afterwards as well.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-linux/attachments/20071101/fcd654d2/attachment.sig>


More information about the kde-linux mailing list