LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-20-2008, 04:19 PM   #1
sfxpt
Member
 
Registered: Feb 2008
Distribution: Debian Testing
Posts: 99
Blog Entries: 3

Rep: Reputation: 16
Install firefox extensions globally


Hi,

Does anyone here know how to install firefox extensions globally?

I.e., say for web_developer-1.0.2-fx+fl.xpi file, how can I install it somewhere in \usr or anywhere but my home folder?

E.g., say I have 10 users, and each of them install 10 extensions in their own home. Even if the 10 extensions are the same for everybody, I end up with 100 copies, instead of just 10.

Please comment.

thanks
 
Old 07-20-2008, 04:27 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Install them to
Code:
/usr/lib/firefox/plugins
and they will be globally available.
 
Old 07-20-2008, 06:03 PM   #3
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
I think the extensions should go in /usr/lib/firefox/extensions, and plugins in /usr/lib/firefox/plugins.
 
Old 07-20-2008, 08:00 PM   #4
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
The correct way to install Firefox extensions globally from the command line:

firefox -install-global-extension /path/to/extension.xpi

Notice there is only one preceding dash to the -install-global-extension option.

You need root privileges to execute the command.

When you execute the command there is no feedback. But start Firefox and check the Add-Ons list, the extension will be there.

The extension will be installed to /usr/lib/firefox/extensions. Of course, in Slackware, the /usr/lib/firefox path is sym linked to the actual Firefox installation directory (currently /usr/lib/firefox-2.0.0.16). When each user on the system next starts Firefox, Firefox will regenerate the three extension files in the user's profile directory.

To my knowledge there is no GUI way to install extensions globally.

Caveat: After globally installing the extension, check to ensure all files have 644 permissions. I have noticed that often the files are packaged by extension developers who do not understand file permissions. The result is the files will have 600 permissions. Without the 644 permissions, your normal mortal user accounts will not be able to run the extension. I suspect those same developers presume all extensions are installed only locally and they never test the permissions.

I install all of my Firefox extensions globally. All of my user accounts use the same extensions and I install only once.
 
Old 07-20-2008, 09:34 PM   #5
sfxpt
Member
 
Registered: Feb 2008
Distribution: Debian Testing
Posts: 99

Original Poster
Blog Entries: 3

Rep: Reputation: 16
Quote:
Originally Posted by Woodsman View Post
The correct way to install Firefox extensions globally from the command line:

firefox -install-global-extension /path/to/extension.xpi
Thanks for the reply Woodsman, this is actually the first time that I hear someone from the Linux world says that -install-global-extension works.

I tried it before and it didn't work for me:
http://forums.mozillazine.org/viewto...385622#2385622

According to the replies there, it might have something to do with the firefox version or which extension is being globally installed.

Could you post your positive experiences of firefox versions, and which extensions have you installed globally, and their versions please?

Thanks a lot.
 
Old 07-20-2008, 11:05 PM   #6
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
I've been using global extensions for a few years now. Once upon a time they would not work for me and I shared that experience:

Firefox and Global Extensions

I have not tried experimenting in this area in a long time. Although now I keep the DOM Inspector extension installed, I still refuse to install the talkback extension. I detest anything --- anything --- that evenly remotely smells of phone home regardless of intentions. I no longer have issues with installing extensions despite the absence of the talkback extension. However, I have not tried to perform a full clean install in a long time. I've had the same Firefox profile for several years now. Perhaps the old problem was fixed along the way, perhaps the problem was related only to the DOM Inspector extension, perhaps the problem remains. I don't know. Understand that the original essay was written back in the days of Firefox 1.5.x.

In that essay I mentioned the permissions problem. I suspect most GNU/Linux users do not delete the default Firefox extensions (DOM Inspector, Talkback), but the permissions issue is overlooked by many people. The problem does not occur in Windows because most users have full administrative permissions there, even when they install extensions globally. I suspect this is why some people report no problems with global extensions and some do --- different operating systems and different file permissions. I installed all my extensions globally in my NT4 box for many years and never had a problem. When I started using Slackware more often a few years ago and tried the same thing I discovered some of these quirks.

Another caveat is that many extensions remain compatible with each minor Firefox release but they get disabled easily. I hate developers who try to outguess me and protect me from myself. I wish they'd leave the extensions alone but no, they don't. There is a prefs.js setting to disable compatibility checking (extensions.checkCompatibility) and I have that set to false these days. The important trick is to edit each extension's install.rdf file and change the <em:maxVersion> directive to 2.0+ or 2.0.0.*.

But even that is insufficient. After editing the install.rdf, the profile extension.rdf file might contain a Disabled directive for an extension if compatibility checking is enabled. Delete that directive otherwise the extension will not work.

Yet that still might not prevent an extension from loading properly. These days when I update Firefox, before I start the new version, I manually edit my user.js file to the new version at both extensions.lastAppVersion and browser.startup.homepage_override.mstone. If the former option is set to the previous version of Firefox, then even if extensions.checkCompatibility is set to false, Firefox will immediately check all extensions and disable them. The 2.0+ and 2.0.0.* install.rdf trick in install.rdf will avoid problems, although the pompous automatic checking is frustrating. If the mstone version is incorrect, Firefox immediately pompously connects to the Mozilla home page.

The NoScript extension --- valuable in every way, is another self-minded example in that if the version number in prefs.js is different from the actual version, the extension automatically phones home and downloads the NoScript home page. So when I update that extension I again manually edit my user.js file (noscript.version) before starting Firefox.

Currently I'm running 2.0.0.16 with all extensions installed globally. I have the following installed:

Diggler
FirstField
JavaScript Options
MIME Edit
NoScript
Open In Browser
Paste and Go
Prefbar
Read Easily
Searchbar AutoClear
TabMix Plus
Text Link
Zoomy

The most recently added extension was the videodownloader and guess what? After I installed the extension my normal user account could not use the extension. The default permissions were 400 rather than 644. So do check all the extension file permissions.

But somewhere along the updating from 2.0.0.14 to 2.0.0.15 or 2.0.0.16, videodownloader stopped working.

The nonsense continues in other ways. After I updated from 2.0.0.14 to 2.0.0.15, the prefbar extension stopped working. Although I had been using version 3.3.4 for a long time, I was forced to update that extension to version 4.1.1. I tend not to update extensions based loosely upon the old adage that if it ain't broke don't fix it.

I empathize with your situation. In certain ways, Firefox is a nightmare to maintain.

I hope some of this information helps.
 
Old 07-21-2008, 04:56 PM   #7
sfxpt
Member
 
Registered: Feb 2008
Distribution: Debian Testing
Posts: 99

Original Poster
Blog Entries: 3

Rep: Reputation: 16
Thanks a lot Woodsman for the comprehensive explanation.

Quote:
Originally Posted by Woodsman View Post
. . . In certain ways, Firefox is a nightmare to maintain.

I hope some of this information helps.
Definitely! every word helps to guide me to wade through trouble.

thanks!
 
Old 08-29-2008, 02:59 PM   #8
sfxpt
Member
 
Registered: Feb 2008
Distribution: Debian Testing
Posts: 99

Original Poster
Blog Entries: 3

Rep: Reputation: 16
Hacky solution: Install firefox extensions globally

Quote:
Originally Posted by sfxpt View Post
I tried it before and it didn't work for me:
http://forums.mozillazine.org/viewto...385622#2385622
I tried again, and still doesn't work for me:

Code:
strace -f -eopen,iopl -o /tmp/fe.inst.log firefox -install-global-extension /path/to/web_developer-1.0.2-fx+fl.xpi
strace -f -eopen,iopl -o /tmp/fe.inst.log firefox -install-global-extension /path/to/flashblock-1.5.6-fx.xpi
The results are the same, nothing get installed:

Code:
$ grep -i 'flash' /tmp/fe.inst.log

$ grep '/extensions' /tmp/fe.inst.log
21982 open("/root/.mozilla/firefox/mlrys852.default/extensions.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
21982 open("/root/.mozilla/firefox/mlrys852.default/extensions.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
21982 open("/root/.mozilla/firefox/mlrys852.default/extensions.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
21982 open("/root/.mozilla/firefox/mlrys852.default/extensions.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
21982 open("/root/.mozilla/firefox/mlrys852.default/extensions.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
21982 open("/usr/lib/iceweasel/components/extensions.xpt", O_RDONLY|O_LARGEFILE) = 12
21982 open("/root/.mozilla/firefox/mlrys852.default/extensions.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
I did it under Debian. Maybe my Debian is different from slackware.

The problem has annoyed me for many years, so I am determined to solve it, and here is the total manual solution:

Note I'm doing it under Debian, in which firefox is called iceweasel. Just replace all iceweasel with firefox for all distros other than debian:

Code:
% umask 
0022

# firefox extension name
fenm=flashblock

cd /usr/share/iceweasel-extensions/
mkdir $fenm

cd $fenm
unzip /path/to/flashblock-1.5.6-fx.xpi
sed -n '/em:id>{/{p; q;}' install.rdf  | awk -F'[><]' '{print $3}'

# firefox extension id
feid=`!!`
ln -vs ../../../share/iceweasel-extensions/$fenm /usr/lib/iceweasel/extensions/$feid
ls -l !$
That's it. Test works fine.

HTH

xpt

Last edited by sfxpt; 09-13-2008 at 12:10 PM.
 
Old 09-08-2008, 12:09 PM   #9
El Nigromante
Member
 
Registered: Aug 2008
Distribution: Slackware 12.2, Slackware 13.0
Posts: 40

Rep: Reputation: 17
Installing firefox global extensions [SOLVED]

Hello, here I explain the method to globally install a firefox extension in Slackware 12.1 (firefox 2.0.0.16). I think this is the same as stated in the post above (may be in a simpler way):

First, you must create a directory for the extension in /usr/lib/firefox/extensions/ . The name of the directory must be the extension's ID. You can find the ID in the install.rdf file which comes inside the extension's .xpi file.

Then you unzip the contents of the extension's .xpi file into that directory.

After you have done this, restart firefox and the extension will become available.

You can find the original explanation here: http://developer.mozilla.org/en/Installing_extensions


For an example: Installing "quick locale switcher" extension.

- Become root.

- The extension file (downloaded) is: quick_locale_switcher-1.6.5.9-fx+mz+tb+sb+sm.xpi

- The extension's ID is:

{25A1388B-6B18-46c3-BEBA-A81915D0DE8F}

You have it here (install.rdf):

Code:
<?xml version="1.0"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
	<em:id>{25A1388B-6B18-46c3-BEBA-A81915D0DE8F}</em:id>
	<em:name>Quick Locale Switcher</em:name>
	<em:version>1.6.5.9</em:version>
	<em:description>Quickly change the general.useragent.locale preference.</em:description>
	<em:creator>Martijn Kooij</em:creator>
	<em:homepageURL>http://www.captaincaveman.nl</em:homepageURL>
	<em:optionsURL>chrome://qls/content/qlssettings.xul</em:optionsURL>
	<em:iconURL>chrome://qls/skin/qls_32x32.png</em:iconURL>

(...)
- Thus, create the directory:

/usr/lib/firefox/extensions/{25A1388B-6B18-46c3-BEBA-A81915D0DE8F}/

- Now unzip the extension's contents:

Code:
unzip quick_locale_switcher-1.6.5.9-fx+mz+tb+sb+sm.xpi -d /usr/lib/firefox/extensions/{25A1388B-6B18-46c3-BEBA-A81915D0DE8F}/
- Restart firefox with your normal account ...and you have it.

Hope this helps.

Last edited by El Nigromante; 09-08-2008 at 03:05 PM.
 
Old 09-12-2008, 06:08 PM   #10
sfxpt
Member
 
Registered: Feb 2008
Distribution: Debian Testing
Posts: 99

Original Poster
Blog Entries: 3

Rep: Reputation: 16
Thanks a lot for sharing, El Nigromante.

Yes, our approaches are exactly the same. Just Debian has a more rigid rule of where things should be put. Thus it has more steps than in Slackware.

Last edited by sfxpt; 09-12-2008 at 09:18 PM.
 
Old 09-13-2008, 05:07 AM   #11
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
Originally Posted by sfxpt View Post
Just Debian has a more rigid rule of where things should be put. Thus it has more steps than in Slackware.
I wonder why you asked your question in the Slackware forum then, if your intention was to use the information in Debian.

Eric
 
Old 09-13-2008, 05:46 AM   #12
El Nigromante
Member
 
Registered: Aug 2008
Distribution: Slackware 12.2, Slackware 13.0
Posts: 40

Rep: Reputation: 17
Quote:
Originally Posted by Alien Bob View Post
I wonder why you asked your question in the Slackware forum then, if your intention was to use the information in Debian.
May be he was aware of the friendliness and expertise Slackware users are supposed to share
 
Old 09-13-2008, 12:13 PM   #13
sfxpt
Member
 
Registered: Feb 2008
Distribution: Debian Testing
Posts: 99

Original Poster
Blog Entries: 3

Rep: Reputation: 16
Excatly, El Nigromante!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot install extensions in firefox ! wearetheborg Linux - Software 1 09-17-2006 10:55 AM
Cannot install Firefox Extensions adam-red Linux - Software 3 04-26-2006 04:32 PM
can't install extensions for firefox 1.5 mohtasham1983 Linux - General 4 04-01-2006 02:45 PM
firefox won't install extensions carloscuderia Linux - Software 1 04-21-2005 05:04 AM
How to install Firefox 9.1 Globally? rignes Linux - Software 8 07-25-2004 12:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration