Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
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 ?

Nope. Not necessary.
 
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 ?


Not really necessary, closing the lid will be sufficient, it uses very little power, no-one should be able to login again if you setup a password.
 
  • Like
Reactions: Stickfly
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.

Ok here I go again ..... Time to make myself look silly.
When I want to do a backup it takes a few hours. I have a couple of cats that can go a little mad & suddenly rush around the room so I like to shut the macbook lid & leave it until the backup has finished.
I found that if I open terminal and type in : sudo pmset -a disablesleep 1 then I can shut the lid and the macbook doesn't sleep. Then when the backup has finished I open terminal again and type : sudo pmset -a disablesleep 0 and the macbook reverts back to the sleep when lid shut status.
Is it possible to make 2 desktop shortcuts similar to the Shutdown & Restart shortcuts.
Many thanks ....... Gary
 
Ok here I go again ..... Time to make myself look silly.
When I want to do a backup it takes a few hours. I have a couple of cats that can go a little mad & suddenly rush around the room so I like to shut the macbook lid & leave it until the backup has finished.
I found that if I open terminal and type in : sudo pmset -a disablesleep 1 then I can shut the lid and the macbook doesn't sleep. Then when the backup has finished I open terminal again and type : sudo pmset -a disablesleep 0 and the macbook reverts back to the sleep when lid shut status.
Is it possible to make 2 desktop shortcuts similar to the Shutdown & Restart shortcuts.
Many thanks ....... Gary

There are apps/menuextras for this, can't recall their names though, I will get back to you if I do.

https://itunes.apple.com/gb/app/insomniac/id1434172648?mt=12

Screenshot 2019-03-31 at 20.52.14.png
 
Last edited:
There are apps/menuextras for this, can't recall their names though, I will get back to you if I do.

Thanks justperry.
I have tried a few apps such as insomniac + Amphetamine but they didn't work on my macbook.
Regards ..... Gary.
 
Thanks justperry.
I have tried a few apps such as insomniac + Amphetamine but they didn't work on my macbook.
Regards ..... Gary.

I will look into the original question, I am a bit busy so I hope I will find the time.
[doublepost=1554061082][/doublepost]
Thanks justperry.
I have tried a few apps such as insomniac + Amphetamine but they didn't work on my macbook.
Regards ..... Gary.


Does this work, I made a shell script, I have no idea if this works.
There's this site/page, it might help you.

http://linuxcommand.org/lc3_wss0010.php
 

Attachments

  • Archive.zip
    1.7 KB · Views: 168
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.


View attachment 746939

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.

You've made it, flawlessly functional in OS X Yosemite, version 10.10.5, Mac mini. Worked at once, now i've just to learn to modify icons. Thx a lot.
 
I leave you a small contribution, for mac os catalina 10.15.7 button restar, shutdown and sleep.
 

Attachments

  • Dockables.zip
    9.3 MB · Views: 90
¿¿ How can i change this:

tell application "System Events"
seep
end tell

For use this: "pmset displaysleepnow" ??

pmset displaysleepnow <- works in terminal.app but in scripteditor.app when play doesnt work
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.