LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to run a program in an ssh session that will run after you close out the session? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-run-a-program-in-an-ssh-session-that-will-run-after-you-close-out-the-session-421954/)

dr_zayus69 03-05-2006 05:15 PM

How to run a program in an ssh session that will run after you close out the session?
 
hi. i just started using ssh (forwarding the X session) to connect to my desktop. here is the situation. I have azureus on my desktop and a new IPTV episode came out that i wanted to download. So i ssh from my laptop into my desktop. Opened firefox to the page and clicked on the torrent and azureus started up and started the torrent. I had done the firefox command with & at the end of it but when azureus opened it's information came into the shell so i would have to hit Ctrl+c to close it out and close the session. Is there a way i could have started it up and had the torrent download and then close the session without having to close azureus? thanks for any replies in advance.

piforever 03-05-2006 05:42 PM

Is this what you want ???
http://wiki.linuxquestions.org/wiki/Nohup

dr_zayus69 03-05-2006 06:29 PM

by the description it would appear so but after i log out and log in again and check to see if the program is still running it is not. Is an ssh session independent of the current session that is occuring on the remote host and maybe that is why it isn't staying up?

piforever 03-05-2006 06:52 PM

What I usually do is this
Code:

nohup command [options] > output.log &
and then i log-off...when i log-on back again...if i wanted to see the progress i issue this command
Code:

tail -f output.log
then I know what happened while i'm away....so i'm not sure if what you've been doing is similar to my case..


EDIT
Code:

  If nohup output is redirected to a terminal or is not redirected at all,
  the output is appended to the file nohup.out.        If the file is created, the
  permission bits are set to Owner Read and Owner Write (600). If nohup.out
  is not writable in the current directory, the output is redirected to
  $HOME/nohup.out.  If neither file can be created nor opened for appending,
  utility is not invoked.


Goofy666 03-05-2006 07:09 PM

Isn't it possible to start that torrent with commands so you can work with screen? (Excuse me for not adding a link to the man page, but the system won't let me until I have five posts on this forum)

soulestream 03-05-2006 07:15 PM

screen will be what you want.

screen -S sessionname will start the session

screen -R will resume the session


soule


All times are GMT -5. The time now is 10:04 AM.