|
|
Restarting a remote Mac via AppleScript
You can also use "sudo shutdown -r now" I believe this will shut down the machine gracefully.
Restarting a remote Mac via AppleScript
"shutdown -r now" will not quit GUI apps gracefully, it simply kills them. The script method is really the way to go if you rely on GUI apps. You could even go one step further and send running apps something like "quit with saving" or "save to desktop; quit" before telling the Finder to restart. Somebody should really write this into the "perfect" AppleScript...
Restarting a remote Mac via AppleScript
Yes exactly, if you restart a machine via the shell you should use shutdown -r now (or some value). To shut it down invoke shutdown with -h instead of -r.
Restarting a remote Mac via AppleScript
since sudo is already being used why not just use
Restarting a remote Mac via AppleScript
Why not, since you're logging in remotely, simply start a VNC server and use the GUI to shut down any apps you see? If you're accessing it via a Windows client, you can get TightVNC, which offers a range of compression options to help you get optimal performance in any given VNC session. Whatever you use, you can easily use VNC if you have a computer with a broadband connection to the Internet. Here's a few tips for using VNC I've picked up, mainly from this site. I gather them here for your convenience: - use a shell script to start the vnc server whenever you want, from a command prompt. That way, you can use the next tip: ---
Restarting a remote Mac via AppleScript
Nice list, osxpounder.
Restarting a remote Mac via AppleScript
You can also tell your Mac to sleep by replacing the word 'restart' with the word 'sleep.'
I can confirm that it works quite nicely, as I now cannot SSH into my Mac at home because it is now sleeping! :) Be careful with the shutdown command unless you are certain there is nothing you need to save in the Aqua layer. Shutdown, as a UNIX-layer command, will pull the rug out from everything else. The only thing it does gracefully is offer you the opportunity to delay the actual shutdown to give other users on your Mac the chance to save their work before it actually goes down. You can also have it broadcast a message to other terminals to warn other users. Bear in mind, the only warnings users will receive are broadcast to the Terminal, not to the GUI. If someone is sitting at your Mac at home when you send the shutdown command via SSH to the terminal, that person will be in for a very unpleasant surprise. Makes for a really nasty April Fool's prank on someone...! |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.10 seconds |
|