Keep process running while logging off

Asked by saidian on 2011-05-04

 First, let me apologize for my beginners question as I don't know "how" to ask my question so I don't know if it's been asked before. Also, I'm fairly new at command line (starting to get the hang of it though)

I have Ubuntu 11.04 Server installed and ssh in from a remote location. I would like to run HandBrakeCLI and walk-away while it is transcoding my video files, however, while it is running I'm at an encode status (not the command prompt) and when I close the ssh window my HandBrakeCLI process stops. Is there a way to send it to the background so I can close my ssh session and come back to it later?

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu coreutils Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
2011-05-04
Last query:
2011-05-04
Last reply:
2011-05-04
saidian (kz1rk4) said : #2

Thanks actionparsnip, that solved my question.

Another option for other programs is screen(1). screen creates a new pseudo-tty, separate from the one sshd got when you logged in. You can attach to that new tty and use the separate shell that's running on it, detach whenever you like, log out of the ssh login, and go back in tomorrow and re-attach. Because screen's pseudo-tty is there all the time the programs didn't get a hang-up signal continue to run, and unlike nohup(1) they see a tty so it's better for curses-type programs like IRC clients; IOW the whole "screen" is preserved.