Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gogreen1

macrumors 6502
Original poster
Nov 20, 2017
262
14
icons.PNG
I'm new to the Mac environment and working with a new Macbook Air. On my PC, I had created desktop icons for shutdown, restart, and show desktop. One click and done. How do I create these on my Mac in MacOS Sierra (latest update)? Thanks.
 
windows to show desktop is windows key plus D.

Using automator there may be a away to create an icon or desktop shortcut.
 
Don't know, but to show the Desktop, hit F11 (unless you've changed the function of that key)
Thanks, but hitting F11 brings up a volume control.
 
Take a look in System Preferences > Trackpad. Your Air has a big beautiful trackpad with many simple gestures. Learn them. They are great. One is for showing the desktop.
 
View attachment 746616 I'm new to the Mac environment and working with a new Macbook Air. On my PC, I had created desktop icons for shutdown, restart, and show desktop. One click and done. How do I create these on my Mac in MacOS Sierra (latest update)? Thanks.

There's no way to restart/shutdown a Mac with by clicking on icons.

If you want your Mac to restart without a popup dialogue you can do this by holding the option key while clicking on the shutdown or restart under the Apple menu.
 
Last edited:
There's no way to restart/shutdown a Mac with by clicking on icons.

Well............ Thats not exactly true. A few minutes of Googling and I was able to do it plus I tested out a couple of other cool options.

First thing OP can do is create a keyboard shutout to perform both actions.
https://support.apple.com/kb/PH25377?locale=en_US
I created shortcuts for both Restart and Shut Down.

Next thing OP can do is use the awesome application Better Touch Tool to invoke those shortcuts using gestures on the trackpad. I set 3 Finger Swipe Left to Restart the computer and CMD + 3 Finger Swipe Left to Shut Down the computer.

Finally, OP can use Automator to create an application that invokes an Apple Script to perform these actions. That application can be saved to the desktop or the Dock to Restart or Shut Down the computer just by clicking the application.
https://www.engadget.com/2008/01/01/mac-automation-saving-automator-workflows/
The Apple Scripts to run are:
tell application "System Events"
shut down
end tell

tell application "System Events"
restart
end tell

OP, to show the desktop, use the built in trackpad gesture to perform that action.
There is a lot of satisfaction in learning how to do this stuff yourself. I've given you a start. If you need more help, post back and I'll see if I can point you in the right direction. This isn't hard; just new/different.
 
Well............ Thats not exactly true. A few minutes of Googling and I was able to do it plus I tested out a couple of other cool options.

First thing OP can do is create a keyboard shutout to perform both actions.
https://support.apple.com/kb/PH25377?locale=en_US
I created shortcuts for both Restart and Shut Down.

Next thing OP can do is use the awesome application Better Touch Tool to invoke those shortcuts using gestures on the trackpad. I set 3 Finger Swipe Left to Restart the computer and CMD + 3 Finger Swipe Left to Shut Down the computer.

Finally, OP can use Automator to create an application that invokes an Apple Script to perform these actions. That application can be saved to the desktop or the Dock to Restart or Shut Down the computer just by clicking the application.
https://www.engadget.com/2008/01/01/mac-automation-saving-automator-workflows/
The Apple Scripts to run are:
tell application "System Events"
shut down
end tell

tell application "System Events"
restart
end tell

OP, to show the desktop, use the built in trackpad gesture to perform that action.
There is a lot of satisfaction in learning how to do this stuff yourself. I've given you a start. If you need more help, post back and I'll see if I can point you in the right direction. This isn't hard; just new/different.

Yes, I know, I didn't really want to say you could do it this way, it's not really for beginners/newbies.
But since you started I will explain this in short.

Open script editor, paste...

tell application "System Events"
shut down
end tell

....Into the area, under the file menu click export, choose export as an application run only and safe it on your desktop.
Also do this for the restart option.
So, you have now two Apps called ShutDown and Restart on your desktop but the icons are the same.
If you get info on the App you'll see something like in the screenshot below, click on the icon, it changes to blue, next choose a nice icon on an app that you want to set as the icon for the one above, again get info, click on the icon in the get info panel, it's blue, copy that one, next click on the other info panel and paste it into that one.

It's not hard if you know the tricks, for a newbie it's fairly hard.


Screen Shot 2018-01-14 at 21.27.26.png


Edit: WTF, it only works just after login, at least sleep works just after login, not later, and the other ones don't work either, tried without run only but doesn't work, will try later on again.
 
Last edited:
  • Like
Reactions: NightbirD III
Thanks, all, for the ideas. I'll experiment and see what works best for me.
 
You can create an application to do exactly what he wants. I did it and put it in my Dock. One click and it shuts down.

OP, I would however question why you want to be able to shut down or restart the computer in this manner. You really dont need to be turning off your computer like you might have done with your PC. I never shut mine down unless there is an issue or a software update. I have a couple of 27" iMacs and they stay on 24x7. They do go to sleep to save energy but I never turn them off. One of them is 2009 that is still running great. I never turn off my laptop either.
 

Attachments

  • Screen Shot 2018-01-18 at 10.32.06 AM.png
    Screen Shot 2018-01-18 at 10.32.06 AM.png
    476.5 KB · Views: 400
Thanks, dangerfish. You're right--I probably shouldn't try to turn my new Macs into Windows PCs. Still, how did you create those one-click dock items?
 
  • Like
Reactions: chabig
I referenced it above but in general:
1. Launch Automator
2. Select New Document
3. Select "Application" for new document type
4. Select Utilities
5. Select Run AppleScript
6. Paste in one of the AppleScripts I wrote above
7. Save it. You've now created an "application" that will do what you want. Put that app in the Application folder if you want and also drag it to your Dock.

The two scripts you need are written above.
 

Attachments

  • Screen Shot 2018-01-18 at 1.16.46 PM.png
    Screen Shot 2018-01-18 at 1.16.46 PM.png
    449 KB · Views: 532
  • Screen Shot 2018-01-18 at 11.56.19 AM.png
    Screen Shot 2018-01-18 at 11.56.19 AM.png
    461.8 KB · Views: 561
Thanks, dangerfish. You're right--I probably shouldn't try to turn my new Macs into Windows PCs. Still, how did you create those one-click dock items?

Made them for you, the only thing you have to ,do is to copy an Icon to them.
[doublepost=1516305027][/doublepost]
I referenced it above but in general:
1. Launch Automator
2. Select New Document
3. Select "Application" for new document type
4. Select Utilities
5. Select Run AppleScript
6. Paste in one of the AppleScripts I wrote above
7. Save it. You've now created an "application" that will do what you want. Put that app in the Application folder if you want and also drag it to your Dock.

The two scripts you need are written above.

Yup, that's how I did it right now, keep in mind you have to create a new Application for each, I was pasting other commands in the same window and saved as but still ended all three Apps do the same thing, they all three had a sleep function, when I changed the script to restart they all changed as well, odd.
 

Attachments

  • Restart.zip
    1.2 MB · Views: 627
  • ShutDown.zip
    1.2 MB · Views: 806
  • Sleep.zip
    1.2 MB · Views: 623
Made them for you, the only thing you have to ,do is to copy an Icon to them.
[doublepost=1516305027][/doublepost]

Yup, that's how I did it right now, keep in mind you have to create a new Application for each, I was pasting other commands in the same window and saved as but still ended all three Apps do the same thing, they all three had a sleep function, when I changed the script to restart they all changed as well, odd.

Many thanks for that Justperry, I've just downloaded your files and they work perfectly.

Regards ....... Stickfly
 
justperry, thanks for your automator files above.
Saved them and I will use them!

(Does MacRumors have any kind of "file archive" where useful stuff is stored? If so, these three belong there!)
 
  • Like
Reactions: Stickfly
Many thanks for that Justperry, I've just downloaded your files and they work perfectly.

Regards ....... Stickfly

justperry, thanks for your automator files above.
Saved them and I will use them!

(Does MacRumors have any kind of "file archive" where useful stuff is stored? If so, these three belong there!)

Glad you find it helpful.


Justperry,
Can the same be done to log out ?

Regards ...... Stickfly

Erm, most likely.
But, why should you do this, there's a Keyboard shortcut for this, see below:

Screenshot 2019-02-11 at 21.24.20.png


Shift-Command-Q
 
Last edited:
Thanks Justperry.
Just wanted a quick way to log out when I need to leave my MBP to do something else at work.
Found the quickest way is to set the OS to log out when shutting the lid.
Simple.
 
You can create an application to do exactly what he wants. I did it and put it in my Dock. One click and it shuts down.

OP, I would however question why you want to be able to shut down or restart the computer in this manner. You really dont need to be turning off your computer like you might have done with your PC. I never shut mine down unless there is an issue or a software update. I have a couple of 27" iMacs and they stay on 24x7. They do go to sleep to save energy but I never turn them off. One of them is 2009 that is still running great. I never turn off my laptop either.

Agreed.

Reboot your Mac once a year, whether it needs it or not. :)

Seriously, the reboots for occasional OS patches are nearly enough. 75 lab machines at work with heavy use probably get rebooted 4-6 times a year for patching. Rarely an issue.
 
Thanks Justperry.
Just wanted a quick way to log out when I need to leave my MBP to do something else at work.
Found the quickest way is to set the OS to log out when shutting the lid.
Simple.

Is there a reason to logout instead of just putting it to sleep, don't think it makes a huge difference.
 
Well, I don't do either one. I just Shut Down.
But if you log out, you obviously have to log back in.
Just putting it to sleep seems more convenient.
 
Well, I don't do either one. I just Shut Down.
But if you log out, you obviously have to log back in.
Just putting it to sleep seems more convenient.

I always leave mine off, my MBP even after a few weeks has plenty of juice in it, this means it uses little power when asleep, shutting off your computer isn't really needed.
 
Is there a reason to logout instead of just putting it to sleep, don't think it makes a huge difference.

Fair comment Justperry.
I just wanted to logout when leaving my MBP on my work desk to do something else.
Interesting to see that some users don't ever shut down. I always shut down when I leave my office and start up again when I next use my MBP, wherever that may be....... Is this not necessary ? Am I just stuck in PC mode ?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.