On Saturday 16 September 2006 00:53, Richard Fish wrote:

> You need to add a "sleep" case here to do whatever you want to happen
> when you press the pwer button...

Thanks Richard,

I have added this:
===============================================
case "$group" in
        button)
                case "$action" in
                        power)
                                /sbin/init 0
                                ;;
                        sleep)
                                /usr/sbin/hibernate
                                ;;

                        # if your laptop doesnt turn on/off the display via 
hardware
                        # switch and instead just generates an acpi event, you 
can force
                        # X to turn off the display via dpms.  note you will 
have to run
                        # 'xhost +local:0' so root can access the X DISPLAY.
                        #lid)
                        #       xset dpms force off
                        #       ;;

                        *)      log_unhandled $* ;;
                esac
                ;;

===============================================

and it now hibernates nicely.  I have another acpi event question, but I'll 
start a new thread for it since it is not relevant.

I hope my question and answers I received have satisfied the OP requirements 
too.
-- 
Regards,
Mick

Attachment: pgpsstYEtAw8I.pgp
Description: PGP signature

Reply via email to