3

How would I create an icon on my Mac OS X desktop, to do a "shut down"? (With... or without... the "are you sure" verification.)

4 Answers 4

7

Open AppleScript Editor.

Paste in the following code:

tell application "Finder" to shut down

AppleScript Editor

Click File » Save, save it to the Desktop, selecting File Format: Application.

If you've saved it as the correct format, the icon should look like this:

Applescript Application

10
  • I'll try that tomorrow. (But I have no idea where the "AppleScript Editor" is located...or how to run it.) Can I also turn on/off the "are you sure" part of shut-down?
    – Margret
    May 19, 2010 at 5:34
  • you can press command(apple) + Space to open a spotlight search in the upper right corner, then type "AppleScript Editor" to search for it. Or find it in Applications/Utilities
    – warrenkopp
    May 19, 2010 at 11:59
  • Ok... I "almost" got it work. When I double-click on my icon... it now opens the Editor EVERY time... and I have to find/hit "RUN" EVERY time. Am I close? What would I need to do to make it "just run immediately"? (I really need a step-by-step list of how to do this. I have 17 years of Windows experience. But 0 on my Mac. This is exactly why.)
    – Margret
    May 20, 2010 at 15:18
  • You forgot to set the File Format to "Application" when you saved the script. There's a popup at the bottom of the Save dialog. Open it in AppleScript Editor and save it again.
    – ghoppe
    May 20, 2010 at 16:13
  • I saved it as an Application. Now it seems to take an EXTREMELY long time to load... then it STILL asks "are you sure you want to run this app?" And to quit my current session... I have to remember to click RUN (not quit). And to continue to run my Mac... I have to remember to hit QUIT. (Not run.) Isn't there ANYTHING I can do: Just 1 icon. I double-click it... and that's it. It shuts-down and I'm instantly done.
    – Margret
    May 24, 2010 at 5:33
3

If you're just looking for a very quick and convenient way to shut down, hit the power button on any MacBook, or Ctrl-Eject on any desktop keyboard, then hit Return or Enter to accept the default (Shut down).

5
  • I was just typing this answer - I do this all the time.
    – Kevin Yap
    May 19, 2010 at 2:56
  • For an even faster "shut down" hold down Command (Apple) + Control when pressing the power button. This technically isn't a shutdown though and is more a hard power loss.
    – Josh K
    May 19, 2010 at 4:28
  • How are all those long,"impossible to remember" steps... the same as "create a desktop alias" that you just click?
    – Margret
    May 19, 2010 at 5:32
  • @Margret Hitting control+eject is long and impossible to remember?
    – ghoppe
    May 19, 2010 at 15:09
  • Remembering "control"... remembering "eject" (that makes no sense at all)... then return... or enter... then shut-down. I need ONE step: Click the icon marked shut-down: Done. Instantly. Looks like ghoppe's idea is (by far) the best.
    – Margret
    May 22, 2010 at 1:24
0

If you are looking for an even faster way to shut down without having to click on an icon, press fn + control + alt/option+ command/apple + eject button to have it immediately shut down without any prompt.

-1

Type "sudo halt" in Terminal and then cd desktop it so when you open it will close. To restart it, replace "halt" with "reboot"

1
  • How does shutting down the machine from a terminal window achieve the goal of adding an icon to the desktop? Mar 3, 2016 at 0:30

You must log in to answer this question.