Comment 12 for bug 508073

Revision history for this message
Tom Helner (duffman) wrote :

I am still experiencing this symptom on a fully up to date (acpid 1.0.10-5ubuntu2.1) Lucid upgrade.

What's happening is the following line in /etc/acpi/powerbtn.sh is failing because "pidof kded4" is returning 2 PIDs:

        ( test "$XUSER" != "" && test -x /usr/bin/qdbus && test -r /proc/$(pidof kded4)/environ && su - $XUSER -c "eval $(echo -n 'export '; cat /proc/$(pidof kded4)/environ |tr '\0' '\n'|grep DBUS_SESSION_BUS_ADDRESS); qdbus org.kde.kded" | grep -q powerdevil) ; then

This is not a regression in acpid 1.0.10-5ubuntu2.1. The test line in powerbtn.sh in both 1.0.10-5ubuntu2 & 1.0.10-5ubuntu2.1 are identical. This actually might be a symptom of another problem that I have not been able to fix yet. The reason I am getting 2 PIDs for kded4 is because 1 is defunct.

I am wondering if there is a better way to detect if KDE4 is running that is more robust than "pidof kded4". Pre-Lucid, Ubuntu was using "pidof ksmserver". I have also seen "ps -efww|grep kded4|grep $XUSER|grep -v grep|grep -v defunct" being suggested.