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



Hi Kevin,

Kevin Krammer schrieb:
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.

Thanks for the tip. I tried it out yesterday and it works as expected.
Your guess is right that kdesktop_lock blocks. Therefore in my wrapper
script it is doing somethin before calling the real kdesktop_lock and it
is doing something after kdesktop_lock. It is important that the wrapper
script passes the options on to the the real kdesktop_lock program.

Greetings, Nico.


begin:vcard
fn:Gulden, Nico
n:Gulden;Nico
email;internet:cilugnedon@xxxxxx
x-mozilla-html:FALSE
version:2.1
end:vcard

Attachment: signature.asc
Description: OpenPGP digital signature

___________________________________________________
This message is from the kde-linux mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde-linux.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.

Relevant Pages

  • Re: [kde-linux] Howto issue commands on locking an unlocking the session
    ... How can I use the kde infrastructure to easily issue the appropriate ... commands on locking and unlocking the screensaver? ... Not sure about the unlocking, my guess is that kdesktop_lock blocks (does not ... Kevin Krammer, KDE developer, xdg-utils developer ...
    (KDE)
  • Re: KDE Idle time
    ... > What I want to do is run a script that detects idle time, ... then I could run a script to ... > could hijack the Screensaver interface for my own purposes? ... Although I have no idea how to register a screensaver in kde (ask a kde ...
    (comp.os.linux.x)
  • Re: xserver screensaver ausschalten (mittels xset)
    ... nicht nach dem Start von Kde ausgeführt bzw. is danach bei xset -q ... also das script wird machmal aufgerufen und manchmal nicht. ... Ich hab leider keine Ahnung warum, ... Das ist mir auch klar es funktioniert auch den screensaver auszuschalten und alles. ...
    (de.comp.os.unix.linux.misc)
  • Re: xserver screensaver ausschalten (mittels xset)
    ... nicht nach dem Start von Kde ausgeführt bzw. is danach bei xset -q ... Stelle doch bitte erst einmal fest, ob das Script nun gerufen wird, ... Screensaver; ...
    (de.comp.os.unix.linux.misc)
  • [kde] Re: KDE 4.6.2 screensaver module crashes with fglrx 8.850
    ... access the screensaver module (from fglrx) and set a screensaver. ... Rebooted to change something in windows, when I came back into KDE ... of folks forget, like kde version, distro (version would have been nice, ...
    (KDE)