My walk was the walk of a human child, but my heart was a tree.

September 16th, 2007

09:09 am - [nargery] reattach

Nargery: Rudd-O's idea in Behdad's post about setting the cwd of a running process made me think that the same principle could usefully be used elsewhere. In particular, I have screen sessions which run for months; the connection to the server doesn't stay up that long, and so by the end of it DISPLAY is usually out of date, which means I'd either have to keep it updated manually in each of (perhaps a dozen) screens, or run X programs outside screen, which is icky. A similar thing happens with ssh-agent, when I'm using screen on localhost rather than remotely: the original agent is often weeks dead by the time I reattach, because I've restarted X in the meantime.

So I made this script, offered in case it's useful without warranty. Add or remove variables from @FIXABLE_VARIABLES as you have need. Feedback welcome.
Tags:
Powered by LiveJournal.com