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.

This question already has an answer here:

Running a program with & appended is a handy way to run it as a background process, but the program is still leashed to the terminal; if you quit Terminal.app, the program ends.

How can you start a program from Terminal.app that will still run if the terminal is closed?

share|improve this question

marked as duplicate by slhck Mar 15 '13 at 8:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
See nohup and disown, which also exist in OS X. –  slhck Mar 15 '13 at 8:01

1 Answer 1

Make a shell script to launch it. Programs run from the terminal are considered children of that terminal. Killing the terminal will in turn kill all the forked processes.

An example could be:

#!/bin/bash
program_name &

Save the file as something like:

filename.sh
chmod +x filename.sh

chmod +x will make it executable, the program should now be double clickable.

share|improve this answer
    
I'm not looking for a clickable file (the particular program, Emacs for Mac OS X, already has a clickable icon). I'm looking for a Mac way to emulate runemacs.exe, which runs separately from the calling terminal. Ampersand is helpful, but it does not do this. There are ways to do this, I just don't know how. –  mcandre Mar 15 '13 at 12:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.