Notify Screen

Jamf Connect can include a notify screen that can display a progress bar, customized text, and images during Automated Device Enrollment.

The notify screen is configured by a script that writes commands to a control file. This script can then be specified with the Script Path (ScriptPath)setting.

If you use Jamf Pro, you can also configure the notify screen to read and display policy logs from Jamf Pro to users instead by configuring the Notify Screen Log Style (NotifyLogStyle) setting to the value jamf.

Enabling and Configuring the Notify Screen

  1. Add the notify mechanism to the loginwindow application by executing the following command:
    /usr/local/bin/authchanger -reset -JamfConnect -Notify
  2. Create a notify script.
 The notify script writes echo commands to a control file. The control file is stored at the following file path: /var/tmp/depnotify.log
 The following script is an example:
    #!/bin/zsh
    #variables
    NOTIFY_LOG="/var/tmp/depnotify.log"
    #For TOKEN_BASIC, use same file path location as set for OIDCIDTokenPath in com.jamf.connect.login
    TOKEN_BASIC="/tmp/token"
    TOKEN_GIVEN_NAME=$(echo "$(cat $TOKEN_BASIC)" | sed -e 's/\"//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | grep given_name | cut -d ":" -f2)
    TOKEN_UPN=$(echo "$(cat $TOKEN_BASIC)" | sed -e 's/\"//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | grep upn | cut -d ":" -f2)
    
    echo $TOKEN_GIVEN_NAME
    echo $TOKEN_UPN
     
    echo "STARTING RUN" >> $NOTIFY_LOG # Define the number of increments for the progress bar
    echo "Command: Determinate: 6" >> $NOTIFY_LOG
     
    #1 - Introduction window with username and animation
    echo "Command: Image: /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/com.apple.macbookpro-15-retina-touchid-silver.icns" >> $NOTIFY_LOG
    echo "Command: MainTitle: Welcome, $TOKEN_GIVEN_NAME" >> $NOTIFY_LOG
    echo "Command: MainText: Your Mac is now enrolled and will be automatically configured for you." >> $NOTIFY_LOG
    echo "Status: Preparing your new Mac..." >> $NOTIFY_LOG
    sleep 10
     
    #2 - Setting up single sign-on passwords for local account
    echo "Command: Image: /System/Applications/Utilities/Keychain Access.app/Contents/Resources/AppIcon.icns" >> $NOTIFY_LOG
    echo "Command: MainTitle: Tired of remembering multiple passwords? \n $TOKEN_GIVEN_NAME " >> $NOTIFY_LOG
    echo "Command: MainText: We use single sign-on services to help you sign in to each of our corporate services.
    Use your email address and account password to sign in to all necessary applications." >> $NOTIFY_LOG
    echo "Status: Setting the password for your Mac to sync with your network password..." >> $NOTIFY_LOG
    sleep 10
     
    #3 - Self Service makes the Mac life easier
    echo "Command: Image: /Applications/Self Service.app/Contents/Resources/AppIcon.icns" >> $NOTIFY_LOG
    echo "Command: MainTitle: Self Service makes Mac life easier" >> $NOTIFY_LOG
    echo "Command: MainText: Self Service includes helpful bookmarks and installers for other applications that may interest you." >> $NOTIFY_LOG
    echo "Status: Installing Self Service..." >> $NOTIFY_LOG
    sleep 10
     
    #4 - Everything you need for your first day
    ###Jamf Triggers
    echo "Command: Image: /System/Library/CoreServices/Install in Progress.app/Contents/Resources/Installer.icns" >> $NOTIFY_LOG
    echo "Command: MainTitle: Installing everything you need for your first day." >> $NOTIFY_LOG
    echo "Command: MainText: All the apps you will need today are already being installed. When setup is complete, you'll find Microsoft Office, Slack, and Zoom are all ready to go. Launch apps from the Dock and have fun!" >> $NOTIFY_LOG
    echo "Status: Installing Microsoft Office..." >> $NOTIFY_LOG
    /usr/local/bin/jamf policy -event "InstallOffice"
    sleep 5
     
    #5 - Finishing up
    echo "Command: Image: /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ApplicationsFolderIcon.icns" >> $NOTIFY_LOG
    echo "Status: Installing Slack..." >> $NOTIFY_LOG
    /usr/local/bin/jamf policy -event "InstallSlack"
    sleep 5
    echo "Status: Finishing up... We're almost ready for you, $TOKEN_GIVEN_NAME" >> $NOTIFY_LOG
    sleep 3
     
    ###Clean Up
    sleep 3
    echo "Command: Quit" >> $NOTIFY_LOG
    sleep 1
    rm -rf $NOTIFY_LOG
     
    #6 - Disable notify screen from loginwindow process
    /usr/local/bin/authchanger -reset -JamfConnect	

    To download example scripts as a starting point, see Jamf's GitHub repository: https://github.com/jamf/jamfconnect

  3. Use your preferred configuration method to specify the file path to your script with the Script Path (RunScript) setting.
 For more information, see Configuration.

Notify Script Commands

General Commands

The following commands are commonly used to display the the notify screen.

Image:

This command replaces the default notify image with an image at a specified path. The image will automatically scale to the correct size.

Example:

Command: Image: /tmp/logo.png

MainText:
This command changes the main text displayed to users.
Example:

Command: MainText: Please wait while your new MacBook Pro is set up.

MainTextImage:

This command replaces the main text with a custom icon at a specified path. Images can be up to 660 x 105 pixels and scale proportionally to fit.

Example:

Command: MainTextImage: /tmp/logo.png

MainTitle:

This command changes the main title displayed to users.

Example:

Command: MainTitle: Welcome to your new MacBook Pro

Interactive Commands

Interactive commands are used to customize the user interaction during the notify process.
Determinate:
This command sets the the progress bar to be "determinate", progress in steps, instead of displaying a spinning bar. You must specify the number of steps you want to use during the notify process. Once set, every status update in your script will increment the bar by one stage.
Example:

Command: Determinate: 5

DeterminateManual:
This command sets the progress bar to be determinate and progress manually rather than with stage commands. You must specify the number of steps you want during the notify process. Once set, you must manually progress the status bar using the DeterminateManualStep: command.
Example:

Command: DeterminateManual: 5

DeterminateManualStep:
When in DeterminateManual: mode, this command will advance the progress bar by one step or a specified interval. The example below moves the progress bar by two steps.
Example:

Command: DeterminateManualStep: 2

DeterminateOff:
This command disables the determinate state for the progress bar. Steps that already occurred remain completed in the progress bar. This allows you to move between a determinate state and non-determinate state without losing your progress.
Example:

Command: DeterminateOff:

DeterminateOffReset:
After turning off the determinate state of the progress bar, you must reset it to zero.
Example:

Command: DeterminateOffReset:

Quit
This command quits the notify process.
Example:

Command: Quit

A colon is not used with this command.
You can also specify a message to display to users.
Example:

Command: Quit: Thanks for using this app.

Notify Status Updates

You can use echo Status: to update users on the notify process. The following is an example of a status update:

echo Status: Installing Jamf >>/var/tmp/depnotify.log
Note:

If the Determinate: command is used, the progress bar increments with each status update.

If you use Jamf Pro, you can also configure the notify screen to read and display policy logs from Jamf Pro to users instead by configuring the Notify Screen Log Style (NotifyLogStyle) setting to the value jamf.

Notify Screen End User Experience

The following screen display an expected end user experience when the notify screen is enabled during Automated Device Enrollment:

  1. Introduction window with username and animation
  2. Setting up single sign-on passwords for local account
  3. Self Service makes the Mac life easier
  4. Installing everything you need for your first day
  5. Finish up