Information Technology Reference
In-Depth Information
Tip 325
Start GUI Apps from the Command Line
Sometimes it's necessary to start GUI apps from within a Terminal window.
Here's how that can be done.
Opening Finder
To start a Finder window displaying the location you're currently browsing
at the command prompt, just type the following:
OPEN .
That's OPEN followed by a period. Any path will work here, along with relative
paths: OPEN ../ opens the parent of the folder currently being browsed, for
example, while OPEN / opens a Finder window displaying the root of the
filesystem.
Note that the Terminal window can now be closed without affecting the
Finder window.
Opening Files
The OPEN command could also be described as the command-line equivalent
of double-clicking a file. Any file specified after the command will be opened
in the application that saved it or in the default application for that type of
file if the file has been downloaded (in other words, images will open in Preview
and so on).
You can also use the asterisk wildcard. Typing OPEN*.JPG will open all the images
within the current folder in Preview, for example.
As previously, note that the Terminal window can be closed, and the opened
app will not be affected.
Starting Any App
You can also start applications as if you'd double-clicked their entry within
the Applications list of Finder. Just use the OPEN -A command, specifying the
name of the application afterward. For example, to start TextEdit, type the
following:
OPEN -A TEXTEDIT
 
 
 
 
 
 
 
Search WWH ::




Custom Search