Friday, September 21, 2007

My Webpage Addiction

So, yesterday, I had a recurring issue happen to me, which causes me much frustration. I lost about 100 webpages in Firefox. Yes that's right, I lost webpages. Ok, let me explain what I mean.

First, I have a problem. I collect webpages. I think that's about the only way to describe it. I will find a new webpage through any of a variety of means. I might open 15 pages from search results when I'm trying to troubleshoot a problem, or I might follow some links from various webcomics, or be sent something by a friend. Then, for whatever reason, I don't just read the page and move on. Instead, I save it. Either because I don't have the time to read it entirely right now, or I want to try it out later, or I think it's great reference material to keep around, or I want to send it to someone else. So for whatever reason, I want to keep it around.

Because of this, I've got hundreds of untamed bookmarks, synced between browsers, in theory, whenever Google Browser Sync works properly. (It synced at the beginning, but I'm not sure about lately.) I've also got a del.icio.us list that is 234 pages long at 10 items per page. And lately, I've become known (read as:ridiculed) for having as many as 150 tabs open in several windows in Firefox at any given time. Yes, starting Firefox is a 15 minute ordeal.

The strategy of just leaving the tabs open, works best for things I just haven't had time to read, or want to try in the next day or two. In theory. So, pre-Firefox 2.0, I use an extension to save my tabs, and restore them in case Firefox crashed on me. It also had the nice extra of saving the last 2 sessions, so if for some reason it didn't load my tabs properly, I could go back to the previous saved version. (Just don't close Firefox after not having your tabs load, or you will lose the good saved session information.) Firefox 2.0 came along, and with it, integrated session saving. This has been nice, and is more robust that the extension I relied on before (which is no longer compatible with current versions). However, it does not have the ability to re-load the session, or to load an older session.

Why does this matter? Well, I usually have the most tabs open on my laptop. And, for whatever reason I haven't tracked down yet, this is also my least stable installation of Firefox. I deal with a few crashes each day, on average. My laptop also has a quirk dealing with its Wifi, often requiring me to powercycle the radio before it will connect. Thankfully, it's just a key press on my laptop. However, if I fail to realize I'm not connected before I launch Firefox, or if (as happened this last time) Firefox gets auto launched because it was open when my previous X11 session ended, then all my tabs come up unable to connect. Once this happens, I have to go connect to the net, then reload each tab by hand. If I don't, then they will be saved as blank tabs, and Firefox will forget what site was previously loaded in them. Once this happens, they are usually gone, because I obviously do not remember what I had loaded in 150 different tabs. In addition, many of the tabs have been open for weeks, or longer, so they will no longer be listed in my browser history.

So, today, when my laptop decided it wasn't going to resume from suspend anymore, but would instead hang on booting, I managed, through a serious of events, to have this happen. This is probably the tenth time or so I have lost my tabs. It really, really ticks me off. So I decided to see what I could do about it. Unfortunately, the answer is, if I had known what to do, and had been quick enough, I might have been able to save them. Maybe. Depends on how far gone they were once I got the rest of the system functioning again. (How does Gnome just forget you had a notification area on your taskbar?)

There is an API available, with something vaguely like what I would want, mentioned as a potential use case. However, my coding skills are infantile, and creating a program to utilize this would be way beyond me. I did, however, come up with a stop gap measure. I added an entry t o have logrotate copy the session saving information for me (which is updated routinely as Firefox runs). This means, in theory, that I will have snapshots from several days available, and hopefully anything added after the snapshot was taken will be recent enough to still be found in my history.

Yes, I do realize that the real solution is to change my habits, and stop leaving so many tabs open. However, this is my stopgap solution. Time will tell if it works or not. May I never need to use it.

My configuration entry for logrotate:

/home/madasi/.mozilla/firefox/8ryaickb.default/sessionstore.bak
/home/madasi/.mozilla/firefox/8ryaickb.default/sessionstore.js {
        rotate 7
        daily
        copy
        dateext
        compress
        missingok        

}

Saturday, September 15, 2007

Kiddo Quote

So, a while back, we had bought the kids a small treat of some kind, a snack size bag of cookies I think. So, on my day at home with them, I gave them each one, then closed the bag and set it down. So, several minutes later, my daughter walks into the room where I was folding some clothes, hands me the bag, and asks if she can have another one.

I pick the bag up, and being looking at the nutritional information on it. She asks me what it says, so I start reading some of it aloud. Things like serving size, calorie count, etc. She gets this very serious, disappointed sound in her voice, and says, "Oh, man."
"What?", I asked, "Do you know what any of that means?"
"It means I won't get any more."

So cute I almost cried.

Friday, September 14, 2007

Bug Affliction

A few weeks ago, I lost my swap space again, exactly like last time. Once again, a resume from hibernate failed after a routine fsck check ran. And once again, I missed the fact that my swap was gone until later when I noticed the computer failing to hibernate due to lack of swap space.

Since this was the second time it happened, I was sure that it wasn't due to an accidental run of mkswap. Not that I was doubting it after the first time, but you wonder if maybe some obscure option you hit in the GUI might have triggered it behind-the-scenes or something. This time, I was certain.

I was also thankful I blogged the instructions for fixing it the first time, as it save me a lot of research this go-round. Not that I didn't research it, I just did so after fixing it.

Thankfully, I didn't come up empty handed. I found Bug #90526: Routine fsck deactivates swap, changing UUID. Yep, that's it exactly officer. The clue this time was that I saw the fsck happen as my laptop booted, and realized that the last time seemed to be in close temporal proximity to a fsck as well. It's a confirmed bug, with no indication of a time frame for a fix. However, it's always nice to know that you aren't crazy, and that your issues have already been documented.