Comment 31 for bug 268734

Revision history for this message
In , l (l-redhat-bugs) wrote :

Description of problem: the file /etc/acpi/actions/power.sh should be modified to check if KDE's power-management applet (plasmoid) is running.

Version-Release number of selected component (if applicable): acpid-1.0.6-9.fc10

Actual results: if the power-button is pressed while running KDE's power-management applet, the system shuts down

Expected results: instead of shutting down, the system should present the standard logout/poweroff/restart dialog

Additional info: I don't have the skills to fix this so I changed my /etc/acpi/actions/power.sh like so, starting at line 19:

# Check that there is a power manager, otherwise shut down.
[ "$uid_session" ] || shutdown -h now

#[ "$uid_session" ] &&
#ps axo uid,cmd | \
#awk '
# $1 == '$uid_session' &&
# ($2 ~ /gnome-power-manager/ || $2 ~ /kpowersave/) \
# { found = 1; exit }
# END { exit !found }
#' ||
# shutdown -h now

In this way, if there's an X11 session running, pushing the power button does not shutdown the system and KDE's power-management plasmoid takes control.

I don't have kpowersave installed as this is not the default in KDE 4.2.0.