Scripts which leverage Bart Reardon's swiftDialog.
- Setup Your Mac
- Display Message
- 🆕 Disk Usage
- sysdiagnose Progress
- Inventory Update Progress
- 🆕 Notifications
- swiftDialog Commander
Continue reading at snelson.us …
Scripts with leverage Bart Reardon's swiftDialog
License: MIT License
Scripts which leverage Bart Reardon's swiftDialog.
Continue reading at snelson.us …
Describe the bug
--textfield
flag as an Extra Flag within Jamf Pro however the full text is not being displayed. The text is truncated after the first space. I have tried a combination of double quotes, single quotes, as well as trying to escape the quotes with a backslash without success.To Reproduce
--position top --textfield "Reason for this request",prompt="Why you are requesting this access?"
Expected behavior
Code/log output
###
# Display Message via swiftDialog (0.0.8)
###
2023-06-06 10:54:34 - PRE-FLIGHT CHECK: Initiating …
2023-06-06 10:54:34 - PRE-FLIGHT CHECK: macOS 13 installed; proceeding ...
2023-06-06 10:54:34 - PRE-FLIGHT CHECK: swiftDialog version 2.2.0.4535 found; proceeding...
2023-06-06 10:54:34 - Both "title" and "message" Parameters are populated; proceeding ...
2023-06-06 10:54:34 - Title: Temporary Administrator Access
2023-06-06 10:54:34 - Message: You are requesting temporary administrator access on your workstation. Please note that any abuse of this privilege will be immediately revoked and requests for admin access in the future will be denied.
You will have admin access for thirty (30) minutes. Please use this time to accomplish whatever tasks you require. Please make sure you run this policy ***before*** you attempt your administrative task.
2023-06-06 10:54:34 - Extra Flags: --position top --textfield "Reason for this request",prompt="Why you are requesting this access?"
"Reason :
2023-06-06 10:57:34 - Return Code: 0
brian.sullivan clicked Grant
2023-06-06 10:57:34 - brian.sullivan clicked Grant;
2023-06-06 10:57:35 - Quitting …
2023-06-06 10:57:36 - Exiting …
2023-06-06 10:57:36 - Removing /var/tmp/dialogWelcomeLog.PWI …
2023-06-06 10:57:36 - Removing /var/tmp/overlayicon.icns …
2023-06-06 10:57:36 - Goodbye!
Environment (please complete the following information):
Hi maybe we can add a normal welcome dialog without the asset tag field and the asset tag functions?
Maybe something like this. That the window then also closes automatically and the deployment begins.
Best Regards
welcomeTitle="Hello!"
welcomeMessage="Nice to meet. Nice that you start at company acme"
appleInterfaceStyle=$( /usr/bin/defaults read /Users/"${loggedInUser}"/Library/Preferences/.GlobalPreferences.plist AppleInterfaceStyle 2>&1 )
if [[ "${appleInterfaceStyle}" == "Dark" ]]; then
welcomeIcon="https://gmfsmortgage.com/wp-content/uploads/2018/10/ACME-Corporation-fake-logo-150x150.jpg"
else
welcomeIcon="https://gmfsmortgage.com/wp-content/uploads/2018/10/ACME-Corporation-fake-logo-150x150.jpg"
fi
dialogWelcomeCMD="$dialogApp
--title "$welcomeTitle"
--message "$welcomeMessage"
--icon "$welcomeIcon"
--iconsize 198
--button1text "Continue"
--infotext "$scriptVersion"
--ontop
--timer 30
--hidetimerbar
--titlefont 'size=30'
--messagefont 'size=18'
--quitkey k
--commandfile "$welcomeCommandFile" "
Before submitting a Setup Your Mac bug report, please review the open swiftDialog issues to help determine the source of the issue.
Describe the bug
When setting the command osascript -e 'tell app "loginwindow" to «event aevtrrst»' as action for https://github.com/dan-snelson/dialog-scripts/blob/main/Display%20Message/Display-Message-via-Dialog.bash users gets an error "The file /usr/bin/osascript -e 'tell app loginwindow to «event aevtrrst»' does not exist."
To Reproduce
place an osascript command into action
Expected behavior
the restart window should appear
Code/log output
###
# Display Message via swiftDialog (0.0.9)
###
2023-10-25 14:15:01 - PRE-FLIGHT CHECK: Initiating …
2023-10-25 14:15:01 - PRE-FLIGHT CHECK: macOS 14 installed; proceeding ...
2023-10-25 14:15:01 - PRE-FLIGHT CHECK: swiftDialog version 2.3.2.4726 found; proceeding...
2023-10-25 14:15:01 - Both "title" and "message" Parameters are populated; proceeding ...
2023-10-25 14:15:01 - Title: Restart Required
2023-10-25 14:15:01 - Message:
2023-10-25 14:15:01 - Extra Flags: --width 300 --height 600 --messagefont size=16 --position topright --ontop --messagealignment centre --messageposition centre --centericon
2023-10-25 14:15:04 - Return Code: 0
meckerle clicked Restart
2023-10-25 14:15:04 - meckerle clicked Restart;
The file /usr/bin/osascript -e 'tell app loginwindow to «event aevtrrst»' does not exist.
2023-10-25 14:15:04 - Quitting …
2023-10-25 14:15:05 - Exiting …
2023-10-25 14:15:05 - Removing /var/tmp/dialogWelcomeLog.EQJ …
2023-10-25 14:15:05 - Removing /var/tmp/overlayicon.icns …
2023-10-25 14:15:05 - Goodbye!
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The eval statements in the Setup your Mac.bash
script list /usr/local/bin/dialog twice.
Code
eval "$dialogApp" "${dialogCMD[*]}" & sleep 0.3
PS Output
/bin/sh /usr/local/bin/dialog /usr/local/bin/dialog --ontop --title Setting up your Mac --message Please wait while the following apps are installed … --icon SF=laptopcomputer.and.arrow.down,weight=semibold,colour1=#ef9d51,colour2=#ef7951 --progress --button1text Quit --button1disabled --infotext v1.2.4 --titlefont size=28 --messagefont size=14 --height 67% --position centre --blurscreen --overlayicon /Applications/Self Service.app --quitkey K
Potential fix
eval $dialogCMD & sleep 0.3
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
It would be useful to have a Help button or ? button which could be configured to show a company IT helpdesk number to call on the main Installing policy dialog screen.
Describe alternatives you've considered
Currently if a failure is detected, I use the bottom text field to instruct users on things to capture like which policy failed etc. This is the helpdesk number to call
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
Option to enable Reboot after completed enrollment
As discussed, we need a built in automation for the swift dialog version validation. If in case I am using old versions of swifdialog and install it latest version so it will help us to additional effort to do
Swiftdialogversion =$8any version /Autoupdate get always latest xyz version.
Restart and Log Out Attended don't work if automatically calling the policy via Enrolment Complete policy. Restart and Log Out Attended work fine if running the script locally or if manually calling the policy via Self-Service.
Dan pointed me in the direction of his implementation notes which I hadn't seen - we require login to Self Service (including Multi-Factor Authentication) for every other policy; enabling Setup Your Mac at Enrollment Complete would bypass the required user login on the very first policy the user experiences
Note: While all requests are welcome, finding available cycles to custom-code a feature we won't use in our production environment is always challenging.
Is your feature request related to a problem? Please describe.
As pointed out by @roiegat on the Mac Admin's Slack #setup-yourmac Channel, combine listitem
steps for installation and validation.
Describe the solution you'd like
policy_array=('
{
"steps": [
{
"listitem": "Rosetta",
"icon": "8bac19160fabb0c8e7bac97b37b51d2ac8f38b7100b6357642d9505645d37b52",
"progresstext": "Rosetta enables a Mac with Apple silicon to use apps built for a Mac with an Intel processor.",
"trigger_list": [
{
"trigger": "rosettaInstall",
"validation": "None"
}
]
},
{
"listitem": "Rosetta Services (Local)",
"icon": "8bac19160fabb0c8e7bac97b37b51d2ac8f38b7100b6357642d9505645d37b52",
"progresstext": "Locally validating Rosetta service …",
"trigger_list": [
{
"trigger": "rosetta",
"validation": "Local"
}
]
},
policy_array=('
{
"steps": [
{
"listitem": "Rosetta",
"icon": "8bac19160fabb0c8e7bac97b37b51d2ac8f38b7100b6357642d9505645d37b52",
"progresstext": "Rosetta enables a Mac with Apple silicon to use apps built for a Mac with an Intel processor.",
"trigger_list": [
{
"trigger": "rosettaInstall",
"validation": "None"
},
{
"trigger": "rosetta",
"validation": "Local"
}
]
},
Is your feature request related to a problem? Please describe.
This is something I ran into when deploying on an unstable WiFi connection (test devices)
Describe the solution you'd like
I'd like to have a retry option where you can specify how many times it should retry the trigger for a specific list item. Ofcourse for None this is not applicable but it would be interesting to try this with Local and Remote. Sometimes a network connection can fail and then the whole deployment fails because of one small hiccup, a retry might fix this issue and cause less issues for end-users.
Describe alternatives you've considered
N/A
Additional context
N/A
Would it be possible to add a field that would allow the user running the script to enter a User name that would then be passed to Jamf.
Currently one of our requirements when setting up a new computer is to ensure that there is a value in the Jamf User Name field.
When running the Setup your Mac.bash
script from a Jamf policy, the dialog window will automatically close once Jamf is done executing the policy. This does not give the user a chance to review the status and read the final message update.
To resolve this issue, I added a wait
statement before the exit "${exitCode}"
in the finalise
function.
Display-Message-via-Dialog.bash (and others?) using curl to find the latest swiftDialog repo URL also need the -L flag added to follow redirects.
This is on line 140 in v0.0.8
Hi Dan , really wonderful script to onboard the macOS via enrolment trigger or DEP .
one consent my location users macs are BYOD setup and some of talented users are having old version of Mac OS catalina and below. They will not read the instructions during the enrolment. Sometimes users are enrolled to JAMF and setup your mac script will be failed due to swift dialog compatibility.
Might be your able to add the limitation it will help us to use it without any error.
If in case users is old version just to run a policy trigger and exit with JAMF dialog as complete.
2)And we need a built in automation for the swift dialog version validation. If in case I am using old versions of swifdialog and install it latest version so it will help us to additional effort to do
Swiftdialogversion =$8any version /Autoupdate get always latest xyz version.
Note: While all requests are welcome, finding available cycles to custom-code a feature we won't use in our production environment is always challenging.
Is your feature request related to a problem? Please describe.
This is not a problem and only a nice to have.
Describe the solution you'd like
After the policy_array cycles to deploy all forced / base apps to the mac, I'd like a optional second pane that the end user continues into that will allow them to select a list of apps, perhaps a checkbox or whatever may work better in this instance, with app icons, descriptions to each app in its selection phase (I am imaginging a table view, 2 across by however many long). The user will either have the option to skip this optional pane entirely by clicking continue when no selection is made, or "install" when a selection of these apps are made. The same workflow will follow from policy_array to show installation progress etc and then will move to the completed tab where a user's end action is initiated.
Describe alternatives you've considered
N/A
Additional context
N/A
Hello Dan (Hope all is well on your end.)-
When a PreStage enrolled device upon sign-in > enrollment complete trigger Setup Your Mac 1.5.1 runs the "Welcome" window and has a glitch where the keyboard stops working and does not let data being entered to fields. Once I quit session and launch from self service the bug goes away allowing me to enter data using keyboard.
This does not occur when doing user initiated enrollment I presume because it was launched from self service rather than enrollment complete.
Environment
looking forward select the department BYOD or CYCD before installing as like asset tag. & looking forward also the download percentage so the user will know about the status
I used the latest version of the script. Noticed after Welcome screen, Setup Your Mac page will launch and disappears.
However all the policy trigger are executed successful.
Tested on Ventura OS 13.1
Also tried by marking False for Welcome Screen.
Jamf Policy :
Trigger - Enrollment Complete
Script - Welcomescreen and Debug mode sset to false
Logs :
2022-12-28 14:37:46 - *** Created log file via script ***
2022-12-28 14:37:46 -
2022-12-28 14:37:47 - Dialog not found. Installing...
2022-12-28 14:37:55 - swiftDialog version 2.0.1.3814 installed; proceeding...
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: progress_total=7
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: list: FileVault Disk Encryption, Cortex XDR, Palo Alto GlobalProtect, Zoom, Google Chrome, Final Configuration, Computer Inventory
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: listitem: index: 0, icon: https://razorpaytest.jamfcloud.com/icon?id=26, status: pending, statustext: Pending …
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: listitem: index: 1, icon: https://razorpaytest.jamfcloud.com/icon?id=25, status: pending, statustext: Pending …
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: listitem: index: 2, icon: https://razorpaytest.jamfcloud.com/icon?id=23, status: pending, statustext: Pending …
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: listitem: index: 3, icon: https://razorpaytest.jamfcloud.com/icon?id=24, status: pending, statustext: Pending …
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: listitem: index: 4, icon: https://razorpaytest.jamfcloud.com/icon?id=21, status: pending, statustext: Pending …
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: listitem: index: 5, icon: https://razorpaytest.jamfcloud.com/icon?id=19, status: pending, statustext: Pending …
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: listitem: index: 6, icon: https://razorpaytest.jamfcloud.com/icon?id=19, status: pending, statustext: Pending …
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: list: show
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: progress: 0
2022-12-28 14:37:56 - WELCOME DIALOG: quit:
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: progress: 0
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: listitem: index: 0, status: wait, statustext: Installing …,
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: icon: https://razorpaytest.jamfcloud.com/icon?id=26
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: progresstext: FileVault is built-in to macOS and provides full-disk encryption to help prevent unauthorized access to your Mac.
2022-12-28 14:37:56 - SETUP YOUR MAC DIALOG: RUNNING: /usr/local/bin/jamf policy -event filevault
2022-12-28 14:38:03 - SETUP YOUR MAC DIALOG: Testing for "/Library/Preferences/com.apple.fdesetup.plist" …
2022-12-28 14:38:03 - SETUP YOUR MAC DIALOG: listitem: index: 0, status: success, statustext: Installed
2022-12-28 14:38:03 - SETUP YOUR MAC DIALOG: progress: 14
2022-12-28 14:38:03 - SETUP YOUR MAC DIALOG: listitem: index: 1, status: wait, statustext: Installing …,
2022-12-28 14:38:03 - SETUP YOUR MAC DIALOG: icon: https://razorpaytest.jamfcloud.com/icon?id=25
2022-12-28 14:38:03 - SETUP YOUR MAC DIALOG: progresstext: You’ll enjoy next-gen protection with Cortex XDR which doesn’t rely on signatures to catch malware.
2022-12-28 14:38:03 - SETUP YOUR MAC DIALOG: RUNNING: /usr/local/bin/jamf policy -event cortex
2022-12-28 14:38:26 - SETUP YOUR MAC DIALOG: Testing for "/Applications/Cortex XDR.app/Contents/Info.plist" …
2022-12-28 14:38:26 - SETUP YOUR MAC DIALOG: listitem: index: 1, status: success, statustext: Installed
2022-12-28 14:38:26 - SETUP YOUR MAC DIALOG: progress: 28
2022-12-28 14:38:26 - SETUP YOUR MAC DIALOG: listitem: index: 2, status: wait, statustext: Installing …,
2022-12-28 14:38:27 - SETUP YOUR MAC DIALOG: icon: https://razorpaytest.jamfcloud.com/icon?id=23
2022-12-28 14:38:27 - SETUP YOUR MAC DIALOG: progresstext: Use Palo Alto GlobalProtect to establish a Virtual Private Network (VPN) connection to Church headquarters.
2022-12-28 14:38:27 - SETUP YOUR MAC DIALOG: RUNNING: /usr/local/bin/jamf policy -event globalProtect
2022-12-28 14:38:40 - SETUP YOUR MAC DIALOG: Testing for "/Applications/GlobalProtect.app/Contents/Info.plist" …
2022-12-28 14:38:40 - SETUP YOUR MAC DIALOG: listitem: index: 2, status: success, statustext: Installed
2022-12-28 14:38:40 - SETUP YOUR MAC DIALOG: progress: 42
2022-12-28 14:38:40 - SETUP YOUR MAC DIALOG: listitem: index: 3, status: wait, statustext: Installing …,
2022-12-28 14:38:40 - SETUP YOUR MAC DIALOG: icon: https://razorpaytest.jamfcloud.com/icon?id=24
2022-12-28 14:38:40 - SETUP YOUR MAC DIALOG: progresstext: Zoom is a videotelephony software program developed by Zoom Video Communications.
2022-12-28 14:38:40 - SETUP YOUR MAC DIALOG: RUNNING: /usr/local/bin/jamf policy -event zoom
2022-12-28 14:39:00 - SETUP YOUR MAC DIALOG: Testing for "/Applications/zoom.us.app/Contents/Info.plist" …
2022-12-28 14:39:00 - SETUP YOUR MAC DIALOG: listitem: index: 3, status: success, statustext: Installed
2022-12-28 14:39:00 - SETUP YOUR MAC DIALOG: progress: 56
2022-12-28 14:39:00 - SETUP YOUR MAC DIALOG: listitem: index: 4, status: wait, statustext: Installing …,
2022-12-28 14:39:00 - SETUP YOUR MAC DIALOG: icon: https://razorpaytest.jamfcloud.com/icon?id=21
2022-12-28 14:39:00 - SETUP YOUR MAC DIALOG: progresstext: Google Chrome is a browser that combines a minimal design with sophisticated technology to make the Web faster.
2022-12-28 14:39:00 - SETUP YOUR MAC DIALOG: RUNNING: /usr/local/bin/jamf policy -event googleChrome
2022-12-28 14:39:19 - SETUP YOUR MAC DIALOG: Testing for "/Applications/Google Chrome.app/Contents/Info.plist" …
2022-12-28 14:39:19 - SETUP YOUR MAC DIALOG: listitem: index: 4, status: success, statustext: Installed
2022-12-28 14:39:19 - SETUP YOUR MAC DIALOG: progress: 70
2022-12-28 14:39:19 - SETUP YOUR MAC DIALOG: listitem: index: 5, status: wait, statustext: Installing …,
2022-12-28 14:39:19 - SETUP YOUR MAC DIALOG: icon: https://razorpaytest.jamfcloud.com/icon?id=19
2022-12-28 14:39:19 - SETUP YOUR MAC DIALOG: progresstext: Finalizing Configuration …
2022-12-28 14:39:19 - SETUP YOUR MAC DIALOG: RUNNING: /usr/local/bin/jamf policy -event finalConfiguration
2022-12-28 14:39:24 - SETUP YOUR MAC DIALOG: RUNNING: /usr/local/bin/jamf policy -event reconAtReboot
2022-12-28 14:39:32 - SETUP YOUR MAC DIALOG: Testing for "" …
2022-12-28 14:39:32 - SETUP YOUR MAC DIALOG: listitem: index: 5, status: success, statustext: Installed
2022-12-28 14:39:32 - SETUP YOUR MAC DIALOG: progress: 84
2022-12-28 14:39:32 - SETUP YOUR MAC DIALOG: listitem: index: 6, status: wait, statustext: Installing …,
2022-12-28 14:39:32 - SETUP YOUR MAC DIALOG: icon: https://razorpaytest.jamfcloud.com/icon?id=19
2022-12-28 14:39:32 - SETUP YOUR MAC DIALOG: progresstext: A listing of your Mac’s apps and settings — its inventory — is sent automatically to the Jamf Pro server daily.
2022-12-28 14:39:32 - SETUP YOUR MAC DIALOG: listitem: index: 6, status: wait, statustext: Updating …,
2022-12-28 14:39:32 - SETUP YOUR MAC DIALOG: Updating computer inventory with the following reconOptions: "" …
2022-12-28 14:39:50 - SETUP YOUR MAC DIALOG: Testing for "" …
2022-12-28 14:39:50 - SETUP YOUR MAC DIALOG: listitem: index: 6, status: success, statustext: Installed
2022-12-28 14:39:50 - SETUP YOUR MAC DIALOG: listitem: index: 6, status: success, statustext: Updated
2022-12-28 14:39:50 - SETUP YOUR MAC DIALOG: title: Rudresh's Mac is ready!
2022-12-28 14:39:50 - SETUP YOUR MAC DIALOG: icon: SF=checkmark.circle.fill,weight=bold,colour1=#00ff44,colour2=#075c1e
2022-12-28 14:39:50 - SETUP YOUR MAC DIALOG: progresstext: Complete! Please restart and enjoy your new Mac, Rudresh!
2022-12-28 14:39:50 - SETUP YOUR MAC DIALOG: progress: complete
2022-12-28 14:39:50 - SETUP YOUR MAC DIALOG: button1text: Restart
2022-12-28 14:39:50 - SETUP YOUR MAC DIALOG: button1: enable
2022-12-28 14:39:50 - Exiting …
2022-12-28 14:39:50 - De-caffeinate …
2022-12-28 14:39:50 - Attempting to terminate the 'caffeinate' process …
2022-12-28 14:39:50 - (Termination message indicates success.)
2022-12-28 14:39:50 - Removing /var/tmp/dialogWelcome.5T1 …
2022-12-28 14:39:50 - Removing /var/tmp/dialogSetupYourMac.VhR …
2022-12-28 14:39:50 - Removing /var/tmp/dialogFailure.pk3 …
2022-12-28 14:39:50 - Executing Completion Action Option: 'Restart Confirm' …
2022-12-28 14:39:50 - Restart, only after macOS time-out or user confirmation
2022-12-28 14:39:50 - Run "osascript -e tell app "loginwindow" to «event aevtrrst»" as "503" …
Hi Team
welcomeDialog="${6:-"true"}" # [ true (default) | false ]
Instead of welcome dialog can we add additional welcome video so it’s easier user can understand the company vision and mission with muted so user can unmute and watch the video meme time install will be completed in back end 🤔 if possible to add multiple video & randomising so everyone time enroll user will feel new innovative content about organisation 🎉
See swiftDialog Issue No. 235.
Describe the bug
enrollmentComplete
trigger, Self Service's icon is not displaying as expected.To Reproduce
enrollmentComplete
triggerExpected behavior
overlayicon
Code/log output
su - "${loggedInUser}" -c "/usr/bin/open -a \"${overlayicon}\" -g -j"
As we enable Filevault at the next login we want to be able to force a restart once the user clicks finish on Setup your Mac.
Any thoughts how this could be achieved?
When attempting to find the hash for an application's Self Service icon, the copied URL has now seemingly updated to the following scheme:
https://*******.jamfcloud.com/icon?id=30
Is there any way to use the updated icon URL's in the script, or will we need to look at adding the icons on to a machine via Pre-Stage first?
It would be great if we could simulate the failure screen from the 'finalise' function. It would be extremely helpful when writing documentation.
Hello, First thank you for this. We are in the testing/pilot stages of mac rollout. I have been testing the script however, I have run into so troubles with using the custom event triggers.
Im editing this line:
{
"listitem": "Software",
"icon": "99",
"progresstext": "Please wait",
"trigger_list": [
{
"trigger": "working",
"path": "/Applications/Software/Test.app/Contents/Info.plist"
}
]
}
When I run Setup Your Mac from Self Service it fails instantly.
2022-12-22 09:00:00 - SETUP YOUR MAC DIALOG: listitem: index: 0, status: fail, statustext: Failed
However on the same macbook from Terminal. This works fine and installs the package
sudo /usr/local/bin/jamf policy -event working
Is there something obvious I'm missing here?
Hello, and love the work..!
The display is fantastic but besides being able to run an action in the last parameter, can we see about adding drop downs for deferrals, like a choice of time or date...? Just a thought as the display does things yes, but would like to present to the EU's for macOS updates or Upgrades to defer right in the pop up notification.
Thank you.
Note: While all requests are welcome, finding available cycles to custom-code a feature we won't use in our production environment is always challenging.
Is your feature request related to a problem? Please describe.
When I run the Display Message/Display-Message-via-Dialog.bash script in a Jamf Pro Environment, I cannot execute a CLI command into variable $11
. For example, if I want to execute jamf policy -event triggername -verbose
, the log returns:
The file /Users/<user-folder>/sudo jamf policy -event rollout-kandji -verbose does not exist.
Describe the solution you'd like
Support for the CLI would be much appreciated.
Describe alternatives you've considered
Tried putting the command between ""
but that doesn't work.
Additional context
Add any other context or screenshots about the feature request here.
Note: While all feature requests are welcome, finding available cycles to custom-code a feature we won't use in our production environment is always challenging.
Is your feature request related to a problem? Please describe.
Kinda; It'd be nice to know how long each step in Setup Your Mac takes generally, then, when something fails for one user, we'd know how long that step normally takes.
Describe the solution you'd like
Add a duration for each step of Setup Your Mac to the logs.
Describe alternatives you've considered
Alternatives? Are there any? (I guess we could provide each user with a branded stop watch and ask them to time each step.)
Additional context
$SECONDS
is your friend.
Note: While all requests are welcome, finding available cycles to custom-code a feature we won't use in our production environment is always challenging.
Is your feature request related to a problem? Please describe.
A clear, concise description of the problem. (i.e., I'm frustrated when ...)
Describe the solution you'd like
A clear, concise description of what you want to happen.
Describe alternatives you've considered
A clear, concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Hey @dan-snelson
Just a simple FR I believe, would be good to add the chosen configuration to the help ? button which offers the computer information
Setup Your Mac is very Jamf centric, and would be great to work with other MDMs and Munki as well for installation of data.
Before submitting a Setup Your Mac bug report, please review the open swiftDialog issues to help determine the source of the issue.
Describe the bug
Output files not being created.
To Reproduce
Expected behavior
A clear, concise description of what you expected to happen.
Code/log output
Please supply the full command used, and if applicable, add full output from Terminal. Either upload the log, or paste the output in a code block (triple backticks at the start and end of the code block, please!).
Password:
-e 2024-09-09 17:34:05 -
macOS 14 installed; proceeding ...
-e 2024-09-09 17:34:05 - swiftDialog version 2.5.0.4768 found; proceeding...
-e 2024-09-09 17:34:05 - Create Welcome Dialog …
-e 2024-09-09 17:34:08 - c45879 clicked Continue …;
-e 2024-09-09 17:34:08 - Disk Space: 598.5 GB free ( 60.17% available )
-e 2024-09-09 17:34:08 - Analyze Disk Usage with Progress (1 of 2)
-e 2024-09-09 17:34:24 - Run "open /Users/c45879 /Users/c45879_1/Desktop/LHP937D7F4-Volume-Usage-2024-09-09-173404.txt" as "501" …
The file /Users/c45879_1/Desktop/LHP937D7F4-Volume-Usage-2024-09-09-173404.txt does not exist.
-e 2024-09-09 17:34:24 - Run "open /Users/c45879 /Users/c45879_1/Desktop/c45879-Home-Usage-2024-09-09-173404.txt" as "501" …
The file /Users/c45879_1/Desktop/c45879-Home-Usage-2024-09-09-173404.txt does not exist.
-e 2024-09-09 17:34:24 - Run "open x-apple.systempreferences:com.apple.settings.Storage" as "501" …
-e 2024-09-09 17:34:24 - Quitting …
-e 2024-09-09 17:34:25 - Exiting …
-e 2024-09-09 17:34:25 - Removing /var/tmp/dialogWelcomeLog.Pee5 …
-e 2024-09-09 17:34:25 - Removing /var/tmp/dialogProgressLog.0jFt …
-e 2024-09-09 17:34:25 - Removing /var/tmp/dialogCompleteLog.i5i8 …
-e 2024-09-09 17:34:25 - Removing /var/tmp/diskUsageEntireVolumeTop50.rZYm …
-e 2024-09-09 17:34:25 - Removing /var/tmp/diskUsageUsersHomeTop50.nC1m …
-e 2024-09-09 17:34:25 - Goodbye!
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
I am using onprem JAMF and I can’t pull the icon location hash so what is the alternative option to setup the icon
Before submitting a Setup Your Mac bug report, please review the open swiftDialog issues to help determine the source of the issue.
Describe the bug
When swiftDialog is not installed this line is failing because there's a redirection not being followed. This is what is returned:
{
"message": "Moved Permanently",
"url": "https://api.github.com/repositories/346831918/releases/latest",
"documentation_url": "https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api#follow-redirects"
}
To Reproduce
Run curl "https://api.github.com/repos/bartreardon/swiftDialog/releases/latest"
without the silent and fail flags.
Expected behavior
Adding the --L flag to follow the redirect fixes the issue:
curl -L --silent --fail "https://api.github.com/repos/bartreardon/swiftDialog/releases/latest" | awk -F '"' "/browser_download_url/ && /pkg\"/ { print \$4; exit }"
Andrew Clark
:happymac: 4 hours ago
One addition is to the scutil commands, in general the host names should also be set to the computerName.
I added
scutil --set HostName "${computerName}"
scutil --set LocalHostName "${computerName}"
colorenz
3 hours ago
Moin, why can we not use the following to set Name?
@drtaru
/usr/local/bin/jamf setComputerName -name
Hello,
Where can I find the filevault validation script?
Best regards
Is there a chance we could have the possibility to add, in addition to the Asset Tag, more stuff like: Computer Name, Location (City) etc?
When updating inventory using this script, the jamf recon -endUsername command changes the value in the username field in the computer's inventory. In my case, our usernames are the user's UPN, but when this command is ran, it changes the record to a value that is not their UPN so all other user data is removed from User & Location.
Is your feature request related to a problem? Please describe.
when enrolling a computer a user can "get out" of the setup screen by using mission control on the trackpad and essentially get to activity monitor to kill swiftDialog from running
Describe the solution you'd like
it would be nice to have a parameter option to disable mission control during setup
Describe alternatives you've considered
config profile or script but its not consistent
Additional context
Add any other context or screenshots about the feature request here.
Since swiftdialog can do video based on url or local I think it would be nice to be able to embed a videos either at the welcome screen or the setup screen. Our onboarding takes a while and I think it would be cool to have a video playing welcoming them to the company and giving them advice how to set up their Mac.
Note: While all requests are welcome, finding available cycles to custom-code a feature we won't use in our production environment is always challenging.
Is feature request related to a problem? Please describe.
A clear, concise description of the problem. (i.e., I'm frustrated when ...)
Describe the solution you'd like
A clear, concise description of what you want to happen.
Describe alternatives you've considered
A clear, concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Can you remove the redundant back slash from line 323 in "Setup-Your-Mac-via-Dialog.bash"?
No impact, but it's the only one of several similar lines that has the unnecessary back slash.
I'll be in purgatory if you need me. :)
TIA
Currently the "path":
in policy_array
is configured to look for a file path for verification the listitem
completed. Would it be possible to add a command
option for verification based on its output?
dialog-scripts/Setup Your Mac/Setup-Your-Mac-via-Dialog.bash
Lines 1235 to 1247 in 5864bb6
Hi Dan really nice work , i just tried testing your script and dialog i have issue with enabling the icon with hash unable to grab from on prem jamf and its getting only as like below.
any alternate solution for this?
Not really a bug or a feature, more just code clean up.
Loving the use of JavaScript via osascript to handle reading JSON content, however I noticed something that I assume is to be cleaned up at some point. I assume this is a hangover from a DEPNotify based script, but I am struggling to see a reason why policy_array is still a shell array when it only contains one long JSON formatted string.
Figured I'd log it here as a helpful reminder to clean up policy_array, as I haven't gone through enough of the script yet to consider creating a pull request that cleans this up.
Lines 56 and 164 are duplicates which probably would throw anyone else off but I have a special workflow for our IT Ops team who are pre-provisioning computers for the end user. This workflow hinges on If/Then statements based on the $loggedInUser value.
loggedInUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ { print $3 }' )
Thank you for an amazing tool!
Brandon Sexton
Note: While all requests are welcome, finding available cycles to custom-code a feature we won't use in our production environment is always challenging.
This is specifically for SetUpYourMac
Is your feature request related to a problem? Please describe.
Not a problem, just a potential improvement
Describe the solution you'd like
Separate out code for JSONs (like the policy list) to separate files, that can be read from remote locations. Similar to the json-url option in Nudge.
If this is set up, a JAMF variable can be assigned for the URL. This would make the script more re-usable for different scenarios, rather than needing to be directly modified for each scenario.
Not everyone is using jamf pro (we do), but it would be cool to be able to run a function or procedure instead of running a policy triggered. So i replaced run_jamf_trigger "$trigger" with ${trigger} and created functions called ${trigger} eg. filveault(){ echo "filevault"; touch /tmp/filevault.installed} and checked on that filevault.installed file created inside that function to get the status installed.
A flag/script parameter to choose between jamf / localinstall to make the difference between run_jamf_trigger and ${trigger} would be the parameter to distinct between running a policy or local function.
Cleaning out those *.installed files in /tmp at begin of script to be sure to run clean
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.