0

When I start screen in one terminal with

$ screen -R foo

and then remotely power-detach from another terminal with

$ screen -D foo

my first terminal dies. (Meaning, if I run it from gnome-terminal, the whole gnome-terminal window disappears.)

Is there a way to change this behavior so I can continue to use the original terminal after screen dies?

1

The correct solution is not to use "power detach", but just a "normal detach"; the behaviour you're trying to avoid is exactly the difference between the two.

Instead of screen -D use screen -d, note lower case.

  • Oh, wow… I guess I thought "power detach" would make it less polite, not more destructive. Thanks! – Mu Mind Nov 12 '13 at 8:14
0

Okay, if there's not a proper solution, I found a workaround. If you start the original screen session with:

$ $SHELL
$ screen -R foo

so you're running screen in a shell within a shell, then when it gets remotely detached and tries to kill your shell, it just kills the inner shell and returns you to the outer, original shell.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.