Skip to main content
Question

Dockutil Start

  • July 15, 2015
  • 6 replies
  • 23 views

Forum|alt.badge.img+4

Hi all,
I have just come across Dockutil over the past couple of weeks and can't seem to figure this out. So I am going to start from scratch. Does any one know of a guide for beginners for Dockutil? Perhaps a blog or other post? I have searched here and Github and have come across mostly troubleshooting their scripts, where as I can't even get the computers to recognize dockutil. I am still getting the 'dockutil: command not found' error :(. I am looking to push this out to computer labs and carts. I know I am missing something very simple but my mind is all tangled up with everything. Thanks

6 replies

bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • July 15, 2015

@pali.Tech Copy the binary to a directory & then invoke if via the path, as per:

/usr/local/bin/dockutil --add "$appPath"

From here.


Forum|alt.badge.img+16
  • Valued Contributor
  • July 15, 2015

It is just a script so you can put it anywhere you like, but you need to specify the whole path to access it as in the example given above.


Forum|alt.badge.img+10
  • Contributor
  • July 15, 2015

@pali.Tech Here is a link to a pdf that explains how to install and manage Dockutil. It uses ARD as the deployment app, but can be adapted to Casper!

http://staff.4j.lane.edu/~nelson_d/documentation/Mac_OS_X_dockutil_and_ARD.pdf

Hope that helps.

Steve


Forum|alt.badge.img+4
  • Author
  • Contributor
  • July 16, 2015

I got it! Thanks to you guys. I moved it to /usr/local/bin. In reading these scripts that others have made on other posts, like the one in that link @bentoms , they start off by getting the username of the logged in user. Would I need to do this if I know the particular logged in user, and we only want to manage the dock on a particular user? In our case we are using a standard local account, in a computer lab. So all students log in with the same username and password on all computers.


bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • July 16, 2015

@pali.Tech Yes.. as JAMF policies run as root.. you'll need to switch.. but you should be able to hardcode the username:

sudo -u student1 /usr/local/bin/dockutil --add "$appPath" /Users/student1

loceee
Forum|alt.badge.img+10
  • Contributor
  • July 17, 2015

And shameless plug for dockBuilder than can help you leverage dockutil to build docks via JSS policies!

https://github.com/loceee/OSXCasperScripts/tree/master/dockBuilder