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".

Learn More

Global preference to change default sync server (firefox.cfg not working)

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

more options

I want to set 2 preferences regarding syncing as default preference for all (new) profiles. 1. sync toolbar layout. 2. set my own sync server path.

I already know how to do this via about:config manually per user. I want to have these 2 preferences by default for all users.

On Ubuntu 21.04, I followed these instructions to the letter, but it has no effect, tested on a newly created profile: https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig

I created: /usr/lib/firefox/defaults/pref/autoconfig.js And it contains exactly what is in the instructions.

Also created: /usr/lib/firefox/firefox.cfg Looks like: ``` // IMPORTANT: Start your code on the 2nd line defaultpref("services.sync.prefs.sync.browser.uiCustomization.state","true"); defaultpref("identity.sync.tokenserver.uri","https://ffsync.mydomain.tld/token/1.0/sync/1.5"); ```

Then I create a new profile and check via about:config, unfortunately the first preference doesn't exist (note it doesn't exist by default) and the other is not applied, I still see Mozilla sync server path.

How can I set these 2 customisations globally. for all future users (preferably also current users)?

I want to set 2 preferences regarding syncing as default preference for all (new) profiles. 1. sync toolbar layout. 2. set my own sync server path. I already know how to do this via about:config manually per user. I want to have these 2 preferences by default for all users. On Ubuntu 21.04, I followed these instructions to the letter, but it has no effect, tested on a newly created profile: https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig I created: /usr/lib/firefox/defaults/pref/autoconfig.js And it contains exactly what is in the instructions. Also created: /usr/lib/firefox/firefox.cfg Looks like: ``` // IMPORTANT: Start your code on the 2nd line defaultpref("services.sync.prefs.sync.browser.uiCustomization.state","true"); defaultpref("identity.sync.tokenserver.uri","https://ffsync.mydomain.tld/token/1.0/sync/1.5"); ``` Then I create a new profile and check via about:config, unfortunately the first preference doesn't exist (note it doesn't exist by default) and the other is not applied, I still see Mozilla sync server path. How can I set these 2 customisations globally. for all future users (preferably also current users)?

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

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

The name of the function is not defaultpref(), but is defaultPref(). The code in autoconfig.cfg is run as JavaScript and thus variable names are case sensitive.

defaultpref("services.sync.prefs.sync.browser.uiCustomization.state","true");
defaultpref("identity.sync.tokenserver.uri","https://ffsync.mydomain.tld/token/1.0/sync/1.5");

Should be:

defaultPref("services.sync.prefs.sync.browser.uiCustomization.state","true");
defaultPref("identity.sync.tokenserver.uri","https://ffsync.mydomain.tld/token/1.0/sync/1.5");
Đọc câu trả lời này trong ngữ cảnh 👍 1

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

more options

Anyone, please?

more options

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

The name of the function is not defaultpref(), but is defaultPref(). The code in autoconfig.cfg is run as JavaScript and thus variable names are case sensitive.

defaultpref("services.sync.prefs.sync.browser.uiCustomization.state","true");
defaultpref("identity.sync.tokenserver.uri","https://ffsync.mydomain.tld/token/1.0/sync/1.5");

Should be:

defaultPref("services.sync.prefs.sync.browser.uiCustomization.state","true");
defaultPref("identity.sync.tokenserver.uri","https://ffsync.mydomain.tld/token/1.0/sync/1.5");
more options

Thank you! There was another error: "true" is incorrect, it should be true without " ".

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