View previous topic :: View next topic |
Author |
Message |
chuliomartinez n00b


Joined: 25 Dec 2004 Posts: 30 Location: Event horizont
|
Posted: Sun Jan 16, 2005 9:53 am Post subject: ACPI |
|
|
Using kde I wanted the session to be saved on powerbutton hit.
get acpi daemon, program monitoring acpi events.
can be used for other things to, especially if you have a laptop.
second goto /etc/acpi and edit the default.sh script like this:
Code: |
#!/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
|
Ok the code is quite dumb, as you can see by the hardcoded username "miro", which has to be (obviously) replaced by your user name:). So feel free to make it better! _________________ naked&dead |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|