![]() Keep in mind this will only work on 10.10 and 10.11. Though cocoaDialog, while old now, is still very useful in many regards.įor using launchctl, you can try something like this. You may not want to do that, and I'd understand. But this would mean deploying a custom tool to your Macs. The more reliable way would be to use launchctl asuser (10.10 & 10.11), or launchctl bsexec (10.9 and below)Īnother way would be to ditch Applescript and use something like cocoaDialog, which doesn't run into the same restrictions. You can try calling the command as the user with a sudo -u $loggedInUser type syntax, but sometimes even this doesn't work. Essentially osascript commands called by root can't display to the logged in user (unless the user logged in is root of course) ![]() Its the OS doing its job of protecting the user space. Applescript messages that call for user interaction don't work well when they are done via a root session, the way a Casper Suite policy will do. ![]() The problem is the Applescript (osascript) call in your script. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |