View previous topic :: View next topic |
Author |
Message |
doubled157940 Tux's lil' helper
Joined: 13 Sep 2006 Posts: 85
|
Posted: Sat Sep 15, 2007 6:05 am Post subject: Laptop Power Button |
|
|
When I push the power button gnome brings up the small window for shutdown, reset, or logout, then Gentoo immediately starts init0. But I don't want it too. How can I make it so that when I push the power button, gnome asks the question, then thats it, acpid doesn't do anything and gnome waiting for my reply? |
|
Back to top |
|
|
Dottout l33t
Joined: 07 Mar 2006 Posts: 882
|
Posted: Sat Sep 15, 2007 10:46 am Post subject: |
|
|
edit /etc/acpi/default.sh |
|
Back to top |
|
|
doubled157940 Tux's lil' helper
Joined: 13 Sep 2006 Posts: 85
|
Posted: Sat Sep 15, 2007 10:43 pm Post subject: |
|
|
But what do I change inside default.sh?
I don't understand what is going on inside of it at all. This is what I have in the file:
/etc/acpi/default.sh
Code: |
#!/bin/sh
# Default acpi script that takes an entry for all actions
set $*
# Take care about the way events are reported
ev_type=`echo "$1" | cut -d/ -f1`
if [ "$ev_type" = "$1" ]; then
event="$2";
else
event=`echo "$1" | cut -d/ -f2`
fi
case "$ev_type" in
button)
case "$event" in
power)
logger "acpid: received a shutdown request"
/sbin/init 0
break
;;
*)
logger "acpid: action $2 is not defined"
;;
esac
;;
*)
logger "ACPI group $1 / action $2 is not defined"
;;
esac
|
|
|
Back to top |
|
|
Barnoid Tux's lil' helper
Joined: 30 Jul 2004 Posts: 103
|
Posted: Mon Sep 17, 2007 1:19 am Post subject: |
|
|
doubled157940 wrote: | But what do I change inside default.sh?
I don't understand what is going on inside of it at all. This is what I have in the file:
|
Since Gnome is already bringing up the shutdown window, you can simply comment out /sbin/init 0 by putting a "#" in front of it, i.e.
/etc/acpi/default.sh
Code: |
#!/bin/sh
# Default acpi script that takes an entry for all actions
set $*
# Take care about the way events are reported
ev_type=`echo "$1" | cut -d/ -f1`
if [ "$ev_type" = "$1" ]; then
event="$2";
else
event=`echo "$1" | cut -d/ -f2`
fi
case "$ev_type" in
button)
case "$event" in
power)
logger "acpid: received a shutdown request"
#/sbin/init 0
break
;;
*)
logger "acpid: action $2 is not defined"
;;
esac
;;
*)
logger "ACPI group $1 / action $2 is not defined"
;;
esac
|
|
|
Back to top |
|
|
doubled157940 Tux's lil' helper
Joined: 13 Sep 2006 Posts: 85
|
Posted: Tue Sep 18, 2007 7:08 pm Post subject: [solved] |
|
|
Thanks that worked. |
|
Back to top |
|
|
|