Ramon,

I think I failed to make the desired usage model clear. I gather most
people are in the mode of (a) log in, then (b) run "screen", and (c)
use screen thereafter to multiplex sessions. But my goal is to make
use of screen completely invisible[*]. In PuTTY one of the
configurables is the ssh "Remote Command" which by default is $SHELL.
I'm trying to configure putty with a remote command of "screen
<some-flags>" such that putty will automatically start up a screen
instance and that instance will either attach to an existing detached
session or create a new one. So one putty window == one screen window.
The idea is that this would be just like not using screen but sessions
aren't dropped when the network is.

[*] Aside from TERM=screen and the titlebar saying "Screen ..." and so on.

BTW, note that I have ssh public-key authentication set up so I don't
have to explicitly log in at all. Running putty (or any ssh client)
and telling it to connect to machine XYZ results in an immediate shell
prompt there.

Yes, I could bite the bullet and become a power screen user and
multiplex all my work through a single putty terminal (I think that's
what you're suggesting). Reasons to not do that: I like to use
different background colors to help me keep track of which machine or
SCM branch I'm working on, or perhaps debug vs release. And sometimes
I like a really wide window for monitoring a logfile. Etc. So there's
an existing pattern which I have an investment in and would prefer to
keep.

Thanks,
AK

On Wed, Jun 29, 2011 at 7:50 AM, Ramon J. Gonzalez <rjgo...@gmail.com> wrote:
> I would first name your session something informative like "development" or
> "testing" you can do that sending a commands to screen with C - a
> : sessionname DEV
> Then when you reconnect it would be screen -r DEV
> You could also just add a line to your .screenrc file.  There is also
> another solution.  You said that the scren -x -r is reconnecting you to the
> same session so I am assuming that you are establishing connections to the
> same host.  Why dont you just have all your terminals in one screen session?
>  Then you would only need to login once and you could move around and do
> everything from the keyboard in one putty session.
>
> On Tue, Jun 28, 2011 at 9:28 AM, Adam Kellas <adam.kel...@gmail.com> wrote:
>>
>> I have a really simple use case for screen. I like to use PuTTY from
>> my Windows laptop to Linux because PuTTY is a very nice terminal
>> emulator. The only problem I have with this is that when the network
>> connection drops, as in when I move around with the laptop, the PuTTY
>> session disconnects and all my state is lost. This of course is where
>> screen comes in; I recently discovered it and it seems very likely to
>> solve my problem.
>>
>> When I tell putty to use "screen -x -R" as the remote command it works
>> great for one terminal window; I can reconnect to the screen session
>> after disconnects. But my normal usage mode is to have a number of
>> putty windows open for work in different branches or on different
>> bugs, and with the above setting when I make a second putty session it
>> connects to the same screen window.
>>
>> Bottom line, it's a very simpleminded use case; I want screen to do
>> nothing except preserve my sessions across disconnect. I.e. if I open
>> 3 putty sessions I want 3 different shell prompts in 3 screen windows.
>> If I then reboot the laptop I want my first 3 putty sessions to
>> reconnect to those existing windows (not necessarily in any order). So
>> each putty session should attach to an existing-but-unconnected screen
>> window if available and create one if not. I have no need for any
>> advanced usage like switching screen windows within a putty session.
>>
>> Can anyone tell me the combination of flags to make this work?
>>
>> Thanks, and sorry if my terminology is not up to par.
>>
>> AK
>>
>> _______________________________________________
>> screen-users mailing list
>> screen-users@gnu.org
>> https://lists.gnu.org/mailman/listinfo/screen-users
>
>
>
> --
> RJ
>
>

_______________________________________________
screen-users mailing list
screen-users@gnu.org
https://lists.gnu.org/mailman/listinfo/screen-users

Reply via email to