LockDown Posted November 28 Share Posted November 28 (edited) How to tell osascript in one liner to show this prompt... @chris1111? Edited Saturday at 07:47 AM by LockDown Link to comment https://www.insanelymac.com/forum/topic/360313-solvedhow-to-show-restartshutdown-prompt/ Share on other sites More sharing options...
Anto65 Posted Thursday at 08:49 AM Share Posted Thursday at 08:49 AM " defaults write com.apple.loginwindow PowerButtonSleepsSystem -bool no " 1 Link to comment https://www.insanelymac.com/forum/topic/360313-solvedhow-to-show-restartshutdown-prompt/#findComment-2828451 Share on other sites More sharing options...
LockDown Posted Thursday at 08:59 AM Author Share Posted Thursday at 08:59 AM (edited) That command will disable it. Im asking for command in terminal to display that dialogue Edited Thursday at 08:59 AM by LockDown Link to comment https://www.insanelymac.com/forum/topic/360313-solvedhow-to-show-restartshutdown-prompt/#findComment-2828452 Share on other sites More sharing options...
Anto65 Posted Thursday at 09:08 AM Share Posted Thursday at 09:08 AM (edited) Have you tried? I just gave the command this is the result You can also use defaults write com.apple.loginwindow PowerButtonSleepsSystem -bool yes in both cases the dialog box is shown (at least in my case) Edited Thursday at 09:16 AM by Anto65 2 Link to comment https://www.insanelymac.com/forum/topic/360313-solvedhow-to-show-restartshutdown-prompt/#findComment-2828453 Share on other sites More sharing options...
LockDown Posted Thursday at 10:57 AM Author Share Posted Thursday at 10:57 AM 1 hour ago, Anto65 said: Have you tried? I just gave the command this is the result Hi @Anto65 yes i tried, and it only enable/disable the prompt when i press the power button. What im trying to do is to write a command in a script to popup that dialogue prompt Link to comment https://www.insanelymac.com/forum/topic/360313-solvedhow-to-show-restartshutdown-prompt/#findComment-2828455 Share on other sites More sharing options...
LockDown Posted Thursday at 12:07 PM Author Share Posted Thursday at 12:07 PM (edited) @Anto65 what im trying to do is similar to this: osascript -e 'tell app "loginwindow" to «event aevtrrst»' Edit: Got it👍 Edited Saturday at 07:48 AM by LockDown Link to comment https://www.insanelymac.com/forum/topic/360313-solvedhow-to-show-restartshutdown-prompt/#findComment-2828456 Share on other sites More sharing options...
Recommended Posts