Two things bug me about Firefox that aren’t easily fixable at first glance.
* Recover From Crash: while some may like the feature that, if Firefox crashes, you can recover their session or start a new one by answering a dialog that pops up when you restart it, I find it annoying. So I finally found a setting from a Firefox site to disable it. Open about:config and right-click the listing. Choose New->Boolean. Type in browser.sessionstore.resume_from_crash, and set it to false. No more annoying dialog after crashing.
* Crappy new GTK file selection dialog: Actually this is a universal hatred since GTK changed their file dialog for saving/opening files a while back from a simple dropdown / filebox / file-or-path entry field dialog to some overly complicated dialog where you can’t even type a path in directly without the dialog loading the entire contents of that path into memory, annoying when you want to, say, select a program to open a downloaded file in and you choose /usr/bin, which contains tons of programs, of course.
Fortunately I found a fix for this long ago — for Firefox, at least — and have posted it on blogs and sites several times, but I believe it’s the first time I’ve posted it here. It does involve a hack of Firefox’s install files, so no simple about:config hacking here.
Go to where Firefox is installed (on my system, it’s /usr/lib/firefox) and enter the components subdirectory. (Note: Of course, if it’s outside of your home directory, you have to do this as root, so be careful.) Inside is a file called nsFilePicker.js. Make a backup of it. Open it, and scroll down to around line 275; you’ll see something that looks similar to the following:
compMgr.registerFactoryLocation(FILEPICKER_CID,
"FilePicker JS Component",
//@line 278 "/hdb4/build-directory/swiftfox-rel/mozilla/xpfe/components/filepicker/src/nsFilePicker.js.in"
"",
//@line 280 "/hdb4/build-directory/swiftfox-rel/mozilla/xpfe/components/filepicker/src/nsFilePicker.js.in"
fileSpec,
location,
type);
(Note: the paths after the “//@line 278″ and “//@line 280″ parts will most likely be different; note also that I’m doing this from Swiftfox, a Firefox derivative, thus the reference to “swiftfox” in the code, but the method is the same. Spacing may also be different; usually, all the lines are centered.)
We are interested in the line between “//@line 278″ and “//@line 280″:
"",
Change this to:
FILEPICKER_CONTRACTID,
Note the comma at the end of the line, so we’re basically only replacing the empty double-quotes.
Now save this file and run Firefox. We’re not done yet, though; Firefox doesn’t detect a change in this file automatically. To force it to read it, go to Tools->AddOns and click Disable on any installed add-on (go install an add-on if you have none installed; installing a new add-on is sufficient to force reading our change). Close and restart Firefox, go back to the Addons, and re-Enable the add-on. Restart again for good measure.
Now any Open or Save dialog will be the classic GTK dialog and not the newer, uglier one. If something goes wrong, copy the old nsFilePicker.js back (you may have to do a disable/enable on an add-on again) and try again.
Enjoy.