Posted on 08-01-2022 07:54 AM
Hello Team,
After installing Nudge and pushing the configuration profile, the Nudge Agent do not open.
We have 12.4.0 version of OS Installed.
Please let me know what is that has to be changed/Modified.
I've install Nudge_Suite-1.1.8.81421.pkg and configured the profile too.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>PayloadContent</key> <array> <dict> <key>PayloadContent</key> <dict> <key>com.github.macadmins.Nudge</key> <dict> <key>Forced</key> <array> <dict> <key>mcx_preference_settings</key> <dict> <key>optionalFeatures</key> <dict> <key>acceptableApplicationBundleIDs</key> <array> <string>us.zoom.xos</string> <string>com.apple.iWork.Keynote</string> <string>com.apple.Keynote</string> <string>com.microsoft.Powerpoint</string> <string>com.cisco.webexmeetingsapp</string> <string>com.webex.meetingmanager</string> <string>Cisco-Systems.Spark</string> </array> <key>aggressiveUserExperience</key> <true/> <key>attemptToFetchMajorUpgrade</key> <true/> <key>enforceMinorUpdates</key> <true/> </dict> <key>osVersionRequirements</key> <array> <dict> <key>aboutUpdateURL</key> <string>https://support.apple.com/en-us/HT212585</string> <key>requiredInstallationDate</key> <string>2022-8-05T17:00:00Z</string> <key>requiredMinimumOSVersion</key> <string>12.5.0</string> <key>targetedOSVersionsRule</key> <string>12</string> </dict> </array> <key>userExperience</key> <dict/> <key>userInterface</key> <dict> <key>iconDarkPath</key> <string>/path/to/image.png</string> <key>iconLightPath</key> <string>/path/to/other-image.png</string> <key>showDeferralCount</key> <true/> <key>singleQuitButton</key> <true/> <key>updateElements</key> <array> <dict> <key>_language</key> <string>en</string> <key>mainContentText</key> <string>Hey there! \n\nWe noticed this Mac has available software updates. Keeping macOS up-to-date is an important part in keeping devices and data secure.\n\nPlease update this Mac by clicking the Update Device button to install the available updates.</string> <key>mainHeader</key> <string>This Mac requires a security update</string> <key>subHeader</key> <string>A friendly reminder from IT ❤️</string> </dict> </array> </dict> </dict> </dict> </array> </dict> </dict> <key>PayloadDisplayName</key> <string>Custom Settings</string> <key>PayloadIdentifier</key> <string> </string> <key>PayloadOrganization</key> <string> </string> <key>PayloadType</key> <string> </string> <key>PayloadUUID</key> <string> </string> <key>PayloadVersion</key> <integer>1</integer> </dict> </array> <key>PayloadDescription</key> <string></string> <key>PayloadDisplayName</key> <string>Nudge OS Update Settings</string> <key>PayloadEnabled</key> <true/> <key>PayloadIdentifier</key> <string> </string> <key>PayloadOrganization</key> <string> </string> <key>PayloadRemovalDisallowed</key> <true/> <key>PayloadScope</key> <string>System</string> <key>PayloadType</key> <string>Configuration</string> <key>PayloadUUID</key> <string> </string> <key>PayloadVersion</key> <integer>1</integer> </dict> </plist>
Posted on 08-02-2022 06:12 AM
Having the same issue hopefully someone will respond with some info
08-02-2022 09:08 AM - edited 08-02-2022 09:08 AM
I would suggest uploading the Jamf schema and turning on the required keys mentioned in the wiki. Also, is it not launching when you click on it or when you run your launch agent? Let me know if you need screenshots.
Posted on 08-02-2022 11:35 PM
Hello bwoods,
The Launch agent do not turn on. It would be much appreciated if you can help me with modifed changed that has to be done in custom Schema with screenshot.
08-03-2022 05:34 PM - edited 08-03-2022 06:14 PM
The jamf schema can be found here. You can upload it to your jamf pro server using "External Applications" in the "Application & Custom Settings" payload. (This is a configuration profile payload)
Select "Custom Schema" as the source.
The preference domain will be com.github.macadmins.Nudge
Click "Add schema" and copy/paste the code block from the URL above.
Click "Save" instead of "Upload".
You'll now have a simple GUI to activate and deactivate features.
According to the wiki, Nudge will not open until the following keys have been configured. ( I suggest only enabling these three keys before doing any thing else.)
After configuring the keys above, you need to deploy the profile to a test machine and manually open nudge without a launch agent to see if it works. If it doesn't, something is wrong. If it does, move on to the launch agent.
Below I have a script that creates and loads a custom launch agent for me. You can change the Start Interval to whatever you want. Below I have it set to 14400. ( 4 hours)
!/bin/bash
# Determine Current User
currentUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
# Determine Current User ID
currentUserUID=`id -u "$currentUser"`
# Generate Nudge launch agent
echo "<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.macadmins.Nudge</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>14400</integer>
</dict>
</plist>" > /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
# Load Launch Agent
/bin/launchctl asuser "$currentUserUID" launchctl load /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
exit 0 ## Success
exit 1 ## Failure
Posted on 08-05-2022 07:42 AM
Hello Bwoods,
Now I'm manually able to open the Nudge. as the Configuration you mentioned.
But now the launch agent is not opening automatically as you mentioned "custom launch agent". I've changed the start interval to 1600. But no pop-ups.
Note:- I haven't install the Launch Agent pkg yet.
08-05-2022 08:16 AM - edited 08-05-2022 08:34 AM
For the launch agent to work, you need to ensure that nudge is installed in the default path:
/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge
What path are you installing nudge in?
Posted on 10-25-2022 10:56 AM
Quick edit. The shebang is missing in the launch agent script. My bad.
#!/bin/bash
# Determine Current User
currentUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
# Determine Current User ID
currentUserUID=`id -u "$currentUser"`
# Generate Nudge launch agent
echo "<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.macadmins.Nudge</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>14400</integer>
</dict>
</plist>" > /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
# Load Launch Agent
/bin/launchctl asuser "$currentUserUID" launchctl load /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
exit 0 ## Success
exit 1 ## Failure
Posted on 12-05-2022 09:45 AM
Hello @bwoods I did follow the steps ^ but nudge is still not opening. Anything I missed?
Posted on 12-06-2022 07:02 AM
Are you able to open it manually without the launch agent?
Posted on 12-06-2022 07:04 AM
@mforeman1 FYI, it won't open if you're already running the latest version of the OS. It's best to test with a VM or build a usb to go back to an older version.
Posted on 12-06-2022 08:56 AM
@bwoods Got it. Looking good now. One last thing how can I redirect the user to the softwareupdate in Mac when they click "update device" in nudge?
Posted on 12-06-2022 12:01 PM
That should be the default behavior if you configure the keys I mentioned above.
Posted on 12-06-2022 12:54 PM
hmm that's weird, coz I already did that but seems every time I click on the update device nothing happens
Posted on 12-07-2022 07:02 AM
What OS version is the machine running and what did you set as the minimum requirement?
Posted on 12-09-2022 11:02 AM
Im good now. I just redirected the "update device" button to the softwareupdate prefpane path and voila! it works. Thank you again!
Posted on 08-05-2022 06:09 AM
Hi everyone,
If Nudge is still not starting you can also open up a Terminal and let the logstream run while trying to open it.
You can also increase the amount of Information in the logs according to the github page of it: https://github.com/macadmins/nudge/wiki/Logging
Default log:
log stream --predicate 'subsystem == "com.github.macadmins.Nudge"' --style syslog --color none
Sharing the output of this log would make it easier to help.
I also see that you have defined the targetedOSVersionsRule:
<key>targetedOSVersionsRule</key> <string>12</string>
In theory this key works totally fine but for some reason, in our tests, Nudge never started on any MacOS 12 System as long as we did not used default as the Value for this key.
Posted on 03-16-2023 08:21 AM
Hello All,
This post is old I know but curious if I could get a little help. I have the Nudge.pkg deploying via JAMF's Mac Apps, I deployed the LaunchAgent via a policy in JAMF. I have the custom schema uploaded into a configuration profile with deferrals set, install date, and minimum OS version. Nudge launches fine as is and it has no problems, it is set to default every 30 minutes without an edited LaunchAgent.
Here is where I am stuck and where the documentation gets a bit confusing to me. All I want is the Launch Agent to launch Nudge every 4 hours such as what @bwoods describes (14400). Can someone please break it down in the simplest terms what is needing to be done here to get the Launch Agent edited? Do I need to somehow edit the plist that is in the PKG and repackage the Launch Agent? Do I need to deploy a custom script that will edit the plist for the Launch Agent, if so, how do I go about deploying that, would it be its own separate policy or deployed with the Launch Agent pkg in JAMF with the script set to take effect after the PKG is installed.
Any help or guidance would be appreciated, I am so close getting this to working how we want I have just been hitting a brick wall with editing of the Launch Agent, whether that means somehow editing the plist or deploying a script I am all ears! If it is a script I could use the one @bwoods gratefully shared but unsure if that is deployed by itself or with the Launch Agent .pkg, if it is do I need to alter filepaths or any kind?
Thank You!
-Paul Fye
Posted on 03-16-2023 08:45 AM
03-16-2023 11:45 AM - edited 03-16-2023 11:55 AM
@OvativePaul , You can paste my script into Jamf Pro then add it to a policy. You just want it to run after the Nudge installation. 14400 seconds is equal to 4 hours. You can change when the pop-up appears by simply changing the seconds in the script above. (Use Google for a seconds to hours converter)
Basically, the only thing that you need to edit is the key below. Just edit the seconds whenever you want to change when Nudge launches. My replies below are my updated script. It has more logic built in.
<key>StartInterval</key>
<integer>14400</integer>
Posted on 03-16-2023 11:50 AM
Example of 1 hour
#!/bin/bash
# Determine Current User
currentUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
# Determine Current User ID
currentUserUID=`id -u "$currentUser"`
# Verifies Presence of Nudge Launch Agent
if [[ -f /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist ]]; then
echo "Nudge launch agent is present"
/bin/launchctl asuser "$currentUserUID" launchctl unload /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
rm -Rf /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
elif [[ ! -f /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist ]]; then
echo "Nudge launch agent is not present."
fi
# Generate Nudge launch agent
echo "<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.macadmins.Nudge</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>3600</integer>
</dict>
</plist>" > /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
# Load Launch Agent
/bin/launchctl asuser "$currentUserUID" launchctl load /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
exit 0 ## Success
exit 1 ## Failure
Posted on 03-16-2023 11:51 AM
Example of 2 hours
#!/bin/bash
# Determine Current User
currentUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
# Determine Current User ID
currentUserUID=`id -u "$currentUser"`
# Verifies Presence of Nudge Launch Agent
if [[ -f /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist ]]; then
echo "Nudge launch agent is present"
/bin/launchctl asuser "$currentUserUID" launchctl unload /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
rm -Rf /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
elif [[ ! -f /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist ]]; then
echo "Nudge launch agent is not present."
fi
# Generate Nudge launch agent
echo "<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.macadmins.Nudge</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>7200</integer>
</dict>
</plist>" > /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
# Load Launch Agent
/bin/launchctl asuser "$currentUserUID" launchctl load /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
exit 0 ## Success
exit 1 ## Failure
Posted on 03-16-2023 11:53 AM
Example of 4 hours
#!/bin/bash
# Determine Current User
currentUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
# Determine Current User ID
currentUserUID=`id -u "$currentUser"`
# Verifies Presence of Nudge Launch Agent
if [[ -f /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist ]]; then
echo "Nudge launch agent is present"
/bin/launchctl asuser "$currentUserUID" launchctl unload /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
rm -Rf /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
elif [[ ! -f /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist ]]; then
echo "Nudge launch agent is not present."
fi
# Generate Nudge launch agent
echo "<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.macadmins.Nudge</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>14400</integer>
</dict>
</plist>" > /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
# Load Launch Agent
/bin/launchctl asuser "$currentUserUID" launchctl load /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
exit 0 ## Success
exit 1 ## Failure
Posted on 04-19-2023 06:40 AM
Hi @bwoods ,
The result of your script shows me this error, any idea ?
Running script Create com.github.macadmins.Nudge.plist...
Script exit code: 0
Script result: Nudge launch agent is not present.
/Library/Application Support/JAMF/tmp/Create com.github.macadmins.Nudge.plist: line 20: /Users/myuser/Library/LaunchAgents/com.github.macadmins.Nudge.plist: No such file or directory
/Users/myuser/Library/LaunchAgents/com.github.macadmins.Nudge.plist: No such file or directory
Load failed: 2: No such file or directory
Posted on 04-26-2023 08:27 AM
That means that there's not launch agent present from a previous push. The script should then create a new launch agent for you.
05-03-2023 02:01 PM - edited 05-03-2023 02:02 PM
Actually, in this instance, this means the LaunchAgents directory does not exist so it can't create the LaunchAgent file. I made an edit to fix this as I think it's an issue with newer MacOS version like Ventura as those directories don't exist for users by default anymore. Here is the script with my edit to make the directory needed before the echo.
#!/bin/bash
# Determine Current User
currentUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
# Determine Current User ID
currentUserUID=`id -u "$currentUser"`
# Verifies Presence of Nudge Launch Agent
if [[ -f /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist ]]; then
echo "Nudge launch agent is present"
/bin/launchctl asuser "$currentUserUID" launchctl unload /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
rm -Rf /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
elif [[ ! -f /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist ]]; then
echo "Nudge launch agent is not present."
fi
mkdir "/Users/$currentUser/Library/LaunchAgents/"
# Generate Nudge launch agent
echo "<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.macadmins.Nudge</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>3600</integer>
</dict>
</plist>" > /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
# Load Launch Agent
/bin/launchctl asuser "$currentUserUID" launchctl load /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist
exit 0 ## Success
exit 1 ## Failure
Posted on 05-04-2023 12:13 PM
Good catch, that folder exists on all of my clients because of Onedrive. May not be the case for everyone else.
Posted on 02-06-2024 11:57 AM
Thanks for this! Worked great on the majority of devices but I have a few outliers that error out. I get the "/Library/LaunchAgents/com.github.macadmins.Nudge.plist: No such file or directory" but instead of creating the plist I get "Load Failed: 5: Input/output error" Any ideas?
Posted on 05-25-2024 11:10 PM
Probably need to run a pre-script to bootout the LaunchAgent if it's already running.
#!/bin/bash
#Preinstall Script
#Daemon Preinstall
plistPath="/Library/LaunchAgents/com.github.macadmins.Nudge.plist"
#Boot it out if it already exists
if [[ -e $plistPath ]]; then
launchctl bootout system $plistPath
rm -f $plistPath
fi
Posted on 05-14-2023 05:39 PM
I pushed the launch agent that is part of the nudge suit package on GitHub. Will this script overwrite and/or stop that default agent and use your script instead?
Posted on 03-16-2023 09:24 AM
Hey @Vinyboy I tried that before but never really use GitHub much so those Git Clone commands always fail for me. I will give it another shot. Thank You!