Skip to main content
Question

Help with User Notification


Forum|alt.badge.img+12

Am I a missing something with a user notification policy.

The notification pops up in the right and really does not display the entire message, and goes away too fast.

Practically useless if one is trying to get a user's attention. I am in the process of sending out a notification to our Mac users that (a static group), that alerts them that this Mac is up for Refresh and to go to a website to sign up for a replacement.

I have also tried using the jamf displayMessage command, and it works, but one cannot copy any text on the message. That is going to be a drag for users. Is there a way to format this as a clickable hyperlink, or just another way to approach this completely. Thx in advance, john

Forum|alt.badge.img+12
  • Valued Contributor
  • June 7, 2016

Hi

I made a script to get the serial number from the attached display and it copies it to the clipboard (the pbcopy command), i'm not sure if it's possible to add a url into jamfhelper though.

There's probably a way to launch a browser with your url from within the script, could add that if the user clicks Ok or exit if they cancel ?

#!/bin/sh
#Display serial number of any attached displays

serial=`system_profiler SPDisplaysDataType | grep -i "Display Serial Number" | sed -e 's/^[ 	]*//' | cut -d " " -f 4`

if [ "$serial" != "" ]; then

echo "$serial" | pbcopy

title="Display serial number"

button1="OK"

description="$serial has been copied to
your clipboard
use Apple + V keys to paste"

jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"

"$jamfHelper" -windowPosition center -windowType hud -heading "$heading" -title "$title" -description "$description" -button1 "$button1" &

fi

Forum|alt.badge.img+12

Thanks May,

This can work. I can just have Safari open to my specified URL when OK is clicked, how might one script the clicking the OK button to open Safari?

I have the, open -a safari https://websiteurl, piece.

thx, john


Forum|alt.badge.img+12

I got it, working like a charm, no need for the OK button trigger, just using the open safari command.

thx again,

john


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings