# running app from commandline, and then close the terminal



## arri (Jan 9, 2006)

hi


it must be possible:

run some app from the commandline, using an argument that makes it possible that the app runs on it's own, so i can close the terminal-session, without shutting down the app.


how do i do that?


----------



## ElDiabloConCaca (Jan 9, 2006)

You mean like backgrounding?

Try placing a space and the character '&' after the terminal command:

```
> ./someapp arg1 arg2 &
```
That will force the program into the background.  You can bring it back to the foreground by typing the command "fg".  I think backgrounding a process will let you close the Terminal window and keep the process in execution.


----------



## arri (Jan 9, 2006)

i think the ampersand indeed puts the process to the background, so that that you get your promt back, and can do other stuff in the same terminal-session, but you can't close the window.

i think i've seen someone do this once.. but i forgot..

thanks anyway.


----------



## macbri (Jan 9, 2006)

...If it's a "normal" mac app, say Preview.app, you could do this:

open /Applications/Preview.app && exit


----------

