Launchctl and Dockutil

ChrisTech
Contributor

Hey Everyone..

I am trying to write a persistent dock LaunchAgent. The LaunchAgent works great if you reboot - deletes all the items on the dock and puts back the ones that need to be there. However just logging out of the account and logging back in doesn't fix the dock, a reboot is needed. I tried unloading the LaunchAgent and logging back out and back into the account and still nothing. Any ideas?

Thanks!

3 REPLIES 3

golbiga
Contributor III
Contributor III

I would recommend checking out Outset for this, https://github.com/chilcote/outset. You can set your dockutil script to run at login-every and on each login the dock will be set to how you want it.

Allen

millersc
Valued Contributor

+1 for Outset. We ran into similar problems you.

kstrick
Contributor III

+1 for Outset as well. Login LaunchAgents seem unfortunately unpredictable.