Sunday, October 31, 2010

Ubuntu 10.10: Problems with Firefox 3.6.12

I had newly installed Ubuntu 10.10, preserving my /home folder from Ubuntu 10.04.  I was having some problems with Firefox.  This post describes the steps I took to resolve those problems.

One error was that, when I was first starting Firefox, I kept getting a message saying, "Firefox is not currently set as your default browser.  Would you like to make it your default browser?"  I kept saying Yes, and the box was checked to say "Always perform this check when starting Firefox."  This message would come back up each time I started Firefox.  This seemed to indicate that it was not remembering the answer I provided.  Next, after I said Yes to that, I got another error message:

The application "firefox-bin" attempted to change an aspect of your configuration that your system administrator or operating system vendor does not allow you to change.  Some of the settings you have selected may not take effect, or may not be restored next time you use the application.
This seemed to explain the recurrence of the first message, about the default browser.  Apparently something was set to read-only or to root privileges, when it should have been accessible to me as user.  Clicking on the Details button on that error message gave me lots of additional information:
Can't overwrite existing read-only value: Can't overwrite existing read-only value: Value for `/desktop/gnome/url-handlers/http/command' set in a read-only source at the front of your configuration path
Can't overwrite existing read-only value: Can't overwrite existing read-only value: Value for `/desktop/gnome/url-handlers/https/command' set in a read-only source at the front of your configuration path
No database available to save your configuration: Unable to store a value at key '/desktop/gnome/url-handlers/ftp/command', as the configuration server has no writable databases. There are some common causes of this problem: 1) your configuration path file /etc/gconf/2/path doesn't contain any databases or wasn't found 2) somehow we mistakenly created two gconfd processes 3) your operating system is misconfigured so NFS file locking doesn't work in your home directory or 4) your NFS client machine crashed and didn't properly notify the server on reboot that file locks should be dropped. If you have two gconfd processes (or had two at the time the second was launched), logging out, killing all copies of gconfd, and logging back in may help. If you have stale locks, remove ~/.gconf*/*lock. Perhaps the problem is that you attempted to use GConf from two machines at once, and ORBit still has its default configuration that prevents remote CORBA connections - put "ORBIIOPIPv4=1" in /etc/orbitrc. As always, check the user.* syslog for details on problems gconfd encountered. There can only be one gconfd per home directory, and it must own a lockfile in ~/.gconfd and also lockfiles in individual storage locations such as ~/.gconf
No database available to save your configuration: Unable to store a value at key '/desktop/gnome/url-handlers/chrome/command', as the configuration server has no writable databases. There are some common causes of this problem: 1) your configuration path file /etc/gconf/2/path doesn't contain any databases or wasn't found 2) somehow we mistakenly created two gconfd processes 3) your operating system is misconfigured so NFS file locking doesn't work in your home directory or 4) your NFS client machine crashed and didn't properly notify the server on reboot that file locks should be dropped. If you have two gconfd processes (or had two at the time the second was launched), logging out, killing all copies of gconfd, and logging back in may help. If you have stale locks, remove ~/.gconf*/*lock. Perhaps the problem is that you attempted to use GConf from two machines at once, and ORBit still has its default configuration that prevents remote CORBA connections - put "ORBIIOPIPv4=1" in /etc/orbitrc. As always, check the user.* syslog for details on problems gconfd encountered. There can only be one gconfd per home directory, and it must own a lockfile in ~/.gconfd and also lockfiles in individual storage locations such as ~/.gconf
My first search, focusing on the first of those error messages, turned up very little at all and nothing conclusive.  A different search did slightly better.  I went back to the original Firefox message and tried a search on that.  Bingo!  Lots of hits.  One thread led me to close Firefox and then try these commands:
killall firefox-bin
sudo chown -R ray:ray /home/ray
The first command got "No process found," which told me that there was not a separate Firefox process somehow lurking in the shadows (even after a reboot) and causing problems.  After the second command, I restarted Firefox, but nothing had changed; the same errors came up.  A different post drew my attention to the question of where the "/desktop/gnome/url-handlers/https/command" was located.  The command they used to find such locations was "sudo find / | grep /desktop/gnome/url-handlers."  I tried that.  It led me to /home/ray/.gconf, but nothing there ended with "https" or "https/command."  I checked that location in Nautilus (making sure to set View > Show Hidden Files) and verified that I was the owner.  The %gconf.xml file in that location that had caused problems for one Firefox user did not even refer to Firefox in my case, so I was confused.

Looking again at the error message, I thought that perhaps I was not understanding it, so I tried a different search.  The half-dozen webpages I opened did not lead to a solution.  It occurred to me to try killing many birds with one stone by uninstalling and reinstalling Firefox.  I had already done that, but the option I had chosen when uninstalling, in Synaptic, was "Mark for Removal."  This time, I tried "Mark for Complete Removal."  I noticed that this would take firefox-gnome-support along with it, and that seemed on target; in fact, I was tempted to remove just that package by itself.  But I went ahead with the complete removal and reinstallation of Firefox in Synaptic.  Interestingly, reinstallation did not automatically include firefox-gnome-support.  Possibly that was the issue:  dependence upon firefox-gnome-support had perhaps been eliminated in Ubuntu 10.10, and when I brought forward my /home directory from Ubuntu 10.04 at the time of upgrading to 10.10, I also inadvertently brought along this problem.  I started Firefox, and this time it was able to download updates for its add-ons -- which means, obviously, that it remembered its add-ons, so "completely" uninstalling Firefox apparently did not mean uninstalling add-ons.  I still got the same error messages as before, so reinstallation seemed to be helpful but not the ultimate solution.  I killed Firefox, ran Update Manager (which had no updates of obvious relevance), and restarted, but the errors persisted.

Following ideas in another thread, I tried "sudo firefox."  This gave me only the first question, about making Firefox my default browser; the other error messages were no longer there.  I killed Firefox and ran "sudo firefox" again.  This time, it remembered the answer; there were no questions or errors at all.  I killed Firefox and started it again from the panel icon (i.e., as a regular user).  This gave me a new error:
Session Manager
The session/window data is corrupted:
syntax error
undefined
I assumed that meant that the Session Manager add-on in Firefox was having a problem that had either existed before I ran "sudo firefox" or had been created when I did so.  I clicked OK on that error, and wondered whether part of the problem was in one or more of my add-ons.  Next, I got the question about making Firefox my default browser, and the other errors as well.  Using Session Manager, I loaded a backup session that was a month old.  I then killed and restarted Firefox.  The errors recurred.  I decided to try wiping out Firefox and all add-ons.  Following another post, I was detoured into this option:
sudo rm -rf .mozilla
firefox &
This was reminiscent of a command that I recalled fixing some other problem once.  That is, there had been a problem traceable to the .mozilla folder.  Removing that folder may have been risky if I had been using Thunderbird or other Mozilla programs in Ubuntu, but I wasn't.  So now I tried those commands.  They did not change anything, so I went on with these commands:
sudo apt-get remove --purge firefox
sudo updatedb
locate firefox
I realized, too late, that this was possibly not the best approach, since the "firefox &" command (above) had given me unending messages that this command was deprecated and no longer functional.  The "locate firefox" command gave me hundreds of responses.  But then I noticed that many of them related to just a few folders, so I tried this:
sudo rm -r /home/ray/.mozilla/firefox
sudo rm -r /usr/lib/firefox
sudo rm -r /usr/lib/firefox-addons

There were more references to Firefox yet to remove, but at this point I noticed the post telling me that completely removing all references to Firefox would create problems for other programs.  So now I went into Synaptic and looked at its status bar for broken packages.  There weren't any.  So either that post was no longer applicable or they weren't broken *yet*.  In Synaptic, I reinstalled Firefox.  Then, still in Synaptic, I went to Edit > Fix Broken Packages.  Its status bar immediately said, "Successfully fixed dependency problems."  So maybe I got lucky.  I started Firefox.  No error messages.  This time, there were no add-ons, so I had to install and configure those from scratch.  But the problem appeared to be solved.

0 comments: