Has anyone managed to apply the following setting from the terminal?
System Prefs > Notifications > Do Not Disturb > Check When the display is sleeping
Has anyone managed to apply the following setting from the terminal?
System Prefs > Notifications > Do Not Disturb > Check When the display is sleeping
Best answer by Cayde-6
So it actually turns out trying to modify the UUID.plist file directly caused problems. The below is how I've now managed to fix the issue
loggedInUser=$(python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + " ");')
sudo -u ${loggedInUser} defaults -currentHost write com.apple.notificationcenterui dndEnabledDisplaySleep -bool YES
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.