Persistent PuTTY sessions for multiple windows
        Posted  
        
            by 
                Tgr
            
        on Super User
        
        See other posts from Super User
        
            or by Tgr
        
        
        
        Published on 2012-12-17T10:24:28Z
        Indexed on 
            2012/12/17
            11:05 UTC
        
        
        Read the original article
        Hit count: 308
        
I'm working in various Linux environments through PuTTY connections which break from time to time. I'm looking for a solution to make the PuTTY windows persist (e.g. if I was editing a file, then after reconnecting I should be in the same editor with the same file open at the same place), with the following requirements:
- it shouldn't require any manual setup at the beginning of the session or after reconnection (I don't want to type in 
screenor anything like that) - I have several windows open to the same machine with the same user, which tend to disconnect at the same time
 - the number/role of windows is not constant (it's not like I have an 
mcwindow, amysqlwindow and a "script runner" window; sometimes I use one window for search or for SVN commands, other times I need several at the same time) - sometimes I need to change the properties of the windows for a task (large window for grepping/editing, small windows because I need to see two of them at the same time, red background because I am modifying the live database in MySQL etc), so I need to get the same console back in the same window after a reconnect
 
Is there a way to achieve this? I suppose I should use screen or something equivalent, but how does it know which window I am reconnecting from? Is there some way to pass a unique window identifier to the shell from PuTTY?
© Super User or respective owner