2

Is it possible to have a already started program move to screen/tmux? I'd like to have something like the following:

program;
^Z
screen;
fg;

I know the above won't work, but is there a way to accomplish this?

4
  • It is not a duplicate of that question, as in this one, the user is already running the program and wants to suspend it (^Z), then move to a screen.
    – Daniel Beck
    Dec 13, 2011 at 8:16
  • Yes exactly. The program is already running, but then I decide it's better to have it in a screen (so I can leave my PC). I don't care if it creates a new screen session or is added to an existing one …
    – knittl
    Dec 13, 2011 at 8:20
  • If it's a non-interactive program, couldn't you just use disown?
    – Daniel Beck
    Dec 13, 2011 at 8:21
  • This is a problem of moving a child process under another parent.
    – karatedog
    Dec 13, 2011 at 9:04

1 Answer 1

2

The problem is under no circumstances simple to solve, but have a look at reptyr. It can sometimes help you, especially if you don't care about noise printed in the original terminal & c. You'll might have to compile it yourself, although some distros, Gentoo for instance, package it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .