Skip to content

Instantly share code, notes, and snippets.

@f-steff
Created October 9, 2019 18:30
Show Gist options
  • Select an option

  • Save f-steff/0163e0c1ed174e8ab7b33101ab473b5a to your computer and use it in GitHub Desktop.

Select an option

Save f-steff/0163e0c1ed174e8ab7b33101ab473b5a to your computer and use it in GitHub Desktop.
Mac Secrets
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
This should work for any Mac app, not just Chrome.
@AugustM
Copy link

AugustM commented Dec 18, 2025

In MacOS Monterey, I tested this command with both Books.app and Music app.

I looked in each app's info.plist for the CFBundleIdentifier value which turned out to be com.apple.iBooksX for Books.app and com.apple.Music for Music.app. I ran the above command using each of these AppBundleIDs. I moved the app windows to my desired Spaces for them and rebooted. Both Music and Books reopened in Desktop 1 instead of the desired Spaces.

I wish it worked, but it doesn't work for me on Monterey.

@f-steff
Copy link
Author

f-steff commented Jan 3, 2026

Thank you for testing this.
To be honest, I haven't used it recently, but it did work on macOS Mojave, and High Sierra when I found out, and it seems the problem have mostly gone away since then.
At the time I reported the error on the Chromium bugtracker, and a lot of people looked at it. Multiple other tickets were made, but I unsubscribed from most of them. The last I know of is this: https://issues.chromium.org/issues/40651977
Perhaps it's time to create a new ticket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment