launching GUI apps from terminal

rashumon

Registered
does anyone know how do i launch GUI apps from termnial
i.e like in Linux where u can just type ./app-name and u get
the app launching i want to do this to BBE so that when I type
BBE /filename it opens the file in BBE for me :)
kinda like emacs /filename does in Linux....

BTW
is anyone working on porting Emacs to Aqua ?
would be very cool !!

thanks
 
Yeah. If you want to open some thing called 'application.app', you can type this:
open application.app

You can do this with documets as well. type "man open" for more info on that command. (check out that copyright date - 1989!!!)

However, if the program is allready open, there is a bit more involved.
say you are working with application.app agian.
[/applications/]# cd application.app
[/applications/application.app]# cd Contents
[/applications/application.app]# cd MacOS
[/applications/application.app/MacOS]#./Application

That, or something really close to it, will work. You can even open multipul copies of the same program. Such as two entirely different terminals. You can even get multipul copies of the finder open at the same time, as well as a login window on your desktop (stupid tricks).

Basically, applications appear as applications under the Finder, but they are really folders with the binary exec in app.app/contents/macos/app. Enjoy!
 
Back
Top