Saturday, April 24, 2004

Fixing Netscape ($&#**^ Windows)

OK, most of my family uses a Windows XP machine. That's OK with me, it's their choice, and they like to do some things that Linux doesn't do well yet.

I have persuaded them that using IE and Outlook is a Bad Idea. Some of them use Mozilla Firefox for browsing, but they all use Netscape to read email.

The problem is that aperiodically Netscape just forgets that they've set up an account. All of the bookmarks are there, but the home page is lost. Worse, Netscape forgets all the information about the email account. The email is still there, but inaccessible by Netscape. This happens to other people, too. It doesn't seem to happen with Linux, at least it never happened to me. The problem seems to be that a file named prefs.js has been corrupted.

There are two possible fixes:

1) Close Netscape/Mozilla. Go to the directory

\Documents and Settings\UserName\Application Data\Mozilla\Profiles\default\somefunnything.slt

where UserName is the name of the account with the trashed files, and somefunnything.slt is an arbitrary name Netscape/Mozilla/Firefox gives the account. (They do this in Linux, too. I have no idea why.) By the way, you can look at this account through the Windows Explorer interface, but it's simpler if you use the Command Window. For one thing, some of these directories are hidden by default.

There should be a file prefs.js and another file prefs.bak. prefs.js is the one that's gone bad. If prefs.js and prefs.bak are different, copy prefs.bak to prefs.js. Restart Netscape/Mozilla. Your problem should be fixed. If not, go to 2):

2) If 1) didn't work, you're not completely hosed. Launch the Netscape/Mozilla Mail client and set up a new account. Open the Browser and set up your preferences as you like. If you are using Netscape remember to set your popup window preferences. Close all Netscape/Mozilla windows.

Now go to the \Documents and Settings\UserName\Application Data\Mozilla\Profiles\default\somefunnything.slt directory again. You'll find a new prefs.js and prefs.bak. They should be identical. Copy prefs.js to prefs.good.

In this directory there should be a subdirectory called Mail. Go there. There should be at least two subdirectories. One is named something like, and another is The second one will have a newer date than the first. If you do a directory listing, the first (which I'll call pop) will have files like Inbox, Inbox.msf, Sent, Sent.msf, etc., which correspond to the names of your mail folders. The second (pop-1) will have some of those files, but they'll be pretty empty. What you need to do is copy the Sent, Inbox, etc. files from pop to pop-1. I say copy rather than move, because that gives you an automatic backup. Don't copy the Sent.msf, Inbox.msf, etc. files. Those are headers, and Netscape will reestablish them later.

OK, now restart the Netscape Mailer. You may have to re-enter your password a couple of times, but you should have access to all your mail files.

What if this happens again?

Simple. First try step 1) above. If that doesn't work, remember that prefs.good file I told you to save. Simple delete the prefs.js and prefs.bak files, and copy prefs.good to prefs.js. If you changed any preferences after you created the prefs.good file you'll lose them, but you'll still have your email account information intact.