Karthik | 4 Oct 20:50

hibernate script support for screen lock in kde 4.x series

Hi Nigel,

Could you add support for "lock KDE" for 4.x series. The command is:

qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock

Best regards,
Karthik
Nigel Cunningham | 4 Oct 23:59
Favicon

Re: hibernate script support for screen lock in kde 4.x series

Hi.

On Sat, 2008-10-04 at 19:51 +0100, Karthik wrote:
> Hi Nigel,
> 
> Could you add support for "lock KDE" for 4.x series. The command is:
> 
> qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock

I know nothing about KDE, so I think I need to ask for more help. It
seems to me that we're going to need to check for both KDE 3 and KDE 4
sessions, Here is what we currently have:

LockKDE() {
    [ x"$LOCK_KDE" != "x1" ] && return 0

    if ! ps ax | grep -q '[d]copserver' ; then
        vecho 1 'No KDE sessions detected. Not locking KDE.'
        return 0
    fi

    if ! command -v dcop > /dev/null 2>&1 ; then
        # Gentoo and Slackware stash this in a silly place.
        for i in /usr/kde/*/bin/dcop /opt/kde/bin/dcop ; do
            if [ -x "$i" ] ; then
                PATH=$PATH:${i%%/dcop}
                export PATH
                break
            fi
        done
(Continue reading)

Karthik | 6 Oct 13:23

Re: hibernate script support for screen lock in kde 4.x series

Hi Nigel
>>
>> qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock
>
> I know nothing about KDE, so I think I need to ask for more help.
Me too.
I got the above command from Aaron Seigo (of KDE fame) on IRC.

I will contact some KDE guys and let you know what is the best way to do it.

Best regards,
Karthik

Gmane