[kopete-bugs] [Bug 199239] Wishlist: Make screen lock cause auto logout.

JayD kdebug at jaydresser.us
Mon Jul 27 04:49:19 CEST 2009


https://bugs.kde.org/show_bug.cgi?id=199239


JayD <kdebug at jaydresser.us> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WORKSFORME




--- Comment #3 from JayD <kdebug jaydresser us>  2009-07-27 04:49:18 ---
Upon further investigation I found the man page for xscreensaver-command and
there is a script described there that is close, combined with these dbus
commands I have a working solution.  It is not as clean in that I must have a
shell script always running, but it works.

#!/bin/bash
xscreensaver-command -watch | while read cmd date ; do
    if ps aux | grep kopete > /dev/null 2>&1; then
        if [[ $cmd == "BLANK" || $cmd == "LOCK" ]] ; then
            dbus-send --type=method_call --dest=org.kde.kopete /Kopete
org.kde.Kopete.disconnectAll
        fi
        if [[ $cmd == "UNBLANK" ]] ; then
            sleep 1
            dbus-send --type=method_call --dest=org.kde.kopete /Kopete
org.kde.Kopete.connectAll
        fi
    fi
done

(note that there is no newline after "/Kopete"

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the kopete-bugs mailing list