Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

trying to lock settings in about:config

  • 12 trả lời
  • 4 gặp vấn đề này
  • 1 lượt xem
  • Trả lời mới nhất được viết bởi loganj

more options

I'm trying to lock the settings in about:config. I changed the settings, created the mozilla.cfg file, created the all.js file, placed the mozilla.cfg file in Firefox.app > Contents > Resources. I placed the all.js file in Firefox.app > Contents > Resources > defaults > pref. For simplicity sake the mozilla.cfg file is:

// lockPref("browser.startup.homepage", “https://www.google.com”);

I converted to cfg using the tool here: http://www.alain.knaff.lu/howto/MozillaCustomization/cgi/byteshf.cgi

The all.js file looks like this:

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

It was created in TextEdit in plain text.

Thanks

I'm trying to lock the settings in about:config. I changed the settings, created the mozilla.cfg file, created the all.js file, placed the mozilla.cfg file in Firefox.app > Contents > Resources. I placed the all.js file in Firefox.app > Contents > Resources > defaults > pref. For simplicity sake the mozilla.cfg file is: // lockPref("browser.startup.homepage", “https://www.google.com”); I converted to cfg using the tool here: http://www.alain.knaff.lu/howto/MozillaCustomization/cgi/byteshf.cgi The all.js file looks like this: pref("general.config.obscure_value", 0); pref("general.config.filename","mozilla.cfg"); It was created in TextEdit in plain text. Thanks

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

You still do not have quotes like " ("), but have “ (“)

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

Tất cả các câu trả lời (12)

more options

You no longer have to use to bit shift (rotate 13) and you did already disabled it via general.config.obscure_value = 0

I don't know if the files need to be in Firefox.app > Contents > Resources or in Firefox.app > Contents > MacOS

  • /Applications/Firefox.app/Contents/MacOS/

You need to use normal quotes in the mozilla.cfg file and not special quotes (“) like show in your example.

lockPref("browser.startup.homepage", “https://www.google.com”);
lockPref("browser.startup.homepage", "https://www.google.com");
more options

I changed all of the quotes in mozilla.cfg to single (') and moved the file into the MacOS folder, restarted Firefox and in about:config the status is still coming up as "user set" and not "locked."

Any other ideas?

more options

You need to use double quotes (") as you see in the prefs.js file.

Do you see any errors in the Browser Console (Firefox/Tools > Web Developer)?

You can try the samples files that I posted in this post as a data URI:

more options

I'm not too familiar with the browser console but it didn't look like there were any errors.

I created a local-settings.js file, added that to the pref folder (removed the all.js file) and now I'm getting "Configuration Error - Failed to read the configuration file. Please contact your system administrator." I tried creating the cfg file from either rich text or plain text and I receive the error.

more options

That message means that the local-settings.js file is found and processed, but that the mozilla.cfg file is missing (i.e. not found in the correct location) or that there is a problem with the file.

more options

Thanks for the reply.

The cfg file still reads:

// lockPref(“browser.startup.homepage”, “https://www.google.com”);

I created the file in plain text in TextEdit, renamed it as mozilla.cfg and placed it in the MacOS folder. When I try opening Firefox I receive the previously-mentioned error.

I tried moving the mozilla.cfg file to the Resources folder, opening Firefox but it instantly closes without any error messages.

more options

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

You still do not have quotes like " ("), but have “ (“)

more options

Haha I had no idea there were 2 different types of "s! Copying yours into the file worked perfectly, thanks for your help!

more options

i have almost the same problem: lockPref not working my case: local-settings.js (in /usr/lib/firefox/defaults/pref) pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0);

mozilla.cfg (in mozilla.cfg /usr/lib/firefox) // lockPref("ui.trackpoint_hack.enabled", 1); lockPref("general.autoScroll",true);

there is no lock in about:config. i forgot to mention that it use to work 1-2 months ago. today i had to use/resintall linux again and is not working anymore

Được chỉnh sửa bởi loganj vào

more options

Are you sure that the files are in the correct location and that you are starting this version of Firefox?

Is the channel-prefs.js file in this folder as well?

Do you see the general.config.filename;mozilla.cfg pref on the about:config page

If you temporarily rename the mozilla.cfg file then you should get an error message and won't be able to start Firefox if the local-settings.js file is working.

more options

ah sorry it was my fault. the files are in the right place. the problem WAS that only the root user had access to them. after allowing other users to read the files everything works again.