• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to execute the .app from the Terminal window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to execute the .app from the Terminal window


  • Subject: Re: How to execute the .app from the Terminal window
  • From: j o a r <email@hidden>
  • Date: Wed, 4 Jan 2006 11:20:10 +0100


On 4 jan 2006, at 11.01, Elango C wrote:

I would like to call/execute the cocoa application (sample.app) from
the Terminal window (i.e. shell prompt).  Can I able to do it?.

To launch a GUI application from a terminal window, I would recommend that you use:


	open ./sample.app

Mac OS X GUI applications doesn't take command line arguments, at least that's not the recommended way to specify how they should behave. I would strongly recommend that you read up a bit on the guidelines for how Mac OS X, and Mac OS X GUI applications work. For programmatic access to preferences in Cocoa applications, see NSUserDefaults. Preferences can be set on the command line using the "defaults" shell command, see "man defaults".

That said, environment variables and command line arguments can be passed to executables launched by Xcode by modifying the parameters of the current "Executable". See the Xcode manual for more information.

j o a r


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How to execute the .app from the Terminal window (From: Elango C <email@hidden>)

  • Prev by Date: How to execute the .app from the Terminal window
  • Next by Date: Re: How to execute the .app from the Terminal window
  • Previous by thread: How to execute the .app from the Terminal window
  • Next by thread: Re: How to execute the .app from the Terminal window
  • Index(es):
    • Date
    • Thread