5

I updated my macOS to Big Sur 11.0.1 and it seems that they changed the way open command or rather launch services are acting in this version.

I have different versions/releases of my software on my machine in separate folders. Name of my .app is some-app.app (example). If I run this app with open some-app.app then this works perfectly fine and runs my application.

Now if I navigate my Terminal to a different folder with the same .app name and I try to use same command it is actually going to bring up the existing one already running. This is incorrect as this is 2 different instances of app.

I tried renaming one of them thinking this might have something to do with it but no luck, it still brings up already open application.

Please note that I have also checked the process COMMAND by using ps aux and the command of the first app is clearly pointing to correct folder and correct name - which is different then the second instance that I'm trying to run.

I'm also aware of the fact that I could run my app from Contents/MacOS folder inside the package but that is not the solution I am looking for.

Any ideas what could have changed from Catalina that this is happening?

6
  • Not a unix guy but what if you open the second version by specifying the actual executable file inside the .app package: someapp.app/Contents/MacOS/someapp and possibly prepending the path to the app you want to lload with a "./" ? Nov 16, 2020 at 14:39
  • Hi Steve, thanks for suggestion. That does work BUT that means you get stdout/err to terminal which I don't want. Also if you try to do CONTROL+C the app would stop. I have automation scripts that use open -W some.app and those are broken now due to this. Nov 16, 2020 at 14:42
  • Well, partly good news, but I have reached the level of my competence. you might want to add what you just tried to your original question and the results to make it easier for folks to read and offer solutions to your issue. Nov 16, 2020 at 14:45
  • I don't have Big Sur installed yet. Did you have a look at man open to see whether something has changed? There might be a new option for what you want to accomplish.
    – nohillside
    Nov 16, 2020 at 14:55
  • 1
    Seems like open -n ... might be solution. I'm not sure if there are going to be issues with it in the future but I will use it for now. Thank you! Nov 16, 2020 at 14:58

1 Answer 1

6

For now it seems that open -n someapp.app was the solution. I'm not sure if I will run into issues later down the line where I'm not able to use this command but it works at the moment.

Thank you @nohillside for the idea.

UPDATE: What I've done is alias open="open -n" and it seems so far that this is now working same as it was working pre-Big Sur :)

1
  • 1
    Option -n does indeed allow for an app to be launched where -a alone does not (Big Sur only). I would never however make an alias for this. This could silently break many scripts you are not aware of.
    – Anders
    Mar 10, 2021 at 11:23

You must log in to answer this question.

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