On 07/09/10 10:37, Martijn Koster wrote:
Snazziest way is to ssh into your home machine, run "DISPLAY=:0.0 x11vnc", then connect to your machine with a vncviewer (from work over ssh tunnels, or from your NX session), to give you full access to your existing X session.
This worked perfectly, thanks.
I connected using VNC to localhost from my NX session, but I'll play around with ssh tunnels for future reference.
As well as being "snazzy" this is really the option I was hoping to have, as it's more generally useful than all the other possible hacks.
If you don't want to bother with remote graphic access and you want the actual text to edit, you could use "gcore" to generate a coredump of the process, and the "strings" the resulting core file to see if you can recover the text.
I tried this out of curiosity, and everything I needed was there provided I knew enough about what I needed to find the signal amongst the noise; if I knew enough to find it I probably wouldn't have needed to go through the exercise! Surprising just how much was in the dump, not least because of how little had anything to do with that gedit session.
If you run a "gedit filename.txt" multiple times from one session it re-uses the existing one... you could try that from your NX session, although I'd be surprised if that worked.
My first attempt had been to run gedit, hoping that I had already saved the file and that I could look at the recent files list to see where I'd saved it. But gedit didn't open (it presumably just re-used the old session that I couldn't access).
Thanks (also to Steve & Ted) for your suggestions (and experiments), all very welcome.