Posted on 03-17-2016 09:12 AM
Hi-
I'm trying to add a small applescript .app to users' computers. In Casper Admin, I added the dock item and the app (using .pkg).
The .app copies fine to /Applications and I have set for the dock item to be added at the end under the same policy. However, trying both at the end or at the front does not add the item to the dock.
I tested the add to dock with something like Self Service and that seemed to add with no issues. I do see the dock flash but my dock item doesn't seem to add.
Solved! Go to Solution.
Posted on 03-19-2016 02:47 AM
@shu This should have been resolved in JSS 9.82.
If you login to the JSS you should see what version it is you're on on the blue bar.
Posted on 04-15-2016 10:07 AM
@shu I had a similar problem. Here's the solution that worked for me: https://jamfnation.jamfsoftware.com/discussion.html?id=19011
Posted on 03-17-2016 09:28 AM
Do you have other dock items that are successful? Sometimes the path listed in the dock item to the app itself can get a little wonky. Make sure they're similar.
Also, I've had hit-and-miss success with dock items as a part of the same policy that installs the application itself. So I always break them apart into two policies: one for install, one for just the dock item. Run the dock item policy second.
Posted on 03-17-2016 09:43 AM
I've ran into this with AppleScript apps. Can try this in addition to Shaffer's comments.
• Try this on another Mac
• Be sure Casper Admin is closed when you add the AppleScript to your Dock, then add the Dock Item and be sure to Save. Close Casper Admin and then Create a new policy with the package and Dock Item.
Posted on 03-17-2016 10:39 AM
I have a package with a script that adds the Dock icon. It has sporadic fails on the 10.11 Macs. Dock is killed, and reloads, but the icon does not appear. Have not found a consistent pattern yet.
Package works 100% of the time in <10.11.x.
Posted on 03-17-2016 11:20 AM
Thanks for your responses. I've tried both @kirkmshaffer and @mvu 's methods and it still just flashes and reloads the dock.
The path names look OK to me...
I have separate Add to Dock policies for PBI Drives (my script), Self Service, and Sublime Text 2. My script and Sublime Text fail. Only Self Service gets added to dock.
I'm using OSX10.11.3 and Casper Admin 9.8.1. Not sure what version of server I'm using.
Posted on 03-19-2016 02:47 AM
@shu This should have been resolved in JSS 9.82.
If you login to the JSS you should see what version it is you're on on the blue bar.
Posted on 03-21-2016 08:56 AM
@bentoms Looks like we're on 9.81. I will have to try this again once my sysadmin updates to 9.82. Thanks!
Posted on 03-21-2016 10:42 AM
FWIW, not sure if this is helpful or not, but I found that I had to add a 60 second delay into my Dock policy in order for all the Dock items to be removed and added successfully. Without the delay it didn't work. I'm on JSS 9.82.
My delay script to add into the Dock policy below. I added the login trigger part as my Dock policy is set to trigger on login. It works great, the first time a network user logs in, a bunch of stuff happens and then 60 seconds later the dock disappears and comes back up with the correct lineup.
#!/bin/bash
#delay the trigger for 60 seconds
sleep 60
jamf policy -trigger Login
exit 0
Posted on 04-15-2016 10:03 AM
@bentoms We upgraded to 9.91 yesterday. I still am not able to get the item to populate in the dock. The dock just flashes (disappears and reloads) when the policy runs. This is in the console:
Apr 15 09:59:08 shu-mac com.apple.xpc.launchd[1] (com.apple.Dock.agent[86091]): Service exited with abnormal code: 1
Posted on 04-15-2016 10:07 AM
@shu I had a similar problem. Here's the solution that worked for me: https://jamfnation.jamfsoftware.com/discussion.html?id=19011
Posted on 04-15-2016 02:00 PM
@AVmcclint Brilliant. I re-added the pkg and the dock item into Casper Admin and it does appear to work now. Thanks!!!