2

I'm running the latest desktop Ubuntu, and my system seems to have frozen -- the pointer moves when I move the mouse, but nothing else is happening; even the clock is stopped. tty1-6 work just fine, though; it's just the GUI.

Normally I'd just restart, but I have an open file in gedit with a lot of unsaved changes -- inexplicably, the auto-save hasn't worked for ages. Is there a way to go into another console, log in with the same account, and access processes in a GUI console, either to just send a "save" command or just retrieve the open file text?

ETA: I know how to get the process ID with lsof and have done so. I suspect there may be something I can do with disown or the like.

Braiam
  • 67,791
  • 32
  • 179
  • 269
Shay Guy
  • 245
  • 2
  • 10
  • You can look to see if it saved a backup, ls -A, you should (hopefully) see a file.txt~. Otherwise, I do not know a solution, I would debug why autosave is not working. – Panther May 23 '13 at 16:09
  • I didn't think to mention, but while there IS a file.txt~, it's older than the file.txt. – Shay Guy May 23 '13 at 16:27
  • check the contents. nano file.txt~ – Panther May 23 '13 at 17:59
  • Further clarification: The contents are older than the main file. I checked before I ever posted this question. – Shay Guy May 23 '13 at 18:06
  • 1
    I do not think there is any way to recover then. – Panther May 23 '13 at 18:06
  • In order to recover it would require that Gedit implements a safe exit (while saving files) from a certain signal (Say, SIGUSR1 or SIGTSTP). Short of browsing its code, I doubt this to be the case. 2. You can only disown a process from an attached console (which, in your case, exists under the GUI). However, disowning it leaves no way to control it other than OS signals.
  • – Chuck R May 24 '13 at 03:58
  • possible duplicated http://askubuntu.com/questions/4408/what-should-i-do-when-ubuntu-freezes – Braiam Sep 11 '13 at 18:03