13

I'm running El Capitan 10.11.4 on a 2014 Mac Mini.

I'm often running 10-14 apps at one time as I work writing reports, word/excel/Adobe/Safari/iTunes/calendar/etc...

Frequently I want to open another app, I want it to open in the background and go back to word/excel and keep working, but the launching app takes away my focus, sometimes 2 or 3 times. once for the splash screen, once for the open dialogue window, and again after I click 'new document'.

Another situation, I update an app in the background, like 1Password (beta) and every step it takes my focus back to the app being updated.

Is there anything I can do with Unix/Terminal, etc. to force all app activity to be done in the background, or to keep OS to respect my focus?

2
  • God I wish this could be resolved. I launch apps from spotlight and it always kills my work flow to have the app steal back my attention after 2-10 seconds of loading.
    – Herbert
    Commented Feb 18, 2017 at 4:18
  • On Monterey (but I think it started before) I've suddenly had the exact opposite behavior (ie. exactly what the OP requests) but I have no idea which setting (or hidden preference) I used.
    – brandelune
    Commented Jan 27, 2023 at 1:36

2 Answers 2

5

To launch an app in Finder in the background (hidden) you can use a simple Automator service. Open Automator app, select a service that accepts files or folders in Finder and add a Run Shell Script action with following contents:

Automator service

for f in "$@"
do
    open "$f" --hide
done

Save the service as Open in background. Open System Preferences./ Keyboard / Shortcuts / Services, find your new service and assign a keyboard shortcut you desire. I chose a handy ShiftCmdB. Close System Preferences and test the service and the shortcut.

open in background

Nice thing about this is that it works with apps as well as documents.

1

Working on macOS 12.1 (Monterey) with another flag option:

for f in "$@"
do
    open "$f" -gj
done

see this post for more information: Open app in background from Terminal

2
  • couldn't comment because no reputation...
    – shoj
    Commented Jan 15, 2022 at 14:53
  • It would be helpful to future users that come across this answer if you could edit in a summary of the information in case the link becomes broken.
    – agarza
    Commented Jan 15, 2022 at 15:21

You must log in to answer this question.

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