Stop auto-switching in Mission Control

Issue: Mission Control (formerly Spaces) is great and all, but it forces me to sort by applications instead of tasks. For example, if I select {application} from the Dock, then it automatically switches me to the virtual desktop space in which I first started {application}. However, what I really wanted was to start another instance of {application} running in my current virtual desktop space. Assigning {application} to all desktops in the Mission Control preferences isn't the solution, because then Mission Control just drags around all {application} windows onto all desktop spaces.

Solution: For OS X 10.5.0–10.5.2 Leopard, the solution was to access a hidden preference for Spaces by issuing the following command in a Terminal or xterm (X11) window:

defaults write com.apple.dock workspaces-auto-swoosh -boolean NO

then restarting the Dock using the following command:

killall Dock

Spaces would then allow you to start multiple instances of an application in separate virtual desktop spaces. Note that implementing this setting can result in confusing behavior if you have used the Spaces preferences to assign a specific application to a specific desktop space (although assigning applications to all desktop spaces appears to be fine). Repeat with NO replaced by YES to restore the default behavior. The file modified by defaults in this case is ~/Library/Preferences/com.apple.dock.plist.

Starting with OS X 10.5.3 Leopard, the System Preferences panel for Spaces included a check box at the bottom labeled “When switching to an application, switch to a space with open windows for the application.” All you had to do is make sure that this check box was not selected to achieve the desired behavior.

Starting with OS X 10.7 Lion 10.7, Spaces was removed from OS X in favor of an integrated virtual desktop management system called Mission Control. In System Preferences → Mission Control, deselecting “When switching to an application, switch to a space with open windows for the application” will produce the same behavior as “stop auto-switching” in Spaces. Just to be clear, the behaviors produced by this option are as follows:

“When switching to an application, switch to a space with open windows for the application” is turned...

ON = If you click on the Dock icon for an application that is currently running but has no open windows in your current desktop, then you will automatically be switched to the closest desktop with open windows for this application. For example, if the Terminal application is running and has open windows in a different desktop, but none in your current desktop, then clicking on the Terminal icon in the Dock will switch you to the desktop with Terminal windows (and activate the Terminal application).

OFF = If you click on the Dock icon for an application that is currently running but has no open windows in your current desktop, then that application is made active, but you do not switch desktops. For example, even if the Terminal application is running and has open windows in a different desktop, clicking on the Terminal icon in the Dock would activate Terminal in your current desktop. You could then start a new Terminal window in the current desktop using Cmd-N.

ON or OFF = For either setting, Ctrl-click or right-click on an application icon in the Dock will bring up a menu that allows new windows for that application to be created on the current desktop without switching desktops, regardless of whether or not application windows already exist on the current desktop and/or on a different desktop.

The Double Toggle Procedure: By default on a new installation or upgrade of OS X 1.7 Lion or later, this option is turned ON. Initially turning it OFF in System Preferences → Mission Control appears to have no effect (i.e., the ON behavior is still present). However (and don't ask me why this works), turning it OFF then back ON then OFF again seems to do the trick – at that point, the auto-switching behavior will be OFF and future changes can be accomplished without the repeated ON/OFF toggling.

UPDATE (15 Feb 2012): I was helping someone who upgraded all the way from Leopard to Lion. He had never used Spaces in Leopard, but wanted to use Mission Control in Lion. Unfortunately, he was still getting the auto-switching behavior even after applying the procedure listed above to turn it off. I fixed this problem by having him first perform the “stop auto-switching” Spaces procedure for OS X 10.5.0–10.5.2 Leopard (top of this page), and then perform the “double toggle” Mission Control procedure for OS X 10.7 Lion (above). He can now turn auto-switching on or off from the Mission Control preferences panel.
OS X banner
Update Status: 10 Jan 2014