0

A few weeks back I started a machine up with a copy of Parted Magic, and loaded up some webpages in Firefox on it.

Just last week, upon getting back to looking at the machine, I noticed that lxpanel had grown to a larger than normal memory size, and UI response was sluggish. At that time I set ¿stupidly? xset s on & xset s 1.

Today I go to use the machine and find I cannot use the keyboard or mouse to make the display turn on for 1 second (enough time for me to launch terminal and xset s off (My basic attempt to create secure screen saver like functionality)).

I am aware I can kill X, or launch oom_kill, but both of these options will/could loose my unsaved form data that I would prefer not to recreate, even if more time is involved with regaining access to the current session. Does anyone have any other solutions?

user66001
  • 2,325
  • 4
  • 19
  • 27

1 Answers1

0

As I can see from your question, you need to access the form data that you have saved in your firefox tabs. Though, you can install add-ons in firefox to restore the tabs using command line, you have mentioned the machine is in a frozen state as of now.

SSH to the frozen machine from another machine and try any of the below 2 options.

Option 1:

The currently open URLs of the opened Firefox tabs are stored in sessionstore.js file which is located somewhere in $HOME/.mozilla/firefox/XXXXXXXX.default directory.

So, you can start from something like this:

cat $HOME/.mozilla/firefox/*default/sessionstore.js | sed "s/{/\n/g" | egrep -o '"url".*"scroll"' | cut -d\" -f4

Option 2:

python2 <<< $'import json\nf = open("sessionstore.js", "r")\njdata = json.loads(f.read())\nf.close()\nfor win in jdata.get("windows"):\n\tfor tab in win.get("tabs"):\n\t\ti = tab.get("index") - 1\n\t\tprint tab.get("entries")[i].get("url")'
Ramesh
  • 38,687
  • 43
  • 140
  • 215
  • Thanks Ramesh. Was aware of FF's sessionstore.* files, but those two options to retrieve the URL's from the JSON files are different (in the case of the python script, just slightly) from what I have seen in the past, so will keep these in mind for future. As for the problem of general access, I believe `sshd` is unusable in `parted magic`'s default install, so a while a good idea, not going to work in this case. Also, FF form data was only one example of data I don't want to loose, other examples don't (as far as I am aware) cache unsaved data to "disk". – user66001 Apr 21 '14 at 03:23