I have done it but the step is not totally 100% same with MOE-Inx's howto......
instead of create the lid script in
/etc/rc.d/acpid/events I just put the file in /etc/acpi/events
and I create the lid.sh in
/etc/acpi/actions and restart the acpi daemon by using typing
/etc/rc.d/rc.acpid restart in root
I did not rename the
/etc/rc.d/rc.acpi to
/etc/rc.d/rc.acpi.bkthere is no need for me to create the acpid folder inside
/etc/rc.d too......
however when the lid.sh execute when I close the lid there is some error prompt up from the xscreensaver........below is the log from
/var/log/acpid[Sun Jan 20 17:03:09 2008] received event "button/lid C169 00000080 00000010"
[Sun Jan 20 17:03:09 2008] notifying client 2874[0:0]
[Sun Jan 20 17:03:09 2008] executing action "/etc/acpi/actions/lid.sh"
[Sun Jan 20 17:03:09 2008] BEGIN HANDLER MESSAGES
xscreensaver-command: warning: $DISPLAY is not set: defaulting to ":0.0".
xscreensaver-command: already locked.
[Sun Jan 20 17:03:19 2008] END HANDLER MESSAGES
[Sun Jan 20 17:03:19 2008] action exited with status 0
[Sun Jan 20 17:03:19 2008] executing action "/etc/acpi/acpi_handler.sh button/lid C169 00000080 00000010"
[Sun Jan 20 17:03:19 2008] BEGIN HANDLER MESSAGES
/etc/acpi/acpi_handler.sh: line 14: /proc/acpi/button/lid/LID/state: No such file or directory
[Sun Jan 20 17:03:19 2008] END HANDLER MESSAGES
[Sun Jan 20 17:03:19 2008] action exited with status 0
[Sun Jan 20 17:03:19 2008] completed event "button/lid C169 00000080 00000010"
[Sun Jan 20 17:05:56 2008] exiting
[Sun Jan 20 17:05:57 2008] starting up
[Sun Jan 20 17:05:57 2008] 2 rules loaded
[Sun Jan 20 17:05:58 2008] client connected from 2874[0:0]
[Sun Jan 20 17:05:58 2008] 1 client rule loaded
[Sun Jan 20 17:06:01 2008] received event "button/lid C169 00000080 00000011"
[Sun Jan 20 17:06:01 2008] notifying client 2874[0:0]
[Sun Jan 20 17:06:01 2008] executing action "/etc/acpi/actions/lid.sh"
[Sun Jan 20 17:06:01 2008] BEGIN HANDLER MESSAGES
xscreensaver-command: xscreensaver window unexpectedly deleted.
[Sun Jan 20 17:06:04 2008] END HANDLER MESSAGES
[Sun Jan 20 17:06:04 2008] action exited with status 0
[Sun Jan 20 17:06:04 2008] executing action "/etc/acpi/acpi_handler.sh button/lid C169 00000080 00000011"
[Sun Jan 20 17:06:04 2008] BEGIN HANDLER MESSAGES
/etc/acpi/acpi_handler.sh: line 14: /proc/acpi/button/lid/LID/state: No such file or directory
[Sun Jan 20 17:06:04 2008] END HANDLER MESSAGES
[Sun Jan 20 17:06:04 2008] action exited with status 0
[Sun Jan 20 17:06:04 2008] completed event "button/lid C169 00000080 00000011"
[Sun Jan 20 17:06:05 2008] received event "button/lid C169 00000080 00000012"
[Sun Jan 20 17:06:05 2008] notifying client 2874[0:0]
[Sun Jan 20 17:06:05 2008] executing action "/etc/acpi/actions/lid.sh"
[Sun Jan 20 17:06:05 2008] BEGIN HANDLER MESSAGES
xscreensaver-command: already locked.
[Sun Jan 20 17:06:12 2008] END HANDLER MESSAGES
[Sun Jan 20 17:06:12 2008] action exited with status 0
[Sun Jan 20 17:06:12 2008] executing action "/etc/acpi/acpi_handler.sh button/lid C169 00000080 00000012"
[Sun Jan 20 17:06:12 2008] BEGIN HANDLER MESSAGES
/etc/acpi/acpi_handler.sh: line 14: /proc/acpi/button/lid/LID/state: No such file or directory
[Sun Jan 20 17:06:12 2008] END HANDLER MESSAGES
[Sun Jan 20 17:06:12 2008] action exited with status 0
[Sun Jan 20 17:06:12 2008] completed event "button/lid C169 00000080 00000012"
but if run from normal the xflock4 work without any error......strange....
btw, the lid.sh should be written like below instead of the original script from MOE-Inx how-to (without the bracket)...
event=button/lid.*
action=/etc/acpi/actions/lid.sh
below link is a good howto and tutorial for ACPI....
http://www.columbia.edu/~ariel/acpi/acpi_howto.txt