Posted on 06-16-2020 07:09 AM
I have been using Dockutil for several years and it has worked great. We are rolling out our first Catalina machines and I am having an issue. Below is my script. Chrome, Word, Excel, and Acronis Files Connect appear in the Dock just fine. These are installed applications. Calculator, Photos, and Music appear in the Dock with ? showing. These are built in Apps. How do I fix this?
LoggedInUser=$(python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "
");')
LoggedInUserHome="/Users/$LoggedInUser"
/usr/local/bin/dockutil --remove all --no-restart /Users/$3
/usr/local/bin/dockutil --add /Applications/Google Chrome.app --position 1 --no-restart $LoggedInUserHome
/usr/local/bin/dockutil --add /Applications/Microsoft Word.app --position 2 --no-restart $LoggedInUserHome
/usr/local/bin/dockutil --add /Applications/Microsoft Excel.app --position 3 --no-restart $LoggedInUserHome
/usr/local/bin/dockutil --add /Applications/Calculator.app --position 4 --no-restart $LoggedInUserHome
/usr/local/bin/dockutil --add /Applications/Acronis Files Connect.app --position 5 --no-restart $LoggedInUserHome
/usr/local/bin/dockutil --add /Applications/Photos.app --position 6 --no-restart $LoggedInUserHome
/usr/local/bin/dockutil --add /Applications/Music.app --position 7 $LoggedInUserHome
Posted on 06-16-2020 07:17 AM
I will answer my own question. In Catalina built in application are not found in the Application folder even though it appears they are there. They are found in the System/Applications folder
This does not work
/usr/local/bin/dockutil --add /Applications/Calculator.app --position 4 --no-restart $LoggedInUserHome
This works
/usr/local/bin/dockutil --add /System/Applications/Calculator.app --position 4 --no-restart $LoggedInUserHome