pressing (laptop) power button should show shutdown dialog on kde4

Bug #326667 reported by bq on 2009-02-07
Affects Status Importance Assigned to Milestone
acpid (Ubuntu)

Bug Description

Binary package hint: acpid

When the power button on the laptop is pressed, the notebook running Kubuntu Jaunty (alpha 3) shuts down immediately. I think that pressing that button, a logout/reboot/shutdown dialog should appear. Or at least It shold be configurable.

Why (because I know from earlier similar bugreports, that some users want/like the contrary):
* It was like that in Kubuntu releases before Intrepid (I mean before KDE4 arrived)
* If I remember correctle , it is the same in Opensuse (not a real argument, I know)
* The power button is on notebooks next to the other special buttons (email button, wifi on/off button) , so a random press can occur
* As some developer stated in other ancient bugreport, "All actions, that can make some data loss, should be approved by user"

The problem is in the file '/etc/acpi/'. The code testing if a kde session is running is written for the KDE3 and do not apply anymore to KDE4.

Current code (line 20):
 if ps -Af | grep -q '[k]desktop' && pidof dcopserver > /dev/null && test -x /usr/bin/dcop ; then

Workaround (calling it workaround, because it is a quick fix, maybe not yet in an acceptable shape yet) :
 if ps -Af | grep -q 'startkde' > /dev/null && test -x /usr/bin/dcop ; then

With this changed line, the shutdown/reboot/logout dialog appears as desired.

This bug is also present in Intrepid, but I hope at least for Jaunty to be fixed.

Have a nice day, bq

root@paon:/etc/acpi# lsb_release -rd
Description: Ubuntu jaunty (development branch)
Release: 9.04
acpid 1.0.6-9ubuntu4

bq (balique) on 2009-02-07
description: updated
bq (balique) wrote :

The proposed line is not a final solution, because the detection of the KDE3 session should be preserved too.

bq (balique) wrote :

No response... maybe the "Affects" field should be not 'acpi' but KDE 'kdebase-workspace-bin' ? Maybe, wrong is the name of the KDE process? Should it be 'kdesktop' instead of 'startkde'?

Terence Simpson (tsimpson) wrote :

As this is an issue with the acpi script and not any KDE package, I'm moving this back to acpid.

bq (balique) wrote :

Sure? If the kde process name was "kdesktop", no problem occurs. It has to be "startkde" ? .. It is the KDE thing that changed, not acpi.

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

Other bug subscribers