Question

I xould like to execute a shell script on an Ubuntu Machine throught Putty.

The problem is that, if i execute the script with putty connected to the session that run on the machine (same username) it's executed "inside" the putty session, if I close the putty windows, the program stop executing (tracd in this case)

I would like to start tracd on the session that is open on the host machine, ion order for the programm to continue to run when I stop my putty session....

Thanks for your answers!

Was it helpful?

Solution

You can achieve this behaviour with the nohup command.

OTHER TIPS

You might want to use GNU screen for that. This way, closing your ssh session will let tracd run on the server. Once you connect to your server, launch screen, and then tracd from within it. Next time you connect to your server, simply type screen -r to get back to your running program.

See the screen man page for more details on how to use it.

One way that would work (no idea if a better option exists or not) is to set a Cron job to run at a specific time (say two minutes from now). After it's started, you can remove the Cron job again and close Putty. You can specify which user should be running the Cron job, which solves the problem you have here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top