I built DockBuilder for you.

ryan_ball
Valued Contributor

DockBuilder allows for the building of a user's Dock based on an organization's needs. DockBuilder eliminates the need for a user template which only allows for a static Dock for all users, and template manipulation can cause issues in newer versions of macOS. DockBuilder not only allows for easy creation of a new user's Dock out of the box, but also has the potential to dynamically set up a different Dock for users based on some criteria; like AD groups for example (you'd have to modify the source based on your criteria).

Features
- Builds a Dock based on pre-defined defaults
- Logs to ~/Library/Logs/DockBuilder.log (by default)
- Does not start until the Dock.app is loaded upon login
- Only builds a Dock for user's who's Dock is younger than 300 seconds (to minimize re-building a pre-existing user's Dock after the installation of DockBuilder)
- Option to hide the Dock and display a message to the user while the Dock is being built

I created a version of this for my workplace, but this includes a lot more functionality and leverages a plist to store preferences for easy manipulation in the future.

Use it, or don't. Create an issue if you have any or submit a PR.

https://github.com/ryangball/DockBuilder

29 REPLIES 29

Hugonaut
Valued Contributor II

Nice Ryan!

________________
Looking for a Jamf Managed Service Provider? Look no further than Rocketman
________________


Virtual MacAdmins Monthly Meetup - First Friday, Every Month

john-hsu
New Contributor III

Thanks for creating this, Ryan! Very simple to set up – this may be something I can use in labs to set default docks. I have it running successfully on one of my VM systems for further testing.

scottb
Honored Contributor

Thanks @ryan.ball Always appreciate someone smarter making my life easier (and even fun at times!).
Will give it a run.

isaacnelson
Contributor

This is awesome. I've been playing with it and it works really well! Thanks for building it and sharing with us!

ryan_ball
Valued Contributor

Thanks. If anybody has a use case for different dock per user using some criteria, let me know.

I’ll probably also work in the addition of Dock items even after DockBuilder has ran for a particular user, like if an organization needs a new app added. Also the removal of a Dock item after DockBuilder might have run for a user. This would eliminate the need for one-off solutions for maintenance purposes.

isaacnelson
Contributor

It would be kind of nice to be able to give a different dock to our hidden admin account.

ryan_ball
Valued Contributor

I'll work on a way to ignore users from the postinstall check that creates breadcrumbs for users that already existed, so that we build the Dock for the user that already existed (if it did). Also, I can look at setting up a different set of items to apply to another user named "admin" for example.

nwagner
Contributor

@ryan.ball Dude, sweet!

Not only is this great work, but you open sourced it for the whole community! You're a saint.

I will commence clicking all the "Likes" for your posts in this discussion. I don't really know what that does, is it just fake internet points or do they go toward something like a free pizza...

Anyway, how do you handle PPPC for this? I mean since there's a launch agent, the app is run by the $USER. I haven't figured out a good way whitelist scripts and apps that are run under those conditions.

Last thing, love your avatar!

ryan_ball
Valued Contributor

@nwagner Thanks! I've used this on all flavors of Mojave, and it does not require a PPPC profile from what I can tell.

ryan_ball
Valued Contributor

@isaacnelson This has been added. Look at the comments around line 52 of build.sh, then lines 108 in dockbuilder.sh.

isaacnelson
Contributor

Awesome! I'm at an offsite today but I should be able to play with it a bit on Monday.

tnielsen
Valued Contributor

For me?! You're too kind.

tlarkin
Honored Contributor

This is a prime example of open source driving and helping more open source. This is the type of stuff the community and jamf should embrace. Good work.

j_tanudjaja
New Contributor III

Hello, does anyone have problem with dockbuilder on 10.15 Catalina? Apple's app icon are missing from the dock (displayed as question mark)

j_tanudjaja
New Contributor III

ah just realised some items in /Applications/ is now at /System/Applications/

kwoodard
Valued Contributor

Jamf needs to buy this and add it into their software. The current way to do this in Jamf is a crapshoot most of the time.

Monkeyfist
New Contributor II

I'm just starting on building next school years, lab setups and this was one area causing me fits. This saves me many hours of trying to get it working or resorting to using cloned base images. So thank you very much!

MikeyJAP
New Contributor II

Confirmed working with Catalina 10.5.7. Thanks!

Tangentism
Contributor III
Thanks. If anybody has a use case for different dock per user using some criteria, let me know.

@ryan.ball Would be good to have the ability to have different dock setups for desktops & laptops

ryan_ball
Valued Contributor

@Tangentism This could probably be accomplished without too much trouble by building two packages and deploying them to different smart groups in Jamf Pro.

ryan_ball
Valued Contributor

Additionally, I've pondered making a swift version of this which would use a configuration profile to set the dock up. Then just changing the profile for machines would allow for easy customizations.

john-hsu
New Contributor III

@ryan.ball That would be awesome to have a way to set docks through configuration profiles. That would definitely make life easier!

kwoodard
Valued Contributor

@ryan.ball Does your DockBuilder allow people to alter their Dock once it has been set by Dock Builder? I like to give my faculty a clean Dock with just the barest minimum that they all would be using, yet allow them to add items to their dock if they want.

ryan_ball
Valued Contributor

@kwoodard it sets the Dock once with the items you specify and after that it will not modify the Dock again so users can make any changes they’d like.

remus
New Contributor III

Hey @ryan.ball
Looks like Monterey is complaining that "DockBuilder" needs to be updated. This app will not work with future versions of macOS… blah blah.
Is there something you might be able to fix or is it Platypus that is not creating a Universal .app?

ryan_ball
Valued Contributor

@remus This needs to be updated to a signed Swift app, but I don't use this any longer and don't know if I want to update it. Alternatively you can build the project and then sign/notarize it yourself which might be a quick work-around.

mwilkerson
New Contributor III

It's looking like a rebuild, sign and notarization of DockBuilder.app is working for me. FYI

mwilkerson
New Contributor III

Well, I may have spoken too soon. Subsequent build attempts after my first couple seem to be showing the alert again. Not sure what to do at this point.

mosermat
New Contributor III

For anyone looking to build a custom dock in Monterey, I piggybacked off @ryan_ball 's awesome work, rewrote a bunch of stuff and created a new post here:

https://community.jamf.com/t5/jamf-pro/build-a-custom-macos-dock/m-p/264565#M243152