Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

How do you open a non-command-line application from Terminal.app?

Using open /Applications/TextMate.app (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/Xee.app). any ideas about how to launch interpreter-based applications though? (i.e., open /usr/bin/python script.py 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 script.py

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.