Mac Forums

Mac Forums (http://www.mac-forums.com/forums/)
-   Apple Notebooks (http://www.mac-forums.com/forums/apple-notebooks/)
-   -   Shutdown from another computer ? (http://www.mac-forums.com/forums/apple-notebooks/8586-shutdown-another-computer.html)

Hawke 08-17-2004 08:18 AM

Shutdown from another computer ?
 
Hello !

I have a new Powerbook G4 12" with OS X of course which I am absolutely wrapped in ! My old main computer is a blue & white G3 350 running OS 9.2.2 (yuk !). Both units are networked successfully via LAN.

Would really like to use the PB as my main computer (OS X is great + have updated s/w for apps which only use OS X) and use the poor old failthful G3 as file storage. I would also like to avoid buying another monitor and use my existing monitor with the new PB G4. Only problem is to shutdown the old G3 via the PB without a monitor connected directly to it - starting up is no problem - just hit the button.

It must be simple. Anyone have a thought ?

Cheers
Hawke

Murlyn 08-17-2004 12:07 PM

I know with OS X you can just hit the power up button and then hit enter and it will shut it down, can you do that in OS 9?

hype.it 08-17-2004 08:26 PM

AppleScript version:
They may need a little editing editing when used to shut down a remote system.

Shutdown:
Code:

//begin script

tell application "Finder"
    shutdown
end tell

//end script

Restart:
Code:

//begin script

tell application "Finder"
    restart
end tell

//end script



In Mac OSX
Execute in Terminal, type carefully.

Shutdown:
Code:

sudo osascript -e 'tell application "Finder" to shut down'
Restart:
Code:

sudo osascript -e 'tell application "Finder" to restart'

Info:
If your user isn't the currently logged in user, you might get some errors in the command line, but it will work.

"sudo" might not be required.

If there is an open application with unsaved changes, the restart will time out. This is the intended behaviour. You could try to use applescript to save and exit that application (if said application is scriptable).

Note: If the remote machine absolutely positively must be restarted, and you don't want to lose any unsaved changes (and the apps aren't scriptable), you'll have to use something like Timbuktu or OSXvnc to connect to the GUI on the remote Mac. Once you've taken that effort, though, you might as well just choose Restart in the GUI as well!


All times are GMT -4. The time now is 07:23 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.