Apple - Stop Mavericks from opening apps on the second screen?
I'm used to connecting to conference room projectors or big-screens that vary in resolution, so as I move from room to room over the course of the day, my windows constantly have to be resized too. So I feel your pain. :-)
In order to avoid confusion, I want to define a couple terms for this answer:
- The primary display is the one with the menubar in the Arrangement tab in System Preferences.
- The main display is the one you want stuff on, whether or not it is the primary display.
- The secondary display is the one without the menubar in the Arrangement tab in System Preferences.
Basically, the problem is that you see an important difference between the main and primary displays; Mac OS X does not, and it's going to fight you when you try to maintain this distinction by treating the secondary display as the main display.
Unless they specifically try to do otherwise, apps will always open on whatever the primary display is. That's definitionally one of the characteristics of the primary display. (It's a pretty low level part of the Quartz API, specifically the CGConfigureDisplayOrigin call, so this behavior is unconfigurable if the app itself doesn't let you configure it.)
I'd suggest maybe asking about the things that are making it annoying for you ("messes with other things" as you put it in your comment) to not keep your main display as the primary display when you connect, because those may be configurable; this behavior is not.
I do have a couple tricks for you that might help, though:
Mirroring and then un-mirroring displays causes all windows too large to fit on the smaller screen to be resized to fit and gets all the windows onto the primary display. It isn't the perfect solution, I know, since you want things on the secondary display, but it can be a useful workaround when combined with the next trick, especially if you know the keyboard shortcut: ⌘-F1. Press it, let the system switch to mirroring, and press it again. All your windows will be resized to the smallest display and will be on the primary display.
Another very useful tool for working around the issue is the BetterTouchTool, which lets you set "Center Window on Next Monitor" and "Maximize Window to Next Monitor" gestures. I assign these to four- and five-finger clicks, respectively, and then I can quickly pop a window from one monitor to the other just by mashing on the trackpad. (If you don't use a trackpad when you're connected to the big display, BTT can do gestures with other pointing devices, too.)
These two tricks together have made working with constantly-changing resolutions not perfect, but at least tolerable. If I want to get all my windows onto the secondary display (I'm giving a training session, say, and want the menubar to be visible to students but I want all my windows not related to the training to be on the other display), I do the mirror/unmirror trick and then four-finger-smack the trackpad a bunch of times until the windows are all popped over.
Finally, if you like to fiddle, you could take a look at this Applescript which moves all windows to primary via a different method. Unlike the mirroring method, which moves windows to primary as a side-effect, this one does it explicitly, so you could modify it to move windows to your preferred main, secondary, display. But it isn't easy, which may give you an idea of why everything's fighting you against this usage. Here's the crucial line of this Applescript:
set position of window x to {0, 22}
Since the menubar is 22 display coordinates (what used to be "pixels" before Retina displays) high, and screens and windows have their origin points at the top-left, this line moves window x right below and flush-left with the menubar. In order to adapt this script so it would instead move all windows to the upper-left of the secondary display, you'd need to figure out its coordinates, and use that as the x value. In the arrangement you show in your screenshot, the "0" there will be replaced by a negative number, since you're to the left of the menubar. It would take some fiddling to get right, especially if you wanted the script to work regardless of the arrangement.
This is all kludgey, I know; but you're going to have to accept kludges if you want your main display and primary displays to be different. That's why I'd really strongly recommend you try to address what's keeping you from letting the other display be primary rather than fighting this particular battle.
As of Mavericks, there is a distinction between active and non-active monitors. You can see which monitor is active by looking at your menubar (I presume you use the new Mavericks spaces behaviour). If you compare them on both screens, one will be faded out and one will be mostly opaque. The one which ismostly opaque is activated and new application windows will open on the screenwith the opaque menubar screen unless there are other windows of the same app on the other screen.
So how can you change which screen is active?
Just press anywhere on the desktop on the screen you want the window to open. This will make the menubar of the screen almost opaque and opening the window should now open it on the screen.
Also note that this behaviour is independent from your Docks position. In my experience, I had to click on the desktop (between the fileS) to activate the other screen (by which I mean get it in the active state)
Update
Admittedly that doesn't prevent Mavericks from opening windows on the other screen 8you can go to "mission control" in System settings and uncheck "monitors use different spaces" to get back to the pre Mavericks behaviour. This way it'll open on the screen last closed and/or the screen where the menubar is on. The method I described above the update is just a workaround of the Mavericks way.
with the App open, press F3 to open Mission Control and then drag the app over to the screen on which you want it to open on in the future. It's assigned to a "space" on your computer - Change the space to which it's assigned.