Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I launch a non-command-line application from Terminal.App, it always seems to go behind whatever Terminal.App window I'm running. I noticed this for OpenGL and X11 based applications and also for more native applications like Xee. Is there some preference I'm missing? If there's a way so that I can launch these applications and shift focus to them by default? That would be great. Often, these programs run from Terminal.App and keep open stdin/stdout/stderr on Terminal.App (i.e., they run via an interpreter like Python). So I don't think I can just script it with Butler or something (someone mentioned Butler? via Google). I basically just want to fork and give focus to the child process -- would that mean I'd have to hack Terminal.App? Is that even possible (is it open source)?

Hopefully I'm missing something.

share|improve this question

How do you open a non-command-line application from

Using open /Applications/ (you can use open with any app or file, just give the path) TextMate started and focus shifted from Terminal to TextMate.

Applying the -g option will open the app in the background.

share|improve this answer
cool. thanks. that works for *.app apps (e.g., open ~/xee_dev/ any ideas about how to launch interpreter-based applications though? (i.e., open /usr/bin/python doesn't seem to work. i guess i could create a .app directory or something....) thx again tho – Tom Harada Oct 6 '09 at 19:13

If you want to launch a python script:

$ python

To run an application:

$ open -a textmate

Yes, application name is case insensitive. If you want to run that script in a separate windows, use Shift+Command+N, type the command and check "Run command in a shell"

share|improve this answer

You must log in to answer this question.