Skip to main content

Having a bit of a weird issue. So I have this script that pops a notification box open on check-in, and it's working fine, except that it won't display the branding icon in the box. It's probably easier to show than to tell, so see below (executing this script in macOS Ventura 13.0.1):

 

jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"
windowType="hud"
description="Insert description here (edited for the sake of this forum post)"
icon="~/Library/Application\\ Support/com.jamfsoftware.selfservice.mac/Documents/Images/brandingimage.png" #this path is accurate
title="macOS Update Required"
alignDescription="left"
alignHeading="center"
button1="OK"
timeout="600"

window=$("$jamfHelper" -windowType "$windowType" -lockHUD -title "$title" -timeout "$timeout" -icon "$icon" -description "$description" -alignDescription "$alignDescription" -alignHeading "$alignHeading" -button1 "$button1")

 

What am I doing wrong?

In my experience, Jamf doesn't like the current user being represented by ~

I would change this to a variable. something like...

currentUser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`

icon="$currentUser/Library/Application\\ Support/com.jamfsoftware.selfservice.mac/Documents/Images/brandingimage.png" #this path is accurate

 

Hopefully this helps. 


maybe try either removing the \\ between Application Support or the ""


maybe try either removing the \\ between Application Support or the ""


Yeah, one or the other there...I've had that cause troubles with some items over the years...


In my experience, Jamf doesn't like the current user being represented by ~

I would change this to a variable. something like...

currentUser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`

icon="$currentUser/Library/Application\\ Support/com.jamfsoftware.selfservice.mac/Documents/Images/brandingimage.png" #this path is accurate

 

Hopefully this helps. 


Nice, thanks for this! I ended up combining yours and @YanW's suggestions. This syntax gave me the result I was looking for:

icon="Users/$loggedInUser/Library/Application Support/com.jamfsoftware.selfservice.mac/Documents/Images/brandingimage.png"

 


maybe try either removing the \\ between Application Support or the ""


Thanks for this tip!