Hello,
AppleScript via BigFix
How do I get the following AppleScript to show a dialog to the user?
display dialog "foo"
When executing the above, the client log shows “Script ended (exit code = 1)”
When logging in over ssh and sudo’ed to root, the following works (a popup is observed):
sh-3.2# echo display dialog “foo” | osascript
2018-09-18 11:26:59.061 osascript[4609:52609] GetInputSourceEnabledPrefs user file path = /var/root/Library/Preferences/com.apple.HIToolbox.plist
2018-09-18 11:26:59.061 osascript[4609:52609] GetInputSourceEnabledPrefs effective user id path = 0
2018-09-18 11:26:59.061 osascript[4609:52609] GetInputSourceEnabledPrefs user pref content = <CFBasicHash 0x7fe43cf054f0 [0x7fff8c754af0]>{type = immutable dict, count = 1,
entries =>
2 : <CFString 0x7fff8c6fcb78 [0x7fff8c754af0]>{contents = “AppleCurrentKeyboardLayoutInputSourceID”} = <CFString 0x7fff8c71acf8 [0x7fff8c754af0]>{contents = “com.apple.keylayout.US”}
}
Debugging on MacOS
On Windows computers, I use psexec to launch a command prompt as the system user to better simulate the environment in which besclient is executing. I’m not sure what the equivalent would be for MacOS and would like to hear about your techniques for creating MacOS content.
Thank you for any help you can provide,