On 07-Sep-10 10:08:04, Mark Rogers wrote:
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.
-- Mark Rogers // More Solutions Ltd (Peterborough Office) // 0844 251 1450 Registered in England (0456 0902) @ 13 Clarke Rd, Milton Keynes, MK1 1LG
Glad you got it solved, Mark! I just had a look at the things you can do from the gedit task bar. Under "Edit" --> "Preferences" --> "Editor" you will find:
File Saving: [] Create a backup copy before saving [on by default] [] Autosave files every [...] minutes [off by default]
Once set, this persists across sessions. So, for future benefit, you could set the "Autosave" and then you would find a "saved" version if the gedit session had run for the set length of time.
I just tested it (using a 5-minute setting) and what I had typed in in my "gedit temp.txt" session was duly there in the saved file "temp.txt".
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 07-Sep-10 Time: 11:58:49 ------------------------------ XFMail ------------------------------