Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Put OS X to sleep from the command line?

Put OS X to sleep from the command line?
Thread Tools
Mac Elite
Join Date: Feb 2002
Location: Hilton Head, SC
Status: Offline
Reply With Quote
Jun 10, 2003, 02:00 PM
 
I got a pda that has a wireless connection with which I can connect to my G4 wirelessly through ssh.... It would be great to be able to put it to sleep from ssh and then be able to wake it whenever for misc tasks.. is this possible?
     
Mac Elite
Join Date: Mar 2001
Status: Offline
Reply With Quote
Jun 10, 2003, 08:20 PM
 
Yes. To sleep:

http://www.snoize.com/SleepNow/

If you're always logged in:

sudo osascript -e 'tell app "Finder" to sleep'

To wake up:

On a remote OS X machine:

WakeUp: http://www.coriolis.ch/article18.html

On any remote machine with perl:

Wakeonlan: http://gsd.di.uminho.pt/jpo/software/wakeonlan/
     
Mac Elite
Join Date: Mar 2001
Status: Offline
Reply With Quote
Jun 10, 2003, 08:24 PM
 
Also: Since you're doing this with a PDA, you'll need to find something that lets your PDA send out the "magic packet" that wakes up a machine when it is sleeping. Perhaps there is a tool for your particular PDA OS (PocketPC, PalmOS), or perhaps you can get a perl interpreter.

It would likely be easier to leave the machine always awake, and, if conserving energy is the goal, set the monitor to sleep and the hard disk to spin down. The machine is always ready for use, but is consuming very little power. If, on the other hand, paranoia is at work (i.e., "evil h4xx0rs will get me"), then knock yourself out.
     
Mac Elite
Join Date: Nov 2001
Location: Trafalmadore
Status: Offline
Reply With Quote
Jun 10, 2003, 08:53 PM
 
Originally posted by piracy:
Also: Since you're doing this with a PDA, you'll need to find something that lets your PDA send out the "magic packet" that wakes up a machine when it is sleeping. Perhaps there is a tool for your particular PDA OS (PocketPC, PalmOS), or perhaps you can get a perl interpreter.
Good info there piracy. that was going to be my next question : what sends the magic 'packet' ?
So you have been able to wake a sleeping make with the coriolis software?
     
Mac Elite
Join Date: Mar 2001
Status: Offline
Reply With Quote
Jun 10, 2003, 09:55 PM
 
Originally posted by SMacTech:
Good info there piracy. that was going to be my next question : what sends the magic 'packet' ?
So you have been able to wake a sleeping make with the coriolis software?
For info on the WOL (Wake On LAN) packet, the "magic packet", see:

http://gsd.di.uminho.pt/jpo/software...i-howto-2.html

And yes, you can wake any WOL-compliant sleeping machine with the WakeUp software.
     
Mac Elite
Join Date: Feb 2002
Location: Hilton Head, SC
Status: Offline
Reply With Quote
Jun 11, 2003, 04:12 PM
 
Thank you piracy, excellent information!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:31 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2