2

When you enter:

firefox -safe-mode

it restarts Firefox in "Safe Mode" with the whole add on/extensions or settings disabled. See Safe Mode

I would like to have a particular extension, ProCon Latte, for example, not to be disabled.

How do I do that by command line and which file to modify?

Edit : Already 5 years! In fact, a complementary module like procon latte blocks adult content. I did not want to be able to override the add on through the command linux firefox -safe-mode. Now, procon latte is not compatible with firefox quantium ( 58.0 ) Someone said that you have to change the bashrc and that was the best solution for now. I also put a DNS (of opendns).

4 Answers4

2

Unfortunately Firefox can't selectively enable pluggins from the command line, but to do it graphically follow these steps:

To run Firefox normally

To run firefox out of safe mode simply run firefox from the command line:

firefox

To selectively enable/disable plugins

To find all your installed plugins run firefox -url about:plugins fom the command line:

firefox -safe-mode -url about:plugins

Once you have done that you can manually enable/disable plugins with the GUI interface.
Goto Tools menu > Add-ons > Plugins
Then disable all and reable them one at a time to see which plugins are giving you problems

Morgoth
  • 1,883
  • 2
  • 22
  • 29
2

I may have a quick but dirty solution to your problem.

ProCon latte is an extension, which you can keep enabled in "private mode" but that may be easily disabled if you enter the "safe-mode". As I see it, the question is not about debugging a browser extension etc... it is simply about not allowing a content-filtering extension to be disabled: under no circumstances. Period.

Here is 'a way' of blocking the running of safe-mode, at least a zeroth order effort.

In ubuntu, the usual way to access firefox -safe-mode is through the command line. What I did based in discussions in this post: https://unix.stackexchange.com/questions/90998/block-particular-command-in-linux-for-specific-user was to block a user from running firefox from the command line at all :-) The same user can still open firefox by clicking in the side-bar or via the unity/gnome launcher... but always in 'normal'- proconlatte enabled mode :-)

Here is what I added to my ~./bashrc file:

/usr/bin/firefox() {
   echo "command not allowed for you"
}
firefox() {
   echo "command not allowed for you"
}

readonly -f /usr/bin/firefox
readonly -f firefox

Hope it helps! This guy's blog http://mike.kaply.com/2012/03/16/customizing-firefox-autoconfig-files/ and the extension CCK2 wizard should be the proper way to disabling "safe-mode" altogether, but it's a bit heavy to read/understand for me.

Cheers,

1

It is not clear what exactly you want to achieve and why you mention "Safe mode" but as it currently exists, you just cannot do what you want whether by command line or GUI. "Safe mode" is a debugging aid and not something meant for safer or more secure browsing.

However ...

  • you can make a second profile with firefox -P
  • install just the extension(s) you need
  • set all plugins to "Ask to activate" in Tools, Add-ons, Plugins
DK Bose
  • 44,553
1

It can depend on the extension. In the case of "ProCon Latte Content Filter" there is an easy solution (at least for the Mac version of Firefox v54).

First make sure that ProCon Latte's password option is enabled. Then make sure Firefox is not open.

Now, find the "prefs.js" file in your Firefox profile folder (e.g. /Users/yourname/Library/Application Support/Firefox/Profiles/yourprofile.default/prefs.js).

Open the file using TextEdit [make a backup first in case you make a mistake].

Find this section: {9D6218B8-03C7-4b91-AA43-680B305DD35C}.xpi\",\"multiprocessCompatible\":false,\"runInSafeMode\":false,\"

All you have to do is change the part that says "runInSafeMode\":false,\" into "runInSafeMode\":true,\"

Save the change.

When you start Firefox in Safe Mode, you will find that ProCon Latte is working, despite it claiming it is disabled in your Add-ons list.

Note: You might find it a good idea to make ProCon Latte a global extension (this will make it available to all Firefox users as well as any new profiles you create). Just move the file called "{9D6218B8-03C7-4b91-AA43-680B305DD35C}.xpi" in your profile's "extensions" folder to the Mozilla extensions folder (e.g. /Library/Application Support/Mozilla/Extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}). You will then have to redo the alteration of the "prefs.js" file. This alteration would also have to be done for each user and profile if you don't want them bypassing it in Safe Mode.

Also, if you have a very tech savvy kid trying to get around this content filtering - get an app like "invisibliX" so that you can turn Firefox's profiles and extensions folders invisible.

T2000
  • 11