On Feb 20, 2010 7:46pm, Sadrul Habib Chowdhury <address@hidden> wrote: > * address@hidden had this to say on [18 Feb 2010, 18:31:39 +0000]: > > > I run a combination of screen and autossh to open terminal emulators on a > > > remote box R. Occasionally, be by accident or by design, my local box L > > > gets rebooted. When this happens, on bringing L up again I would like to > > > retrieve my screen/autossh terminal emulators running on R. This is easy > > > enough: First I ssh from L into R; in this ssh session I do screen -list > > > to obtain the list of detached screens in R; I finally reattach to the > > > screen session I want by means of exec screen -x id, where id is the id > > > of the target screen session, as printed out by screen -list. > > > > > > Although this recovers my detached session all right, the problem is that > > > in RI will now have two screen sessions for each screen session I > > > reattach to. Is there a simple way to reattach without incurring in this > > > drawback? > > > > Do you mean two screen 'processes', when you say two screen 'sessions'?
I guess it is processes. When screen -list lists, say, 10 entries, according to ps I also have 10 instances of screen.
> Also, what exactly do you mean by 'drawback'?
Resources usage. If start with 5 screen instances, detach, and on reattaching as explained I end up with 10 screen instances, that, in my opinion, is not an efficient use of my resources.