Dockutil Start

palitech
New Contributor

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 6

bentoms
Release Candidate Programs Tester

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

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

From here.

Look
Valued Contributor III

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.

stevevalle
Contributor III

@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

palitech
New Contributor

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
Release Candidate Programs Tester

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

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