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 188.8.131.52 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
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
After I restored those two extensions, I then could start FF as normal user and watch FF build the user extensions files (extensions.rdf
, 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
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-184.108.40.206/extensions
all files to at least 744
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
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
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!