3

Possible Duplicate:
How do I modify the power options?

I'd like to shutdown my laptop by closing the lid; but in Power Settings there's no option to do that.

Is there any way to add "shutdown" to the pop-down list in the power settings for "when the lid is closed"? I prefer the way through the terminal without installing a third-party application.

AliNajafies
  • 5,874

1 Answers1

2

Unfortunately, you cannot add this option to the menu, because it is a hard coded list of options. You would have to write a script runs in the background that detects the lid being closed and activates the shutdown automatically.

The command you need (to check to see if the lid is closed is):

cat /proc/acpi/button/lid/LID0/state

Now, I'm no scripting junkie (bash scripting I mean), so maybe someone can edit this and give you a proper answer.

RolandiXor
  • 51,541