[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reattaching to a detached screen

From: Andrew Schulman
Subject: Re: Reattaching to a detached screen
Date: Thu, 01 Jan 2009 07:26:32 -0500

>    autossh -M 0 -t RemotePC "screen -e^Yy -D -R -S `uname -n`2RemotePC-$NEXT"
> What I would like to be able to do is to attach to this screen from a
> new shell in RemotePC, or a new screen launched from MyPC, such that
> the deattached screen now becomes attached AND the new shell or screen
> disappears, with the reattached screen taking its place.
>     Reattaching is easy - there are several screen options that
> accomplish that. It's getting rid of the new, supporting process
> (shell or screen) that I just can't pull off. Is this doable in a
> simple way?

I do something similar to this.  Instead of logging in and running screen, I log
in with bash as usual, and then at some point in my .bash_profile I run

exec screen -RD ...

This replaces the original bash login shell with the reattached screen process.
Detaching from the screen then immediately logs me out.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]