nvUltra starts in the background instead of the foreground when launching from the command line
CompletedWhen: I start nvUltra from the command line (iTerm2 or Mac Terminal App)
Expected: it opens in the foreground
Actual: it opens in the background
-
That is how every macOS app I tried works when starting from the terminal (e.g. `./nvUltra\ Beta.app/Contents/MacOS/nvUltra\ Beta`)
0 -
It seems like the apps that are shipped with macOS open in the background (eg: safari, notes).
However, the apps which I installed myself from a dmg (eg: intellij) or brew cask (eg: atom) open in the foreground.
Also, the finder opens in the foreground (eg: `open .`)
0 -
If I remember correctly, neither IntelliJ or Atom are "really" macOS apps, right? They are wrappers around something else. So be careful drawing conclusions about normal macOS behavior from them. Certainly apps from Apple are more likely to do the correct thing, no?
When I use `open nvUltra\ Beta.app`, it is in fact, in the foreground. It's when I use `nvUltra\ Beta.app/Contents/MacOS/nvUltra\ Beta` that it opens in the background. Which is the same for TextEdit, for example.
So, nvUltra still seems to behave correctly. But if you use `open <app>`, it is in the foreground. So, now I am less clear what you think is not working, since you seem to want it to open in the foreground, which it does when launched via `open <app>`
BTW -- `open .` doesn't open the Finder. It opens a folder as a window in the Finder. Regardless, the Finder also comes to the foreground when I do that, which I do all the time.
So perhaps you need to be more precise about exactly what you are doing that seems to not be working for you?
0 -
Thanks for the clarification Fletcher.
I actually have never tried to do `open <app>` on a mac and wasn't aware of it as a possibility.
I thought that `open <dir>` was just a special way of opening dirs in finder and did not make the connection that it was a general purpose utility for opening anything until you mentioned it just now.
`open` is actually a much more convenient way of opening a mac app than having to drill down into the Contents/MacOS subdir, AND as a bonus it also opens in the foreground.
Thanks again for the clarification and for your great work on nvUltra.
0 -
`open <app>` may in fact be using the Finder to launch the application. That I'm not sure about.
Glad you have something that works for you. And if, in fact, nvUltra is behaving differently than a standard macOS application, then definitely someone should point out some specifics and examples of the correct behavior (where the best examples would be Apple apps...)
Thanks for following up!!
0
Please sign in to leave a comment.
Comments
5 comments