Long story short, I found a way to make a laptop power down when the lid is closed and no one is logged in. When the lid is closed, the acpi script /etc/acpi.lid.sh (called by /etc/acpi/events/lidbtn) tests for the active user, and runs a screenblank script. If no one is logged in, the test fails and nothing happens; the laptop stays on, the backlight and screen stay on until the global sleep even takes place. (the other half of the script handles a lid open event).
Someone reported this as a bug, and his solution was change the event action from lid.sh to powerbtn.sh, but this overrides a user's power preferences. That's not really a bad thing, but I want to respect every user on the system. More importantly, I still want to make sure the laptop shuts off if lid=closed and users=0. I'm not a fluent script programmer, but I understand the syntax and I saw that lid.sh didn't do anything if users=0. So, I gave it an else handler and called /sbin/shutdown. Now, if users=0 and lid=closed, it shuts down; if users>0 and lid=closed, it obeys the active user's power preferences. I wasn't sure where to document this, I'm not subscribed to any of the bug or feature forums. So I thought this would be a good first place. Thoughts? Flames? Thanks, Larry _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
