Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I sometimes shut down my Mac, and I cannot wait it shuts down because I am urgently requested to do something in another office that would require some hours. In some cases, an application that opens a dialog box asking if I really want to close the application blocks the shut down, and when I return I find the Mac still on.
Is there a way to force the Mac to close any applications, instead of blocking the shut down?

share|improve this question
add comment

1 Answer 1

up vote 12 down vote accepted

All you need is to open Terminal.app and type:

sudo shutdown now

That way the system will be forced to terminate all open programs, ignoring any unsaved file changes.

So, in order to be able to launch it via the desktop, you need to open Applescript editor, and type:

do shell script "shutdown now" with administrator privileges

Save the script as an Application, and drag it in your Dock, or somewhere where you'll find it instantly.

share|improve this answer
2  
+1 for terminal and the often-underused Applescript variation, which are both perfect. I would, however, suggest that you introduce a confirmation dialogue if you put this Applescript application in your Dock (to avoid ruining your day if you accidentally clicked it)! –  msanford Apr 19 '11 at 13:10
1  
@msanford Thank you! The applescript will ask for your password, so if you changed your mind or accidentally clicked it, then you may just click on cancel! –  nuc Apr 19 '11 at 13:11
    
Nuc, but of course it will ask with "with administrator privileges". Duh. Problem solved and caveat retracted. ;) –  msanford Apr 19 '11 at 16:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.