[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Button/power: acpid/GNOME/FC5



Hello Aaron,


On Wed, 03 May 2006 09:06:18 -0500 Aaron Konstam <akonstam sbcglobal net> wrote:

> On Wed, 2006-05-03 at 09:47 +0200, wwp wrote:
> > Hey all,
> > 
> > 
> > I've recently setup acpid on my FC5 to execute a script when the
> > button/power is pressed. I did that using /etc/acpi/ files, as I did
> > previously for the lid events and so on.
> > 
> > The funny thing is that it worked. Why funny? 'cause usually on the FC5
> > GNOME desktop, pressing the power button raises a "Are you sure you want
> > to log out" GNOME dialog, w/ logout/shutdown/restart buttons.
> What script do you run when the button is pressed. It seems to me the
> standard one of /sbin/shutdown would not deal with any Gnome dialog.
[snip]

My /etc/acpi/events/hibernate.conf:

event=button/power
action=/etc/acpi/actions/hibernate.sh


My /etc/acpi/actions/hibernate.sh:

#!/bin/sh
/usr/local/bin/gxmessage -center -wrap -name "Hibernate" -title "Hibernate" -buttons "OK:0,Cancel:1" -default "Cancel" "Suspend to disk now?" && \
        /usr/sbin/pm-hibernate
exit $?

Of course it's just a call to pm-hibernate from the pm-utils-0.15-1 package,
I just added a dialog to ask for confirmation.

FYI, I use pm-utils to hibernate for weeks w/o any problem.


But take care, maybe I wasn't precise enough: when the GNOME shutdown dialog
stopped working (why?), I implemented my own hook for the power button (the
attached script, thru acpid). Now that the GNOME shutdown dialog is back
(why?), my custom stuff doesn't work anymore (I don't care, I succeeded in
hibernating from the Fn+Hibernate button of my laptop).


Regards,

-- 
wwp

Attachment: signature.asc
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]