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
Open AppleScript Editor.
Paste in the following code:
tell application "Finder" to shut down
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:
-
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?– MargretMay 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 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.)– MargretMay 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.– ghoppeMay 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.– MargretMay 24, 2010 at 5:33
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).
-
-
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 KMay 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?– MargretMay 19, 2010 at 5:32
-
-
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.– MargretMay 22, 2010 at 1:24
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.
Type "sudo halt" in Terminal and then cd desktop it so when you open it will close. To restart it, replace "halt" with "reboot"
-
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