2696 Views 3 Replies Latest reply: Jan 4, 2007 10:35 AM by Karl Zimmerman
I can give you some partial answers. If you are running in Terminal, the location of the Applications folder is \Applications. Indeed, this is not in the standard unix path, so you cannot normally run an app in the Applications folder just by typing its name.
However, you can run at least some of the GUI apps from Terminal if you know the proper path. For instance, if you enter the following command into a Terminal window:
the Preview application will start.
If you look at this path name, you can start to see some of the problems with trying to add GUI apps to your unix path. These apps are not directly in the /Applications directory. In general, each GUI app will be in its own directory. So, if you wanted to run lots of GUI apps from Terminal by typoing only the name of the app, you would have to add something to your path for each app. Another issue is that it might not always be clear what is actually the proper file to invoke. For instance, I have tried to start Microsoft Office from Terminal but have failed. It is possible that I did not find the correct file to use. I am also wondering if all GUI applications can be started from the Terminal - I am not convinced that that is the case.
There is one nice feature of the Terminal that is germane to this discussion. If you are in Terminal and your working directory contains some document, you can use the open utility to open that file in the correct GUI application. For instance, if I have a pdf file called test.pdf in my directory, I can issue the Terminal command
and this will cause Preview (or perhaps Acrobat) to start up and to open the file.
I hope this helps to answer your question. You did not say what it is that you want to do. If you there is a specific task that you would like to accomplish, please let us know and perhaps someone can help. Also, you can get very good help in the unix forum.
EMAC G4 1.0 GHz Mac OS X (10.4.8)
you can run almost all applications from within Terminal. Just type in the correct path to the UNIX executable. You usually find this in the application package (right click on the application icon and select "show package content") at /ApplicationName.app/Contents/MacOS/ApplicationName. In the case of e.g. Garageband it is:
or disk utility:
/Applications/Utilities/Disk Utility.app/Contents/MacOS/Disk Utility
If this answered your question please consider granting some stars: Why reward points?
You can open an application without any document, or force a document to be opened using a specific application, using open's "-a" argument. For instance,
open -a Preview test.pdfwill cause test.pdf to be opened in Preview, even if you've set all PDF documents to be opened by Adobe PDF Reader.
open -a TextEditwill open an empty TextEdit window.
Powerbook G4 1GHz Mac OS X (10.3.9)