Этот сайт имеет ограниченную функциональность, пока мы проводим техническое обслуживание для улучшения его работы. Если какая-либо статья не решила вашу проблему и вы хотите задать вопрос, наше сообщество поддержки ждёт вас: @FirefoxSupport в Твиттере и /r/firefox на Reddit.

Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

how do I lock preferences (i.e. javascript disabled & locked)

  • 4 ответа
  • 1 имеет эту проблему
  • 18 просмотров
  • Последний ответ от svanharen

more options

I upgraded from firefix4.0.1 to 7.0 (Solaris 10) I had the prefences locked by use of a config file (mozilla.cfg) and modifying the firefox.js in the omni.jar file I added these lines to the end of the file: // byte shift so mozilla.cfg works pref("general.config.obscure_value", 0); // Mozilla lockdown pref("general.config.filename", "mozilla.cfg");

This method does not work with firefox7.0, the browser doesn't launch when I modify firefox.js I need to have settings locked to prevent users from changing them in the field. Is there any documentation for how to do that?

I upgraded from firefix4.0.1 to 7.0 (Solaris 10) I had the prefences locked by use of a config file (mozilla.cfg) and modifying the firefox.js in the omni.jar file I added these lines to the end of the file: // byte shift so mozilla.cfg works pref("general.config.obscure_value", 0); // Mozilla lockdown pref("general.config.filename", "mozilla.cfg"); This method does not work with firefox7.0, the browser doesn't launch when I modify firefox.js I need to have settings locked to prevent users from changing them in the field. Is there any documentation for how to do that?

Выбранное решение

You must not modify the file omni.jar, but place the file local-settings.js in the defaults/pref directory in the Firefox program folder where you also find the channel-prefs.js file.

Прочитайте этот ответ в контексте 👍 0

Все ответы (4)

more options

There has never been any need to modify the file firefox.js

  • You can use a mozilla.cfg file in the Firefox program folder to lock prefs or specify default values.
  • Place a file local-settings.js in the defaults\pref folder to specify using mozilla.cfg.
pref("general.config.filename", "mozilla.cfg");
pref("general.config.obscure_value", 0); // disable the byte-shift

See:

You can use these functions in mozilla.cfg:

defaultPref();  // set new default value
pref();         // set pref, but allow changes in current session
lockPref();     // lock pref, disallow changes
more options

Not working. Perhaps I'm missing a step or have gone too far. Here's what I did: Firefox is installed in /opt/sfw/lib/firefox (solaris 10, I de/re-installed to ensure my previous attempts were purged) I opened the omni.jar file on a Windows machine w/ WinZip. I added a file: defaults/pref/local-settings.js; it contains two lines(I even tried reversing their order in the file):

pref("general.config.filename", "mozilla.cfg");

pref("general.config.obscure_value", 0);

I re-zipped (WinZip) the files & named it omni.jar & overwrote the original omni.jar (I created a backup, omni.jar.orig) I created /opt/sfw/lib/firefox/mozilla.cfg that contains two lines:

//

lockPref("javascript.enabled", false);


Did I screw up the instuctions or misplace one of those files? Syntax of the files? Offset value?

Thank you, Scott

Изменено svanharen

more options

Выбранное решение

You must not modify the file omni.jar, but place the file local-settings.js in the defaults/pref directory in the Firefox program folder where you also find the channel-prefs.js file.

more options

That was it. I restored my omin.jar.orig, moved the local-settings.js file into /opt/sfw/lib/firefox/defaults/pref and ta-da!!

You are a (insert diety name here)!

Thank you, Scott