Bugs :  K-Meleon Web Browser Forum
You can talk about issues with k-meleon here.  
How to rescue previous session?
Posted by: Jennifer
Date: April 13, 2015 11:48AM

Hi. I was using K-Meleon 1.8.x. There was a power cut. The computer obviously shut down. When power returned and I rebooted, starting K-Meleon up with the previous session caused it to freeze, with some of the tabs appearing to be reloaded, but not all of them. Since the window was frozen and impossible to interact with, no data could be copied out of it.

I would like to find where the previous session is stored as data (probably as a sqlite database) and recover the URLs manually. Please advise.

Thanks.

Options: ReplyQuote
Re: How to rescue previous session?
Posted by: rodocop
Date: April 13, 2015 04:47PM

don't use KM 1.8 - it was test unofficial build very outdated now.

Upgrade to KM75RC2 with update2 - this one handles sessions much more better.

Options: ReplyQuote
Re: How to rescue previous session?
Posted by: siria
Date: April 13, 2015 06:31PM

Not much hope I'm afraid sad smiley 1.8 was a special build and I don't know if it was still using the same session system as 1.7, but probably.
In the official builds the session system was changed in KM75 (or 74?) and since then stores the addresses in a separate file. Look inside your current profile folder if there's some file named "session..."?
If not, the OLD sessions plugin worked like this:

- during a session, current adresses were stored inside prefs.js in the profile folder, as "last session". Each page address is only saved after the page is fully loaded.

- if the browser gets closed normally, KM overwrites (before shutting down) the old "Previous Session" with the current "Last Session"

- at each browser start, the old "Last" session gets deleted again and a new one gets started

- if the browser crashed, the stored "Previous Session" is not updated and still the "next-to-last" session!
==> KM can only restore the last regularly-closed "previous session".

BEFORE restarting the browser after a crash, the crashed session is still stored as "Last Session" in prefs.js - but will get deleted again as soon as the browser is restarted. So the first rescue action is to make a backup copy of that file, then try to fix it with a macro or manually.

If not, your only chance is probably to recover those few tabs that had already fully loaded in the first restoring attempt before all froze up. Before starting that browser again, I'd make a copy of prefs.js in current profile folder and look inside it with a text program, what may be left...or not...

=====

That said... but perhaps your HISTORY still holds the adresses??
Stored in profile folder too, old system history.dat, new one guess places.sql



Edited 2 time(s). Last edit at 05/25/2015 10:53AM by siria.

Options: ReplyQuote
Re: How to rescue previous session?
Posted by: guenter
Date: April 17, 2015 05:01AM

IMHO 1.8 test version by adodupan still used used the old system. So to look inside what what files and options siria posted is the only solution.

Options: ReplyQuote
Re: How to rescue previous session?
Posted by: siria
Date: May 25, 2015 11:30AM

For the OLD system in KM1.5-1.8, there's a rescue macro by JamesD somewhere in the forum now. Like mine too, it works fine, but can only save line by line by line by line by.... ouf.

For 100+ tabs on a old and slow machine that can get a bit tedious, so here's an alternative way, fixing the crashed session in prefs.js via Notepad. Still tedious too, but just one writing action:

- Do NOT restart the browser after a crash, instead find the crashed prefs.js in the current profile folder. Make a backup copy.

- Delete the whole "Previous Sessions" block, then replace all "Last Session" with "Previous Session". Optional toggle the crash flag too.

- save file, restart browser

==============

If that happens more often and you want a semi-automatic "Notepad++" macro, record this replacement:

- Open prefs.js and start Search>Replace or hit Ctrl+H
- check the "regular expression" and "wrap around" checkboxes
- replace this line:
(cleanShutdown", false)|(user_pref\("kmeleon\.plugins\.sessions2\.Previous Session.*)|(Last Session)
with this:
(?1cleanShutdown", true)(?2)(?3Previous Session)
- hit "Replace All", wait a few seconds for the confirmation popup
- save file, restart browser

Options: ReplyQuote


K-Meleon forum is powered by Phorum.