The acpid reacts to powerbutton press with /sbin/shutdown. While it is better than doing nothing I would still like to have my session stored. So this should help. (please somebody with more shell skill update this so that the user name is determined at runtime) (file:/etc/acpi/default.sh) #!/bin/sh # Default acpi script that takes an entry for all actions set $* group=${1/\/*/} action=${1/*\//} case "$group" in button) case "$action" in power) app="/usr/kde/3.3/bin/dcop" $app --user miro ksmserver default "logout" 0 2 0 # /sbin/init 0 ;; *) logger "ACPI action $action is not defined" ;; esac ;; *) logger "ACPI group $group / action $action is not defined" ;; esac Reproducible: Always Steps to Reproduce:
what about following? it's logouts every KDE session and if it's not running it still preserves the old behaviour if ps -Af | grep -q '[k]desktop' then dcop --all-sessions --all-users ksmserver ksmserver logout 0 2 0 && exit 0 else /sbin/shutdown -h now "Power button pressed" fi
Given this bug has been stalled for over fifteen months, I assume no one at the kde team is really interested in changing the current behaviour. Thus, closed as WONTFIX.