I want to keep GNU screen, with bash and vim, running nicely
when I start a new X server and the DISPLAY number changes.
(We are using Xming on Windows with a Linux server on the LAN).
There’s no ‘nice’ way to do this, as far as I can tell.
My hacky solution reloads DISPLAY from a file each time you press enter in bash,
and provides a :R = Restart() command in vim, so I can easily restart vim
with a new DISPLAY, but preserving the current session (files, windows, etc.).
It also provides a default –servername (process ID).
I’m somewhat embarrassed to post this!
details here: http://sam.ai.ki/survive-X-crash.txt