How can I make OSX remember the desktop assignment of different chrome windows

Problem: When using google chrome browser (51.0.2704.103) on OSX (10.11.6) I often find myself losing my carefully ordered window placement between my many desktops. This happens if chrome happens to quit, or whenever OSX restarts. OSX tends to remember desktop allocation per application, but all chrome windows get bundled in the same desktop whenever chrome restarts.

Motivation: This is crucial to me because I alternate different projects and for productivity reasons I have each project on a different desktop.


Edit: This still doesn't COMPLETELY work for me as well: some windows are restored and some are not. The new bug id is 1012034.


This is being fixed in the latest development version (Chrome 79) as bug #74812.

Though, by default, in compliance with Apple's UI requirements, this feature still won't restore the workspaces if you exited Chrome with Cmd-Q. Quoting sdy, the feature author:

For folks who want Chrome to always restore windows to their original spaces, you can set that by running this command in a terminal window (for Canary, use com.google.Chrome.canary):

defaults write com.google.Chrome NSWindowRestoresWorkspaceAtLaunch -bool YES

To go back to the default behavior, run:

defaults delete com.google.Chrome NSWindowRestoresWorkspaceAtLaunch

It seems like OSX will open all the windows of an application in the same desktop space. You will therefore need to open each window as a separate application instance.

For most applications, but not for Chrome, it is enough to open it via open -naF "App Name", but for Chrome you must also specify a different --user-data-dir parameter for each instance. You will need as many temporary directories as the number of instances that you wish to open.

References :

  • How to open new windows as separate application instances for Chrome, Terminal?
  • Multiple Instances of Chrome

I came to this issue as well, this is how I tried to solve this.

  1. Right click chrome->options->Assign To (choose none).As shown in the picture down below

snapshot1-chrome

  1. Now you could click the chrome window to another desktop.Then you will see chrome in the second desktop.

snapshot2-desktop