Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Simplified shell script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Simplified shell script
Authored by: pecosbill on Sep 27, '06 02:04:33AM
This is great. Combined with this hint and the force hint above, I made a plain text file called Hibernate Now.command and put it on the Desktop. I change the permissions of that file so it would execute:
chmod u+x ~/Desktop/Hibernate\ Now.command
and put the following in it (I don't run secure VM):

# For added security:

/bin/sh -c "pmset force -a hibernatemode 1; sleep 16; pmset force -a hibernatemode 3" &
/usr/bin/osascript -e 'tell application "Finder" to sleep';
Using the script above, you could set it up to work with either VM mode. The great part is it requires no password nor a set uid bit which makes me nervous when that UID is root.

Pecos Bill

[ Reply to This | # ]

A helper script to enter SafeSleep on demand
Authored by: digitol on Nov 21, '05 01:38:24PM

Ok basically similar to this post, just for lazy ppl, the suspendnow app may be a better solution.!!

[ Reply to This | # ]