A bug requesting Firefox Password Manager integration with the GNOME Keyring was submitted back in 2005 and unfortunately it still hasn't been fixed.

Since it doesn't look like this is going to be fixed anytime soon, a Firefox extension has been created which allows storing the passwords in GNOME Keyring.

But unfortunately there are a few issues with Firefox GNOME Keyring extension:

password sync doesn't work properly

there's no way to migrate your old passwords so once you start using the extension, you'll have to re-enter the passwords and save them again. Also, the old passwords remain untouched so if you don't want them to be available in the Firefox Password Manager you must manually remove them before installing the extension

if you set a master password, when you click on preferences > security > saved passwords > show passwords you still get asked for it, even if GNOME Keyring is active

GNOME Keyring extension was recently updated and works with Firefox 3.6.x, 4.0 and 5.0 as well as Thunderbird (I've only tested it with Thunderbird 5.0 but it probably works with older versions too).

To install the GNOME Keyring extension in Firefox or Thunderbird, download it (.xpi link below) to your computer, then open the Firefox / Thunderbird Add-ons Manager and simply drag'n'drop the .xpi file to it and you should be prompted to install the addon.

After you restart Firefox, you should be asked to enter a password for the new Mozilla keyring (if you've set Firefox to remember your passwords) - enter your computer login password or else you'll probably be prompted to enter a password when you start Firefox.