[SLL] Screen

Glenn Stone technoshaman at liawol.org
Sun Jan 13 09:27:37 PST 2008


On Sun, Jan 13, 2008 at 09:17:53AM -0800, Eric Kahklen wrote:
>Also, great book! I just picked it up the other day!
>
>When using screen, I've disconnected from the terminal and when I come 
>back I cannot reconnect to the screen sessions.  I am not sure if there 
>is a preferred way to disconnect from a session to better enable  you to 
>reconnect.  I haven't experimented with too many options mainly because 
>I didn't want to interrupt the lengthly processes I was running.

There are two ways to disconnect, and a couple different ways to reconnect
as well.  C-a d will disconnect the screen session, but leave you logged in;
C-a C-d is a "power detach" which also terminates the calling shell.  This
is what I do just before going home.  

Then on the other end, I do 

ssh colohost -t "screen -D -R"

Which says, shell over to the colo host, and make sure the screen session is
actually detached if it isn't already, then reattach it here and give it to
me."  Now, if you run more than one session, this can get fun... OTOH, you
can name them and attach by name if you wish.  I'll leave that as an
exercise.  But C-a C-d and screen -D -R is what I use.  YMMV, IANAL, EIEIO.

-- Glenn


More information about the linux-list mailing list