Home » Questions » Computers [ Ask a new question ]

Is there a way in Mac OS X to stop applications from stealing focus, especially between spaces?

Is there a way in Mac OS X to stop applications from stealing focus, especially between spaces?

I have certain applications set to open in certain spaces, but would like them to open in the background and not switch the space just so I can watch them open.

Asked by: Guest | Views: 274
Total answers/comments: 2
Guest [Entry]

"This will prevent any autoswitching of Spaces, which meets your criteria, but does other things, too, that you may not want:

defaults write com.apple.dock workspaces-auto-swoosh -bool false
osascript -e 'tell application ""Dock"" to quit'"
Guest [Entry]

"(above user refused to let me cite the official documentation in my edits to his answer, so I'm adding it for the benefit of actual users who want to get the authoritative source of truth)

From man open

-g Do not bring the application to the foreground.

Example:

open -g -a /Applications/TextWrangler.app /path/to/myFile.txt"