Cannot add dock item in El Capitan

shu
New Contributor

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.

2 ACCEPTED SOLUTIONS

bentoms
Release Candidate Programs Tester

@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.

View solution in original post

AVmcclint
Honored Contributor

@shu I had a similar problem. Here's the solution that worked for me: https://jamfnation.jamfsoftware.com/discussion.html?id=19011

View solution in original post

10 REPLIES 10

kirkmshaffer
New Contributor II

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.

obi-k
Valued Contributor II

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.

scottb
Honored Contributor

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.

shu
New Contributor

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...
6246f53e09bd465692cb5d7585745446

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.

bentoms
Release Candidate Programs Tester

@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.

shu
New Contributor

@bentoms Looks like we're on 9.81. I will have to try this again once my sysadmin updates to 9.82. Thanks!

znilsson
Contributor II

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

shu
New Contributor

@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

AVmcclint
Honored Contributor

@shu I had a similar problem. Here's the solution that worked for me: https://jamfnation.jamfsoftware.com/discussion.html?id=19011

shu
New Contributor

@AVmcclint Brilliant. I re-added the pkg and the dock item into Casper Admin and it does appear to work now. Thanks!!!