Suppress "New to Mac?"

Chuey
Contributor III

Currently working on our Sierra deployment and i hate the "New to Mac?" notification that pops out.

Is anyone suppressing this from popping up on their users and if so how did you accomplish that?

Thanks in advance for any help.8e06fd50154645bcbbd41d25874cbf5d

2 ACCEPTED SOLUTIONS

CasperSally
Valued Contributor II

oklair
New Contributor III

@Chuey I just found @carl's configuration profile for macOS Mojave:
macOS_Mojave_touristd.mobileconfig

I applied it at the user computer level and it seems to work just fine! Thanks @carl!

Update: the configuration profile seems to work on several models, but not on all of them...

View solution in original post

33 REPLIES 33

bvrooman
Valued Contributor

I noticed that Sierra is a little more insistent on taking that tour than previous versions were, so this is my (mostly-unverified) script. I haven't had a chance to validate this very widely yet, but on a couple of test boxes it seemed to do what you're asking for.

#!/bin/bash

#####
# disableTourNotifications.sh
# Brad Vrooman
###
# Attempts to disable the macOS "Take a Tour" notifications for the user account passed in $3.
# It is possible that this script may need to be run at each login to prevent reappearance.
#####

if [[ $3 == "" ]]; then
    echo "No username provided in expected argument."
    exit 1
fi

# 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 $3 -c "defaults write com.apple.touristd $singleURL -date "$(date)""
done

exit 0

Credit to Carl Ashley for getting me on the right path and finding these files/keys.

CasperSally
Valued Contributor II

ImAMacGuy
Valued Contributor II

when would you set this to run? can it be done at image time/first boot or at user login?

bvrooman
Valued Contributor

In my testing I've run the script at login (and it's a quick run, so I've left it "Ongoing" on my test boxes with no noticeable effect).

The profile should also work, with two caveats:
1. It will need to be updated as new URLs are added to the Tours*.plist files
2. There might come a time when touristd stops "trusting" a relatively-old firstOSLogin value, such as after a major OS update

Other than that, it's another way to accomplish the same thing.

CapU
Contributor III

Not having any luck with this. Roughly 5-10 minutes after logging in, the banner pops up. When I run the profile for disabling:
Script result: /Library/Application Support/JAMF/tmp/test.mobileconfig: line 1: syntax error near unexpected token `newline'
/Library/Application Support/JAMF/tmp/test.mobileconfig: line 1: `'
Error running script: return code was 2.

Anyone else with issues?

CapU
Contributor III

Succeeded. I uploaded as a custom setting in a configuration profile and and appears to be working.

P.S. Not working. The blasted banner is back. I reimaged the machine to be sure the profile was being applied. It's not and it's driving me nuts now.

CapU
Contributor III

Here is the updated script that runs when the user logs in:

# disableTourNotifications.sh

Brad Vrooman

Updated by CapDragon

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

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)

if [[ $3 == "" ]]; then

echo "No username provided in expected argument."

exit 1

fi

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

StoneMagnet
Contributor III

@CapU Use a triple-backtick (```) before and after your script so that it will display without being reformatted.

CapU
Contributor III

Thanks @StoneMagnet

CapU
Contributor III

Corrected script

#!/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

carl
New Contributor II

Just bumping this in the recent release of High Sierra...

The preference keys have changed a bit in macOS 10.13 - this profile has worked for me in my testing of a clean install of High Sierra.
https://gist.github.com/carlashley/0874fc5ba65897eff4ad38082e74ea38

Josh_A1
New Contributor II

Thanks Carl. Champion as always.

CasperSally
Valued Contributor II

thanks @carl for sharing the HS version. testing with 10.13.4.

spgsitsupport
New Contributor

On 10.13.6 ther is NO plist

/System/Library/PrivateFrameworks/Tourist.framework/Resources/Tours*.plist

Seb

MrRoboto
Contributor III

How are you addressing the tours in 10.13.6 if there is no plist?

metalfoot77
Contributor II

@MrRoboto did you ever get an answer on this question about 10.13.6 and the tours?

MrRoboto
Contributor III

@kricotta Not yet, I am going to test deploying managed preferences for com.apple.touristd.plist via a configuration profile.

metalfoot77
Contributor II

@MrRoboto I am testing out the config profile at https://gist.github.com/carlashley/0874fc5ba65897eff4ad38082e74ea38 and so far it doesn't appear to be doing anything.

Chuey
Contributor III

Bump.

Has anyone figured this out for 10.13.6?

Chuey
Contributor III

Bump again -- does anyone have a fix for this in 10.13.6 or 10.14 ? So Annoying...

Chuey
Contributor III

@kricotta @MrRoboto Did you guys ever figure out a way to suppress these messages in 10.13.6 or 10.14+? Any help would be appreciated -- it's so annoying.

thank you

gda
Contributor

I'm thinking about why I would disable the "New to Mac" notification. But I don't find any reasons.

Is it just one notification or does this notification prompt you every day?
Whats so wrong with the "New to Mac" website?

I don't have a Mac at hand. Maybe the pref is not in ~/Library/Preferences anymore, but in a different folder. Maybe in ~/Library/Containers?

oklair
New Contributor III

@Chuey I just found @carl's configuration profile for macOS Mojave:
macOS_Mojave_touristd.mobileconfig

I applied it at the user computer level and it seems to work just fine! Thanks @carl!

Update: the configuration profile seems to work on several models, but not on all of them...

Chuey
Contributor III

@oklair Thanks so much! Awesome find.

donjakubczak
New Contributor III

Hey Guys how are you applying this? I copied the text into Bbedit saved the file and tried to upload it as a config profile. This is my first time to attempt uploading one.

Thanks for any direction.

donjakubczak
New Contributor III

Ah never mind I forgot about using CLI to covert to plist.

Chuey
Contributor III

BUMP!

Does anyone have a config profile for macOS Catalina?

Mark_Major
New Contributor III

@Chuey - I've just deployed the Mojave config profile to two devices, one of which is running Catalina, and so far no prompt after creating a fresh user.

I will update tomorrow if the popup does eventually appear.

Chuey
Contributor III

@Mark.Major Hey Mark, are you able to share the config profile you are using?

CasperSally
Valued Contributor II

Anyone have a working profile for Catalina? My Mojave one isn't suppressing the tour prompt as suggested above. You have any luck @Chuey ?

Tangentism
Contributor III

@CasperSally You can use ProfileCreator to create a working config profile to suppress the Catalina tour notification

41d6618f4af5475db04615f197d68bbc

Chuey
Contributor III

@CasperSally No luck yet. Still looking for a solution on mojave and catalina. Please let me know if you find something out. Thank you

Mark_Major
New Contributor III

Hey all, sorry for the very delayed response. Unfortunately no luck at my end, the notifications did appear at the time. I didn't have time though to go through it, and it was decided that despite being a minor nuisance, it caused minimal issue, so I'll be reviewing it later in the year.