-1

I want to run an application with commandline arguments without having to open the terminal every time. I'm trying to do something like this, which requires finding the binary and making a dummy application that runs the binary with arguments.

When I use open on the application and when I click on it, it runs fine. However, when I cd into the application and then run the binary from the terminal (which I found by opening the Info.plist) it crashes (more specifically, prints out

<unknown>(0x1133fedc0):  ERROR| Assertion failed!


Expression: ALE-CA900FE5

and then segfaults.

Is there something else that runs when I run open? The manpages for open doesn't provide information on how open works. How would I debug this?

  • open should do it. This is a regular application? Is it in your applications folder? – jmh Nov 8 at 19:33
  • what do you mean by your statement " When I try to run the actual executable (which I found by opening the Info.plist" How did you open it if you didn't know which app it was? – jmh Nov 8 at 19:34
  • Firstly, welcome to Ask Different. :) I've put a temporary hold on this as your question seems to, well, contradict itself. Namely, you need to clarify the issue that @jmh raises in their comment, otherwise your 2nd and 3rd sentences seem to contradict each other. – Monomeeth Nov 9 at 0:49
  • 1
    @Blubber What they are trying to tell you is that "usually" applications do not segfault like that. I.e. if you told us which application you're trying to run, we can help you. If you won't tell, it's nearly impossible to list all possible causes of a segfault. – jksoegaard Nov 9 at 22:29
  • 1
    @jksoegaard OK, the application I'm trying to run is League, which for some stupid reason does not let you change the locale from within the game, but will change it if you pass in a command line argument. I didn't mention it because I didn't think it was relevant and since downloading it can take quite a long time. running open -a "League of Legends.app" launches as normal. Inside the Info.plist under CFBundleExecutable is LoL/LeagueClient.app/Contents/MacOS/LeagueClient, which when I type into the terminal, crashes. – Blubber Nov 9 at 23:49
-1

To open an app from the command line you have to know where the application is located. The app in the Applications folder is just a package containing your app and icons and some other files. For example, go to your application folder and select the calculator app. Right-click on this app and you'll see an option to "Show package contents". That opens the app folder and you see another folder named Contents. That's a folder you can double click on to open. When you open this folder there are several folders with one named MacOS. Open that folder and you'll see the actual app named calculator. To run this from the command line you need the complete pathname in your open statement. Again for the calculator app this path is

/Applications/Calculator.app/Contents/MacOS

You must log in to answer this question.

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