Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 79777 - proper kde shutdown on acpi powerbutton
Summary: proper kde shutdown on acpi powerbutton
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-27 13:51 UTC by miro
Modified: 2007-03-04 18:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description miro 2005-01-27 13:51:09 UTC
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:
Comment 1 Jan Spitalnik 2005-12-14 10:56:26 UTC
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 
 
Comment 2 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2007-03-04 18:22:45 UTC
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.