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

Using policies.json to manage individual profiles on linux

  • 4 trả lời
  • 0 gặp vấn đề này
  • Trả lời mới nhất được viết bởi cor-el

more options

I'm having trouble using the policies.json file to manage individual profiles on Linux. I've come across sources that suggest placing the distribution/policies.json file in the profile folder should work, but I can't seem to get it to function as expected.

My use case is to create a separate profile that can only connect to localhost.

I have a few questions:

  • Is there a specific way to use policies.json for managing individual profiles on Linux? If so, what is the correct method?
  • Can the location where Firefox looks for the policies.json file be overwritten for a new process? If yes, how can this be achieved?
I'm having trouble using the policies.json file to manage individual profiles on Linux. I've come across sources that suggest placing the distribution/policies.json file in the profile folder should work, but I can't seem to get it to function as expected. My use case is to create a separate profile that can only connect to localhost. I have a few questions: * Is there a specific way to use policies.json for managing individual profiles on Linux? If so, what is the correct method? * Can the location where Firefox looks for the policies.json file be overwritten for a new process? If yes, how can this be achieved?

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

more options

distribution/policies.json needs to be in the directory where the Firefox binary is. It could be anywhere but is often in /opt/firefox so the full path would be /opt/firefox/distribution/policies.json.

The easiest way to find it is in Firefox press Alt-H and then choose "More Troubleshooting Information" from the drop-down menu that appears. In the first block of information is a line starting with "Application Binary" with the path next to it. That's where to put distribution/policies.json.

Hữu ích?

more options

ThePillenwerfer said

distribution/policies.json needs to be in the directory where the Firefox binary is. It could be anywhere but is often in /opt/firefox so the full path would be /opt/firefox/distribution/policies.json. The easiest way to find it is in Firefox press Alt-H and then choose "More Troubleshooting Information" from the drop-down menu that appears. In the first block of information is a line starting with "Application Binary" with the path next to it. That's where to put distribution/policies.json.

Appreciate the clarification.

However, if placed there, the policies apply to all profiles opened using that binary.

Yet I need a more fine grained control, so that I can have different policies for different profiles. E.g. profileA: no restrictions profileB: about config not allowed, no connections other than localhost allowed.

Hữu ích?

more options

All I've ever done with Policies is stop Thunderbird up-dating so can't really help you further.

I would have thought that there'd be some way of saying in the Policy file which things to apply to which profiles. Also if it worked in the ~/.mozilla/firefox/profile directory a user could edit it whereas in /opt or /usr/bin they'd need root permissions.

Hữu ích?

more options

policies.json works for all profiles, so you can't have different settings unless you would use multiple installations, each in its own installation folder.

You can however use an autoconfig.cfg file as this file supports JavaScript if you disable the sandbox and in such a case you can place pref settings in an 'if' block that detects the name of the profile.

Content of autoconfig.cfg:

// start autoconfig.cfg with a comment line
let Services = globalThis.Services
let profD = Services.dirsvc.get("ProfD", Ci.nsIFile).path;

Content of autoconfig.js:

//start autoconfig.js with a comment line
pref("general.config.filename", "autoconfig.cfg");
pref("general.config.obscure_value", 0);
pref("general.config.sandbox_enabled", false);

Hữu ích?

Đặt một câu hỏi

Bạn phải đăng nhập vào tài khoản của bạn để trả lời bài viết. Vui lòng bắt đầu một câu hỏi mới, nếu bạn chưa có tài khoản.