-
Notifications
You must be signed in to change notification settings - Fork 4
Resolving the cocoaDialog Dependency
cocoaDialog is used – and required – to present GUI elements on your users' Macs. That means cocoaDialog will need to be installed at known location on each of your endpoints.
Note: This utility requires cocoaDialog version 3.0 (development). Using the 2.1.1 Stable branch will cause errors.
By default, printer-installer.py
looks for cocoaDialog at /Applications/cocoaDialog.app/Contents/MacOS/cocoaDialog
To specify your own location, edit source/printer-installer.source.py
and update the CDPATH
variable to reflect the correct path.
CDPATH = ("/Applications/cocoaDialog.app/Contents/MacOS/cocoaDialog")
If cocoaDialog is not found at the specified path, the script will attempt to install it by running a JAMF policy with a custom trigger. The name of this "remediation" trigger can be changed to fit your environment and is also found in source/printer-installer.source.py
.
cocoaDialog_trigger = "InstallcocoaDialog"
This of course implies that this trigger actually calls a policy available on your JSS; see the "cocoaDialog Installation Policy" section below.
❗️Note: After modifying any configuration variables in
source/printer-installer.source.py
you need to re-runpython generator.py
In order for the utility to automatically resolve the cocoaDialog dependency, you'll need to create a policy on your JSS to install cocoaDialog to a known location.
In summary, create a policy scoped to "All Computers" that installs your cocoaDialog package. Set a "Custom Trigger" that matches the cocoaDialog_trigger
configuration variable specified in source/printer-installer.source.py
If you'd prefer not to leave cocoaDialog on your endpoints, you can create a cocoaDialog installer package that installs the app to /tmp
as an action in your Self Service Policy.
Specifics on installing cocoaDialog to /tmp
are (currently) outside the scope of this document. Briefly: Update your Self Service Policy to run the Printer Installer script "After" to ensure cocoaDialog is installed first. Update source/printer-installer.source.py
to reflect the location of cocoaDialog within /tmp
.