[vox-tech] possible to exit ssh with a program running?

Tim Riley vox-tech@lists.lugod.org
Thu, 23 Oct 2003 09:01:29 -0700 (PDT)


Quoting Jonathan Stickel <jjstickel@myrealbox.com>:

> I know that if I start a terminal window in X, run a program, and then
> 
> manually close the window, the program dies.  I also know that if I 
> secure-shell into another machine and run a program, I cannot exit 
> without first ending that program.
> 
> Is there any way to start a program for a shell window and leave it 
> running when I close the window?  Also, is there anyway to leave a 
> program running remotely, started through an ssh session, and exit
> ssh?

$ nohup sleep 10000 &
$ exit
<login again>
$ ps -auxww | grep -v grep | grep sleep
timriley  1418  0.0  0.1  1292  372 ?        SN   08:56   0:00 sleep 10000

The '&' puts it in the background, and the 'nohup' tells the shell
to keep it running if you log out.

> 
> The later would be very helpful, although I suspect these two issues are
> 
> related.  My research involves running computer simulations on several
> 
> computers on campus.  I would really like to ssh into the machines from
> 
> home, start the simulations (which generate output to text files), and
> 
> then exit the ssh sessions with the simulations in progress.  This way I
> 
> could close my internet connection (dial-up :( ) and turn my home 
> computer off while the multi-day simulations run.
> 
> Is this possible?
> 
> Jonathan
> 
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>