This gist is to remind me (and anyone else who it helps) how to quickly disable and re-enable Notification Center.
-
Open your terminal (<⌘ + ␣ (spacebar)>, then type "terminal", then press <↩ (enter)>).
-
Paste and run the following command:
echo >> ~/.profile && echo >> ~/.profile && echo '# Disable/enable notification center' >> ~/.profile && echo 'alias disableNotificationCenter="launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist && killall NotificationCenter"' >> ~/.profile && echo 'alias enableNotificationCenter="launchctl load -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist && open /System/Library/CoreServices/NotificationCenter.app/"' >> ~/.profile && source ~/.profile
To disable notification center:
disableNotificationCenter
To re-enable notification center:
enableNotificationCenter
Disable MacOS X's Notification Center entirely. But make it easy to turn it back on and disable again as needed.
I'm tired of seeing notifications that I can't dismiss, and there's no easy way to do this selectively (e.g. MacOS notifications always come through)
launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
killall NotificationCenter
launchctl load -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
open /System/Library/CoreServices/NotificationCenter.app/
This approach is a command-line-only version of the solution proposed in a great article on osxdaily.com.
No more vulnerable than prior versions of OS X before SIP came along in the first place. If you're at the stage where all that's protecting you is SIP, you might as well give up on security entirely.
SIP is practically the same as the equivalent system file protection in Windows, if you are concerned about malicious software modifying system files, I'd be trying to prevent such software getting on my machines in the first place.