|
|
Put computer to sleep remotely via command line?
|
|
|
|
Posting Junkie
Join Date: Sep 2001
Status:
Offline
|
|
As the title implies, this is what I wish to accomplish. I would like to be able to SSH into my Power Mac to put it to sleep remotely sometimes, but I can't quite seem to find a clear answer on how to do it exactly, and I'm sure one of the fine fellow Mac nerds knows here. Either with some UNIX command, or maybe using Applescript via the command line? Whatever way is easiest—but I wouldn't mind learning more than one way, if just for the sake of knowing.
Thanks, dudes!
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Nov 2001
Location: fourth sector
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Jan 2001
Location: The Sar Chasm
Status:
Offline
|
|
According to Charles S in the Lounge computer trickery thread, its:
osascript -e 'tell application "System Events" to sleep'
Not sure about the quotes, but maybe he'll pop up here.
|
When a true genius appears in the world you may know him by this sign, that the dunces are all in confederacy against him. -- Jonathan Swift.
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
Yep, it's just what you posted above. The quotes are the way they are because AppleScript requires double quotes while the shell can handle either single or double quotes, so if you put the double quotes inside the single quotes, you don't need to escape them.
Keep in mind that as soon as the machine sleeps, your SSH connection will get cut off.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Sep 2001
Status:
Offline
|
|
Awexome. Exactly what I wanted to perform. No worries about losing the connection. Thank you, Charles.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|