0

What is the set of things that differentiate one application from another from the point of view of right-click on dock icon -> Options -> Assign To (All Desktops / This Desktop / None)?

I've experimented and haven't been able to hit on a combination of actual binary name / Info.plist values / PkgInfo string that will make Mac OS X workspaces think a duplicated application is different from the original for purposes of automatic desktop assignment.

-1

Found it, just leaving this here to make it easier for others to find answers via google. See:

Specifically, the one thing you need to care about is CFBundleIdentifier in the app's Contents/Info.plist file. Here is a part from a script that may be useful:

  # Change Bundle ID so desktop assignation works. Not sure if this will survive updates.
  # CFBundleIdentifier must contain only alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.) characters.
  # (Based on fiddling around there also seems to be a length limit.)
  UUID="$(echo $APP | md5sum | awk '{print $1}' | tr [0-9] [A-Z] | cut -c 1-4,29-32)"
  plutil -replace CFBundleIdentifier -string "cdi.$UUID" -- "$RUNTIMES/$APP/Contents/Info.plist"
  #plutil -replace CFBundleName -string "$APP" -- "$RUNTIMES/$APP/Contents/Info.plist"
  #plutil -replace CFBundleDisplayName -string "$APP" -- "$RUNTIMES/$APP/Contents/Info.plist"
  # To check: defaults read ~/Library/Preferences/com.apple.spaces.plist app-bindings

To see this in some context, see my answer to this question: Is there a simple way to have separate dock icons for different Chrome Profiles?

  • OTOH, while the linked pages give some clues about how to solve the problem stated in the question, they don't actually explain how to solve it. Can you add this to your answer? – nohillside Feb 21 '15 at 14:30
  • Updated answer @patrix hope that that's enough. In any case, it's all I know :-) – Daniel J Clark Feb 21 '15 at 21:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .