Suppress Apple Update Notification

bthomason
New Contributor II

Is there a good way to get disable the Apple Update notification that comes up all the time? Thanks
external image link

15 REPLIES 15

gregneagle
Valued Contributor

You can do it indirectly by turning off checking for updates:

/usr/sbin/softwareupdate --schedule off

nessts
Valued Contributor II

but, if you have iLife it will still pop up for those apps which are not part of the software update process, so you can remove some files, which have been posted here in the Nation that tell the app its an app store app, and then they will stop checking as well.

sggr57a
New Contributor II

I've disabled notification center for right now and it seems to be working well here.

/bin/launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
/usr/bin/killall NotificationCenter

bthomason
New Contributor II

I didn't want to disable Notification Center entirely because in 9.0 you can use it to notify users of what the policies are doing. I just wanted that Apple one to go away, since it comes up every time.

agurley
New Contributor II

hey, Nessts, I've been looking for the info that you mentioned but I can't really find what I am looking for. Can you point me in the right direction? I am looking to suppress the update notifications for iWork/iLife apps only. I tried deleting the _MASReceipt directory that's inside the app bundle as was mentioned at http://acdesigntech.wordpress.com/2013/03/06/disable-mac-app-store-receipts-to-reenable-downloaded-u... but I didn't have success with that. Oh btw you were in my cca class back in the fall, and you're right, you *do* post a lot! Thanks for your help.

taugust04
Valued Contributor

I'm looking to do this in a public lab running Mavericks, with a script that runs on startup or login. My shell script contains just one line:

launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist

If I run this script at startup, it doesn't do anything, and the notification center appears when users login.
If I run this script at login, I get the error message "launchctl: Error unloading: com.apple.notificationcenterui.agent", and the notification area still appears.

I'm guessing this is because Casper is executing this script as root at startup or login, and it most likely needs to be executed as the currently logged in user. Any thoughts on how to do that? I'm still working on my scripting skills in relation to Casper Administration.

I'm not worried if this suppresses all notifications, since in a public lab (I feel) that they aren't necessary.

~Ted

taugust04
Valued Contributor

Hmm, surprised there hasn't been more discussion on this one. I noticed a few other threads that discussed suppressing the notification center had no responses. Is this something people aren't bothering with?

CarrieNZ
New Contributor III

I'm interested in any progress on this. I'd like to leave notification center enabled for JSS notifications but run SUS internally and don't want the app store prompting users to upgrade to Mavericks in the lab which is still running 10.8.

tkimpton
Valued Contributor II

I use this as an offline policy at login and reocurring check-in to all machines

#!/bin/bash

################### ENVIRONMENT VARIABLES #########################

# Get the currently logged in user
user=`ls -l /dev/console | cut -d " " -f4`


################## DO NOT MODIFY BELOW THIS LINE ##################

# Run the command as the currently logged in user
sudo su "${user}" -c "/bin/launchctl unload /System/Library/LaunchAgents/com.apple.notificationcenterui.plist > /dev/null 2>&1"


exit 0

I then run this script to enable it quickly before i use Message to display when the policy is complete in the User Interaction tab.

#!/bin/bash

################### ENVIRONMENT VARIABLES #########################

# Get the currently logged in user
user=`ls -l /dev/console | cut -d " " -f4`

################## DO NOT MODIFY BELOW THIS LINE ##################

# Run the command as the currently logged in user
sudo su "${user}" -c "/bin/launchctl load /System/Library/LaunchAgents/com.apple.notificationcenterui.plist > /dev/null 2>&1"

exit 0

Not brilliant because then the user could get annoying Apple messages within the jss check-in time but its better than nothing :)

acdesigntech
Contributor II

@tkimpton couldn't you just unload the notificationcenterui again as a last command before the exit? Give it maybe a 30 second sleep before doing so. Still isn't great, but better than 15 minutes.

tkimpton
Valued Contributor II

@acdesigntech no unfortunately not. If I was using cocadialog and script yes. I'm using a script toi disable it before, then the built in user interaction to show messages when the policy has been completed.

If I were to include the script to disable notifications AFTER, then the users never get the message (when policy completed) because its been enabled again.

If I put a sleep command in, it will do the same but with the added pause

franton
Valued Contributor III

We use @gregneagle 's suggestion, but we've placed it in our first run script. Works like a dream.

tkimpton
Valued Contributor II

@franton @gregneagle thanks i will use that. Not sure why i didn't see it lol

taugust04
Valued Contributor

I ended up backing up and deleting the following file on my lab computers:

/System/Library/LaunchAgents/com.apple.notificationcenterui.plist

After deleting, the Notification Center no longer launches at login. I'm working on integrating @gregneagle's fix into our faculty and staff deployments as well, but I needed a quick fix to resolve some end-user complaints on our public computers about the "naggy" notifications they were getting. Obviously, with this being a system file, I'll have to keep an eye out to see if it gets re-installed during future updates.

seanbalsiger
New Contributor III

I haven't disabled the App Store app notifications but I created an extension attribute that records whether automatic update checks are on or off then created a smart group that includes clients that have automatic checks turned on and scoped an ongoing policy triggered by recurring checkin to that group that runs a script that just has the command above that turns them off. Extension attribute script is below.

#!/bin/sh

softwareupdate --schedule | awk '{ print "<result>" $4 "</result>" }'