0

I use multiple desktops to multitask between applications because I like using full screen mode. My problem is sometimes I run a command in Terminal that launches other applications. Whenever a new application is launched in OS X, it seems to think that it should automatically change to the "Main Desktop" and set the newly launched application as the active application. This bothers me because I would like to just run an application in the background without the OS deciding what I should be staring at.

Is there a way to disable or work-around that behaviour?

Note: this, I believe, unfortunately is the same behaviour when you have any application in full screen as your main focus application and you launch another application from the Dock. It takes your focus directly to that new application.

  • How about using AppleScript like osascript -e 'run application "Photos"' ? It launches and runs an application hidden. – Mateusz Szlosek Aug 24 '16 at 6:58
  • @MateuszSzlosek: this wouldn't work if I'm starting a process from terminal that, say, launches Chrome and then prints stuff back in terminal. – believesInSanta Aug 24 '16 at 7:01
  • or i would have to wrap every command that launches another application into an Applescript for that particular application – believesInSanta Aug 24 '16 at 7:03
  • How do You run the command? Because if I do /Applications/Contacts.app/Contents/MacOS/Contacts I'm not deactivating the fullscreen Terminal. (macOS Sierra) – Mateusz Szlosek Aug 24 '16 at 7:17
  • @MateuszSzlosek: The way the new application is launched is arbitrary. I just want to prevent the new application from stealing focus. – believesInSanta Aug 24 '16 at 7:27
1

There is no way to change this behavior. The reason is because your full screen application is contained in a separate virtual desktop, leaving the "default desktop" available for any other apps to run (like the case of efficiency on multiple screens). OS X & macOS work like that. Every aspect of the OS was designed in a way to be "clutter free", so a window on top of a window is a big no no for apple, and will be avoided if possible.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .