X
Nhấn vào đây để đến phiên bản di động của trang web.

Diễn đàn trợ giúp

Hii, Can we lock a network preferance in firefox 38.01 or higher version, if then how?

Được đăng

I want global config file of firefox which control all the available vesion of my firefox and it also lock my network preferance so that no other user can make changes in it.

Thanks in advance Shilpa

I want global config file of firefox which control all the available vesion of my firefox and it also lock my network preferance so that no other user can make changes in it. Thanks in advance Shilpa

Giải pháp được chọn

the mozilla.cfg file should be placed in the same folder as the firefox executable, so in /opt/firefox/ in your case.

Đọc câu trả lời này trong ngữ cảnh 1

Chi tiết hệ thống bổ sung

Phần bổ trợ đã cài đặt

  • DivX Web Player version 1.4.0.233
  • The IcedTea-Web Plugin executes Java applets.
  • The Videos 3.10.1 plugin handles video and audio streams.
  • Shockwave Flash 11.2 r202

Ứng dụng

  • Firefox 38.0.1
  • Chuỗi đại diện người dùng: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0
  • URL hỗ trợ: https://support.mozilla.org/1/firefox/38.0.1/Linux/en-US/

Tiện ích mở rộng

Javascript

  • incrementalGCEnabled: True

Đồ họa

  • adapterDescription: Intel Open Source Technology Center -- Mesa DRI Intel(R) Ivybridge Desktop x86/MMX/SSE2
  • adapterDeviceID: Mesa DRI Intel(R) Ivybridge Desktop x86/MMX/SSE2
  • adapterDrivers:
  • adapterRAM:
  • adapterVendorID: Intel Open Source Technology Center
  • driverDate:
  • driverVersion: 3.0 Mesa 10.1.3
  • info: {u'AzureCanvasBackend': u'cairo', u'AzureFallbackCanvasBackend': u'none', u'AzureContentBackend': u'cairo', u'AzureSkiaAccelerated': 0}
  • numAcceleratedWindows: 0
  • numAcceleratedWindowsMessage: [u'']
  • numTotalWindows: 1
  • webglRenderer: Intel Open Source Technology Center -- Mesa DRI Intel(R) Ivybridge Desktop x86/MMX/SSE2
  • windowLayerManagerRemote: False
  • windowLayerManagerType: Basic

Thay đổi cài đặt

Linh tinh

  • Người dùng JS: Không
  • Có thể tiếp cận: Không
philipp
  • Top 25 Contributor
  • Moderator
5306 giải pháp 23424 câu trả lời
Được đăng

hi Shilpa, for locking preferences, please refer to the method described in http://kb.mozillazine.org/Locking_preferences

hi Shilpa, for locking preferences, please refer to the method described in http://kb.mozillazine.org/Locking_preferences

Người tạo câu hỏi

shilpa123 said

I want global config file of firefox which control all the available vesion of my firefox and it also lock my network preferance so that no other user can make changes in it. Thanks in advance Shilpa

Hiii Thanks for reply But this not solve my problem I have Linux mint 17.1 Rebecca, in that default Firefox version 33 is there for that my below config file work perfectly for locking and changing a preferences. I have did changes in vendor-Firefox.js and Firefox.js file

Config file: lockPref("browser.startup.homepage", " "); lockPref("browser.startup.homepage_override", true); lockPref("pref.browser.homepage.disable_button.current_page", true); lockPref("pref.browser.homepage.disable_button.restore_default", true); lockPref("pref.browser.homepage.disable_button.bookmark_page", true); lockPref("network.proxy.type", 1); //lockPref("app.update.auto", false); //disable automatic update //lockPref("app.update.enabled", false); //disable updating Firefox //lockPref("browser.bookmarks.restore_default_bookmarks", false); //lockPref("pref.privacy.disable_button.view_passwords", false); //lockPref("network.proxy.backup.ftp", ""); //lockPref("network.proxy.backup.ftp_port", 0); //lockPref("network.proxy.backup.socks", ""); //lockPref("network.proxy.backup.socks_port", 0); //lockPref("network.proxy.backup.ssl", ""); //lockPref("network.proxy.backup.ssl_port", 0); lockPref("network.proxy.ftp", "172.16.1.71"); lockPref("network.proxy.ftp_port", 3128); lockPref("network.proxy.http", "172.16.1.71"); lockPref("network.proxy.http_port", 3128); lockPref("network.proxy.no_proxies_on", "localhost, 127.0.0.1,172.16.1.0/24"); lockPref("network.proxy.share_proxy_settings", true); lockPref("network.proxy.socks", "172.16.1.71"); lockPref("network.proxy.socks_port", 3128); lockPref("network.proxy.ssl", "172.16.1.71"); lockPref("network.proxy.ssl_port", 3128);


But when I install 38 or 39 version of this file changes wont get affected.

''shilpa123 [[#question-1075069|said]]'' <blockquote> I want global config file of firefox which control all the available vesion of my firefox and it also lock my network preferance so that no other user can make changes in it. Thanks in advance Shilpa </blockquote> Hiii Thanks for reply But this not solve my problem I have Linux mint 17.1 Rebecca, in that default Firefox version 33 is there for that my below config file work perfectly for locking and changing a preferences. I have did changes in vendor-Firefox.js and Firefox.js file Config file: lockPref("browser.startup.homepage", " "); lockPref("browser.startup.homepage_override", true); lockPref("pref.browser.homepage.disable_button.current_page", true); lockPref("pref.browser.homepage.disable_button.restore_default", true); lockPref("pref.browser.homepage.disable_button.bookmark_page", true); lockPref("network.proxy.type", 1); //lockPref("app.update.auto", false); //disable automatic update //lockPref("app.update.enabled", false); //disable updating Firefox //lockPref("browser.bookmarks.restore_default_bookmarks", false); //lockPref("pref.privacy.disable_button.view_passwords", false); //lockPref("network.proxy.backup.ftp", ""); //lockPref("network.proxy.backup.ftp_port", 0); //lockPref("network.proxy.backup.socks", ""); //lockPref("network.proxy.backup.socks_port", 0); //lockPref("network.proxy.backup.ssl", ""); //lockPref("network.proxy.backup.ssl_port", 0); lockPref("network.proxy.ftp", "172.16.1.71"); lockPref("network.proxy.ftp_port", 3128); lockPref("network.proxy.http", "172.16.1.71"); lockPref("network.proxy.http_port", 3128); lockPref("network.proxy.no_proxies_on", "localhost, 127.0.0.1,172.16.1.0/24"); lockPref("network.proxy.share_proxy_settings", true); lockPref("network.proxy.socks", "172.16.1.71"); lockPref("network.proxy.socks_port", 3128); lockPref("network.proxy.ssl", "172.16.1.71"); lockPref("network.proxy.ssl_port", 3128); But when I install 38 or 39 version of this file changes wont get affected.

Người tạo câu hỏi

philipp said

hi Shilpa, for locking preferences, please refer to the method described in http://kb.mozillazine.org/Locking_preferences

When I user just a pref option in channel-pref.js or pref.js file it work perfect for firefox 38.01 but with lock-pref option it does not change anything.

''philipp [[#answer-761335|said]]'' <blockquote> hi Shilpa, for locking preferences, please refer to the method described in http://kb.mozillazine.org/Locking_preferences </blockquote> When I user just a pref option in channel-pref.js or pref.js file it work perfect for firefox 38.01 but with lock-pref option it does not change anything.
philipp
  • Top 25 Contributor
  • Moderator
5306 giải pháp 23424 câu trả lời
Được đăng

you have a .cfg file locking the preferences and a .js file which is used to load the cfg file - where is that .js file located in your case?

you have a .cfg file locking the preferences and a .js file which is used to load the cfg file - where is that .js file located in your case?

Người tạo câu hỏi

Nop But I have tried to make a file where channel-prefs.js get created and try to load it from prefs.js but it give me error that is wont be able to load a mozilla.cfg file but here my confussion is I have many prefs.js file i.e. in /etc/skel and in /opt also so in which exact file I have to load a my mozilla.cfg file without any error.

Nop But I have tried to make a file where channel-prefs.js get created and try to load it from prefs.js but it give me error that is wont be able to load a mozilla.cfg file but here my confussion is I have many prefs.js file i.e. in /etc/skel and in /opt also so in which exact file I have to load a my mozilla.cfg file without any error.
philipp
  • Top 25 Contributor
  • Moderator
5306 giải pháp 23424 câu trả lời
Được đăng

Câu trả lời hữu ích

probably the error is in the mozilla.cfg file - can you make sure that it's saved ANSI character encoded....

probably the error is in the mozilla.cfg file - can you make sure that it's saved ANSI character encoded....

Người tạo câu hỏi

sorry but how to do it.....

sorry but how to do it.....
philipp
  • Top 25 Contributor
  • Moderator
5306 giải pháp 23424 câu trả lời
Được đăng

you can set the encoding in a text editor like notepad++

you can set the encoding in a text editor like notepad++
cor-el
  • Top 10 Contributor
  • Moderator
17475 giải pháp 157948 câu trả lời
Được đăng

Câu trả lời hữu ích

Did you create a mozilla.cfg file in the Firefox program folder?

Can you post the content of the mozilla.cfg file?

The mozilla.cfg file should start with a comment line (//) because this first line is skipped for security reasons.

Did you create a mozilla.cfg file in the Firefox program folder? Can you post the content of the mozilla.cfg file? The mozilla.cfg file should start with a comment line (//) because this first line is skipped for security reasons.

Người tạo câu hỏi

I have create a mozilla.cfg in /etc/skel/.mozilla/firefox/mwad0hks.default and a when I fire a command file mozzilla.cfg o/p is: file mozilla.cfg mozilla.cfg: ASCII text

My mozilla.cfg is:

// lockPref("network.proxy.type", 1);


And I have called a mozilla.cfg in channel-prefs.js file Its content is:

/* This Source Code Form is subject to the terms of the Mozilla Public

* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

pref("app.update.channel", "release"); pref("general.config.filename", "mozilla.cfg");


My channel-prefs.js file is in: /opt/firefox/defaults/pref

when I give command file channel-prefs.js its o/p is:

file channel-prefs.js channel-prefs.js: ASCII text


But it give me error that File can not be get read.

I have create a mozilla.cfg in /etc/skel/.mozilla/firefox/mwad0hks.default and a when I fire a command file mozzilla.cfg o/p is: file mozilla.cfg mozilla.cfg: ASCII text My mozilla.cfg is: // lockPref("network.proxy.type", 1); And I have called a mozilla.cfg in channel-prefs.js file Its content is: /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ pref("app.update.channel", "release"); pref("general.config.filename", "mozilla.cfg"); My channel-prefs.js file is in: /opt/firefox/defaults/pref when I give command file channel-prefs.js its o/p is: file channel-prefs.js channel-prefs.js: ASCII text But it give me error that File can not be get read.
philipp
  • Top 25 Contributor
  • Moderator
5306 giải pháp 23424 câu trả lời
Được đăng

Giải pháp được chọn

the mozilla.cfg file should be placed in the same folder as the firefox executable, so in /opt/firefox/ in your case.

the mozilla.cfg file should be placed in the same folder as the firefox executable, so in /opt/firefox/ in your case.

Người tạo câu hỏi

Hiii

I have move mozilla.cfg file /opt/firefox folder and file reading error has gone but still it is not locking my network-proxy-type option.


Plz Help!!!

Hiii I have move mozilla.cfg file /opt/firefox folder and file reading error has gone but still it is not locking my network-proxy-type option. Plz Help!!!

Người tạo câu hỏi

Hiii

I add a following code in mozilla.cfg lockPref("browser.startup.homepage", " "); lockPref("browser.startup.homepage_override", true); lockPref("pref.browser.homepage.disable_button.current_page", true); lockPref("pref.browser.homepage.disable_button.restore_default", true); lockPref("pref.browser.homepage.disable_button.bookmark_page", true); lockPref("network.proxy.type", 1);


and in channel-prefs.js and its o/p is: pref("app.update.channel", "release"); pref("general.config.filename", "mozilla.cfg"); pref("pref.browser.homepage.disable_button.current_page", true); pref("pref.browser.homepage.disable_button.restore_default", true); pref("pref.browser.homepage.disable_button.bookmark_page", true);

by this only current page button get lock not other bookmark and restore tab

Hiii I add a following code in mozilla.cfg lockPref("browser.startup.homepage", " "); lockPref("browser.startup.homepage_override", true); lockPref("pref.browser.homepage.disable_button.current_page", true); lockPref("pref.browser.homepage.disable_button.restore_default", true); lockPref("pref.browser.homepage.disable_button.bookmark_page", true); lockPref("network.proxy.type", 1); and in channel-prefs.js and its o/p is: pref("app.update.channel", "release"); pref("general.config.filename", "mozilla.cfg"); pref("pref.browser.homepage.disable_button.current_page", true); pref("pref.browser.homepage.disable_button.restore_default", true); pref("pref.browser.homepage.disable_button.bookmark_page", true); by this only current page button get lock not other bookmark and restore tab
philipp
  • Top 25 Contributor
  • Moderator
5306 giải pháp 23424 câu trả lời
Được đăng

hi, i don't understand why you put the same content into channel-prefs.js and mozilla.cfg (also, i have no idea if pref.browser.homepage.disable_button.* are even genuine prefs to modify). put to keep it simple, let's just test with one preference to see if the lock works in principle and you can move on from there - the cfg file is quite sensible, one mistake in it will prohibit the whole file from working...

so please for testing purposes put just the following into channel-prefs.js:

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

and into mozilla.cfg:

//
lockPref("network.proxy.type", 1);

does this preference shop up as locked in firefox afterwards, when you search in about:config for it?

hi, i don't understand why you put the same content into channel-prefs.js and mozilla.cfg (also, i have no idea if pref.browser.homepage.disable_button.* are even genuine prefs to modify). put to keep it simple, let's just test with one preference to see if the lock works in principle and you can move on from there - the cfg file is quite sensible, one mistake in it will prohibit the whole file from working... so please for testing purposes put just the following into ''channel-prefs.js'': pref("general.config.obscure_value", 0); pref("general.config.filename", "mozilla.cfg"); and into ''mozilla.cfg'': // lockPref("network.proxy.type", 1); does this preference shop up as locked in firefox afterwards, when you search in about:config for it?

Người tạo câu hỏi

Thank you for reply I have did this but not check it in about:config; but I can made changes in network proxy type.

Thank you for reply I have did this but not check it in about:config; but I can made changes in network proxy type.
cor-el
  • Top 10 Contributor
  • Moderator
17475 giải pháp 157948 câu trả lời
Được đăng

It is best to leave the channel-prefs.js alone and create an local-settings.js file instead to specify using mozilla.cfg file.

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

Note that mozilla.cfg should start with a comment line (//) because this first line is skipped for security reasons.

The mozilla.cfg file is evaluated as a JavaScript file with full chrome privileges and thus can contain advanced JavaScript, but this also means that any error in the file will throw an exception and prevents Firefox from starting or from working correctly.

If the mozilla.cfg file is working properly then locked prefs should appear as italic and have Locked in the Status column.

It is best to leave the channel-prefs.js alone and create an local-settings.js file instead to specify using mozilla.cfg file. pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0); Note that mozilla.cfg should start with a comment line (//) because this first line is skipped for security reasons. The mozilla.cfg file is evaluated as a JavaScript file with full chrome privileges and thus can contain advanced JavaScript, but this also means that any error in the file will throw an exception and prevents Firefox from starting or from working correctly. If the mozilla.cfg file is working properly then locked prefs should appear as italic and have Locked in the Status column.

Người tạo câu hỏi

Hiiii

THANK YOU SO MUCH ALL OF YOU!

Finally it solve my problem and everything work prefect now.

Hiiii THANK YOU SO MUCH ALL OF YOU! Finally it solve my problem and everything work prefect now.

Người tạo câu hỏi

Hiii

I have one more doubt but it is not related with Firefox it is related with quota?

Sorry In advance If it inappropriate to ask this question here.

Can we reset a quota for user in Linux, if yes then how?

Thanks in advance. Shilpa

Hiii I have one more doubt but it is not related with Firefox it is related with quota? Sorry In advance If it inappropriate to ask this question here. Can we reset a quota for user in Linux, if yes then how? Thanks in advance. Shilpa