Quote: Originally Posted by
joshuo 
Hello,
Is there a way to make the computer sleep when the power button is pressed?
I know apple desktops behave this way, but the laptops pop up a little window when the PB is pressed, giving the option to Cancel, Sleep, Restart, or Shutdown.
Hi, I'm in the early stages of laying out my system, but I'm planning on using a laptop as well, and have researched this a bit. There are a number of options that can be configured with the command line utility
pmset. In your case, this should do the trick:
sudo pmset powerbutton 1
On my MacBook Pro (10.5.7), though, this doesn't work. In fact, when I list my current settings, there is no powerbutton option. If you type pmset -g at the terminal prompt, and see a setting for powerbutton, then this should work for you.
Two settings that I need to change for my setup are acwake = 1 so that my computer will wake as soon as the power charger turns on, and setting the system to sleep after 1 minute when on battery power (-b sleep 1). The autorestart = 1 option may also be useful, this would boot the system when power is applied if it had unexpectedly shut down, which I'm assuming would be the case if the battery had died from sleeping too long.