running a program from terminal

rdennison

Registered
is a possible to run a program from apple's terminal window like in *nix systems? whenever i try to open something, for example 'emacs &' it gives me the line '[1] 7385' then does nothing. any help? thanx

-rob
 
All items should run from the terminal exactly the same as they would on any other system. To run emacs, you would just type in "emacs". The "&" operator really isn't required.

You can even start desktop applications or open files by using the command "open" (type "man open" for more info).
 
if i go to open emacs from the terminal, it opens it within the terminal window. i do not want that. how do i do it from the terminal, as if i were to double click on the program icon within my applications folder?
 
the console version of emacs comes with Mac OS X and is on the default path. "which emacs" locates emacs at "/usr/bin/emacs" which is the console version, not what you want.

try
"open <path to emacs>/Emacs.app" or whatever the app is called. So assuming that it is in the Applications folder and is called Emacs try "open /Applications/Emacs.app"

EDIT: what you are doing when you type "emacs &" is launching the console version of emacs as a background process. Not what you want to do if I am reading your messages correctly since the console emacs has nothing to do with the GUI emacs. typing "fg 1" will bring emacs back into the foreground so you can quit it cleanly.
 
Back
Top