KDE4 Screen dont lock, when hibernate or suspend pc via acpi

Bug #273556 reported by Pali
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
New
Undecided
Unassigned

Bug Description

This error is on KDE4 (and KDE3 too).
Kubuntu 8.04 and develop 8.10alfa5 aren't still lock screen, when I
hibernate or suspend pc via acpi (sudo /etc/apci/sleep.sh or sudo
/etc/acpi/hibernate.sh).
On
http://linux-tipps.blogspot.com/2008/06/locking-your-screen-with-dbus-from.html
I found, how to fix.
with dbus-send I can lock screen:
dbus-send --session --dest=org.freedesktop.ScreenSaver
--type=method_call --print-reply ScreenSaver
org.freedesktop.ScreenSaver.Lock

On site
http://linux-tipps.blogspot.com/2008/06/locking-your-screen-with-dbus-from.html
is added this to /etc/acpi/resume.d/90-xscreensaver.sh but better is
when lock script starts earlier.

I creat new file /etc/acpi/resume.d/50-kde4-lock.sh:
------------------------------------------------------------------------
#!/bin/sh
for x in /tmp/.X11-unix/*; do
        displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
        getXuser;
        if [ x"$XAUTHORITY" != x"" ]; then
                export DISPLAY=":$displaynum"
                su $user -c "dbus-send --session
--dest=org.freedesktop.ScreenSaver --type=method_call --print-reply
/ScreenSaver org.freedesktop.ScreenSaver.Lock"
        fi
done
------------------------------------------------------------------------
and this fix this problem.
Can you add this script to new kubuntu 8.10?

Revision history for this message
nils (internationils) wrote :
Revision history for this message
Pali (pali) wrote :

this is olny for acpi (not for /usr/sbin/pm-suspend)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.