-   Slackware (
-   -   Firefox and Global Extensions (

Woodsman 09-23-2006 11:05 PM

Firefox and Global Extensions
Any Slackers here using Firefox 1.5.x and have had success installing extensions globally using the -install-global-extension option?

I'm using Slackware 10.2, KDE 3.4.3, FF

I have successfully installed the Slackware FF package. No issues.

As root I can install extensions globally, the extensions appear in the user's extensions dialog box, but the extensions do not work. The global extensions work fine for root.

After diffing the various configuration files between root's FF profile and a user's FF profile, I had to modify several of the user's files before the global extension would appear in the extensions dialog box, but the extensions still won't work.

I can install extensions locally in the user's profile and they appear and work fine.

I have several user accounts and cannot fathom having to install some two dozen extensions manually for each account.

I don't know if this is a FF or Slackware issue. Any help is appreciated!

jong357 09-24-2006 09:41 AM

I only use FireFTP so I don't have alot of expierence with extensions but this is what I do. I build firefox from source but install my extension from within the build script into /usr/lib/firefox-$VERSION/extensions/.. Because, as you say, it would quickly get out of hand if you used multiple extensions with multiple users. Global seemed the most proper way to handle extensions...

I keep the .xpi in my source build dir and unzip it to the above mentioned directory. It has a screwy directory name of {a7c6cf7f-112c-4500-a7ea-39801a327e5f} that goes in "extensions". You should just be able to cut that similar directory name out of your users profile folder and paste it into /usr/lib/firefox/extensions...

Atleast that works for me with FireFTP... This method will be problematic when you start upgrading firefox versions tho. That's one of the benifits of doing this from within the build script, besides having it available to all users.

Woodsman 09-28-2006 01:32 AM

For future visitors to this thread, or anybody who gives a hoot, :) I solved my original problem of being unable to install Firefox extensions globally.

I installed FF using the Slackware package. No issues. I tested FF and all was well---although the basic program needed a lot of tweaking for my tastes. Considering that GNU/Linux is a multi-user environment, and I use GNU/Linux in that manner, I began installing extensions using the -install-global-extension option. No issues.

Testing the extensions as root presented no problems.

Toggling to my normal user account, I could run FF just fine but the extensions failed to load.

I discovered one reason why. While configuring and tweaking FF as root, I purposely deleted the DOM Inspector and Talkback extensions. (I use the word purposely so all the don't-use-root priests stay away :)) These extensions provide no value to me and never have. I deleted the extensions (from within FF) because with the Windows version of FF, the installation script provides users the option to install FF without installing those extensions. I assumed I could do likewise in GNU/Linux. Not so! I had to reinstall those extensions (easily done using the explodepkg tool).

After I restored those two extensions, I then could start FF as normal user and watch FF build the user extensions files (extensions.rdf, extensions.ini, and extensions.cache.) Remove those two extensions and the process stalls.

Interestingly, after FF builds the user files, I can remove those two extensions and FF does not miss a beat after I install additional global extensions. I'm no expert on the specifics of the FF files and formats, but something exists that seems to require those two extensions for the initial installation. I do not pretend to know if this is a FF issue or the way in which PV packages FF. Regardless, thereafter those extensions need not exist and I installed three or four additional extensions after initializing my normal user account.

I won't pretend to know all of the quirks with this initializing and loading process. There certainly could be a flaw in my testing and resolution---I don't know. I am only reporting what I saw. Because in Windows users essentially run as root all the time, installing extensions globally there probably is not a reasonable comparison or test. Possibly if I were to configure my Windows box to be as restrictive I might see similar results, but I do not possess the energy to know.

But the mystery deepens.

I noticed that even after I was able to get FF to run as normal user, several extensions simply refused to load. About half the extensions loaded and half did not. A real head scratcher and then the proverbial light bulb went on. Any time something works as root but not as normal user, I begin to inspect file permissions. I noticed that of the extensions that refused to load for normal user, that the extension was not packaged with appropriate internal file permissions. For example, in several of those extensions, the critical install.rdf file was stamped with 400 permissions. Of course, root could see those files and the extensions would load, but not for any other user. My SWAG is the developers of these particular extensions never tested their xpi install scripts globally. That is, they tested only by installing the extensions locally into the user's directory. An additional guess is these developers probably are Windows users---(basically) a single-user environment where file permissions play no significant role. So there is evidence here of some lack-luster quality control and some conceptual misunderstandings by these developers. :( By modifying the file persmissions to 744 for all files (not directories, just files) in the extensions directory, my normal user account no longer had a problem loading those extensions.

And the mystery deepens. :(

Firefox-GTK seems to often ignore the user.js configuration file. Several times I modified that file, and when loading, FF is supposed to absorb those personal mods on-the-fly into the prefs.js file. This is not the case. I cannot repeat the results in any dependable manner, but I observed that sometimes FF fails to load the user.js file. Very frustrating because when I customize FF, I copy changes from prefs.js to user.js in order to make those mods permanent. I have been doing this going way back to the Netscape 4.0x days. With my Slackware boxes, I then replicate that user.js file to my normal user accounts (and yes, I ensure that file permissions are correct after copying). The idea is I should be able to modify the user.js file and FF automatically should be updated and tweaked. No so and I have no answer why. I do not have this problem in Firefox-Windows.

Long term solution?

1. Install FF.
2. Globally install all desired extensions (requires root privileges).
3. Within the extensions directory, (in Slack that is /usr/lib/firefox-, chmod all files to at least 744 permissions.
4. As root, test, tweak, and customize to suit personal preferences and tastes. (This process requires a lot of time and patience---do not be hasty.)
5. After a day or two of being satisfied with the FF configuration (as root), log in as normal user and run FF. All extensions should load just fine and everything should be tweaked.
6. Exit FF.
7. Copy root's updated user.js file to the normal user account. Copy any specific user extension files too. Copy localstore.rdf too, which contains the toolbar customizations.
8. Again run FF as normal user.
9. If desired, as root delete the DOM Inspector and Talkback extensions.
10. As normal user, again run FF and exit, simply to update the user config files.
11. As root, save this normal user configuration. The /etc/skel directory is a good location.
12. For all subsequent users, simply copy the preserved configuration because FF will not initialize the global extensions if the DOM Inspector and Talkback extensions are missing.
13. Consider using a different browser.

Firefox-Windows is an acceptable program, although the XUL interface is sluggish. Contrarily, I cannot recommend Firefox-GTK with any seriousness. As I surfed the web searching for help with this issue, I noticed many people struggling with installing extensions globally. By design, GNU/Linux is a multi-user OS and installing extensions globally should be routine and second nature. As an old friend often said to me, "This stuff is not ready for prime time."

Anyway, I hope this thread helps future visitors resolve how to globally install Firefox extensions!

All times are GMT -5. The time now is 03:29 AM.