On 07/09/10 09:22, Mark Rogers wrote:
I have a file open on my desktop PC at home, which I want to read now I'm at work.
It's just some notes I started writing in a new document in gedit, it's not been saved (I don't think, anyway).
I have SSH and NX access to my home desktop. If I connect with NX I get access to my home desktop GUI but not to the session I have currently open with the document in it.
Suggestions?
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. Note the security warning about passwords that x11vnc prints, and act accordingly.
If you just want to see the gedit window to read it, just take a screen snapshot of your existing session: ssh in, run "DISPLAY=:0.0 xwd -root -out screen1", then scp screen1 to work or open it in your NX session with gimp. That only works if all your text is visible on the screen of course.
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.
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.
There may be some snazzy way to use dbus-send to remote control gedit to save the file somewhere, but I haven't looked into that.
-- Martijn