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
screen
or 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
mc
window, amysql
window 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?
screen
command so you could have a split screen if you prefer. The script tracing the active commands could potentially distinguish running jobs based on the tty ID.. tbc