Can the "What's new in mac os sierra" notification be suppressed for new users?

agerson
New Contributor III

Can the "What's new in mac os sierra" notification be suppressed for new users?

c9fe9950d6bb49149136f1c3b9bb3cd0

9 REPLIES 9

jared_f
Valued Contributor

Yes, someone made a .mobileconfig for it here.

Cornoir
Contributor II

Here is a script for Disabling Tour Notifications since I get a Failed to Open message trying to access the link above.

!/bin/bash

# disableTourNotifications.sh

Brad Vrooman

Updated by Moe

# Attempts to disable the macOS "Take a Tour" notifications for the user account passed in $consoleUsername .

It is possible that this script may need to be run at each login to prevent reappearance.

stat -f%Su /dev/console

consoleUsername=$(stat -f %Su /dev/console)

Initialize the array of urls

tourURLs=()

Get all of the "Tours" plist files

for toursFile in $(ls /System/Library/PrivateFrameworks/Tourist.framework/Resources/Tours*.plist); do

# Find out how many URLs are in the file urlCount=$(/usr/libexec/PlistBuddy $toursFile -c "print :" | grep url | wc -l 2> /dev/null)

# Add each URL to the array for arrayElement in $(seq 0 $urlCount); do tourURLs=(${tourURLs[@]} $(/usr/libexec/PlistBuddy $toursFile -c "print :$arrayElement:url" 2> /dev/null)) done
done

Add each URL to the user's com.apple.touristd domain with the value set to the current date

for singleURL in ${tourURLs[@]}; do su $consoleUsername -c "defaults write com.apple.touristd $singleURL -date "$(date)""
done

exit 0

agerson
New Contributor III

@jared_f I added this as a config profile and it is being pushed out to my machines, but it did not suppress the dialogue.

Cornoir
Contributor II

I use outset (https://github.com/chilcote/outset) and have it run as login-once as it has to be run per user. Works 100% on my images.

bvrooman
Valued Contributor

I came by to post my script, but I see that I'm already here. :)

I run that script in a login policy, so I can always count on the jamf binary filling the username variable; that lets me use $3 instead of $consoleUsername, with a check at the beginning to make sure the variable isn't empty. The version that @Cornoir posted could be run whenever.

calumhunter
Valued Contributor

Hmm

Why not just do this as a login script?

# Dismiss all the touristd 'tours'
/System/Library/PrivateFrameworks/Tourist.framework/Versions/A/Resources/touristd dismiss

Tophernad
New Contributor II

I thought the same thing @calumhunter and tired to do that. The command needs to have the user logged in before you can use it. If you use the command during the login policy you will get an error from Notification Center.

2018-04-12 12:34:37.060 touristd[1286:6496] NSNotificationCenter connection invalid<br/>2018-04-12 12:34:37.060 touristd[1286:6496] NSNotificationCenter connection invalid

Otherwise, it works great.

allanp81
Valued Contributor

Add as a login agent on the machine so that it runs as the user logs in?

calumhunter
Valued Contributor

What @allanp81 said.

Doesn't jamf have the ability to run login scripts as the user? I thought it did? Its been a while since i've been at the console of Jamf.

I use Outset to run all my login scripts, it can run them as root or the user.