dockutil adding multiple apps with the same name

cgeorge
New Contributor III

We're running 3 different versions of Maya in my labs (for reasons), and when I try to add all 3 versions to the dock using dockutil, it will only add the first one, and I get:

Maya already exists in dock. Use --replacing 'Maya' to update an existing item
item /Applications/Autodesk/maya2020/Maya.app was not added to Dock
Maya already exists in dock. Use --replacing 'Maya' to update an existing item
item /Applications/Autodesk/maya2022/Maya.app was not added to Dock

the apps all have the same name (but not directory), Maya.app. Their directories are:

/Applications/Autodesk/maya2022/Maya.app
/Applications/Autodesk/maya2020/Maya.app
/Applications/Autodesk/maya2019/Maya.app

Is there anyway to add multiple apps with the same name? The wiki for dockutil is sparse. I can add the app directories, but they go at the end of the dock, and have folder icons, so we're not sure students will notice them.

 

 

1 ACCEPTED SOLUTION

cbrewer
Valued Contributor II

Something like this:

if [ -d /Applications/Autodesk/maya2022/Maya.app ]; then
    su -l ${user} -c "/usr/local/bin/dockutil --add /Applications/Autodesk/maya2022/Maya.app --label 'Maya 2022' --position beginning --no-restart"
    echo "Added Maya 2022"
fi

View solution in original post

5 REPLIES 5

cbrewer
Valued Contributor II

Wouldn't it make sense to just call the Dock items Maya 2019, Maya 2020 and Maya 2022? That seems like it would be more useful to a student than seeing 3 Maya's.

cgeorge
New Contributor III

it would, but renaming the .app with the year breaks Maya. I've also tried aliases, but dockutil sees "Maya 2020 alias" as Maya.app and gives the same message about existing items.

cbrewer
Valued Contributor II

Something like this:

if [ -d /Applications/Autodesk/maya2022/Maya.app ]; then
    su -l ${user} -c "/usr/local/bin/dockutil --add /Applications/Autodesk/maya2022/Maya.app --label 'Maya 2022' --position beginning --no-restart"
    echo "Added Maya 2022"
fi

View solution in original post

cgeorge
New Contributor III

ah ha, I had to tweak it a bit that did it! thanks!

TSOAFTVPPC
Contributor

We create a folder in the applications folder with aliases. Aliases can have any name. Create the Aires with the names you want then put that folder in the dock set to show stack and open as grid