12

Possible Duplicate:
How to clean launch a GUI app via the Terminal (so it doesn't wait for termination)?

I start a program from terminal with the following command:

<program name> &

But when I close the terminal the program will close too. How to escape the program closing?

Kron
  • 221
  • 1
  • 2
  • 4

2 Answers2

15

You can close the terminal by pressing Ctrl-D at the prompt instead of using the window controls. This will do what you want.

ernstkl
  • 396
5

One solution is to use screen and detach from it:

sudo apt-get install screen    
screen
<program name> &
ctrl-a ctrl-d (this detaches the screen session)

This is useful especially when starting programs on remote servers. You can then run screen -R to reattach. See this howto.

Geoff
  • 246