Closed jabkoo closed 10 months ago
Can you give a little more detail on exactly what you're trying to do?
Can you give a little more detail on exactly what you're trying to do?
Sure, sorry if I my explanation was too broad.
user.js
for most of the settings, I also decide to use policy template to automate extensions installation. I didn't want to use Firefox Accountsorg.mozilla.firefox.plist
that for now looks something like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnterprisePoliciesEnabled</key>
<true/>
<key>DisableFirefoxStudies</key>
<true/>
<key>DisableMasterPasswordCreation</key>
<true/>
<key>Extensions</key>
<dict>
<key>Install</key>
<array>
<string>https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi</string>
<string>https://addons.mozilla.org/firefox/downloads/latest/tampermonkey/latest.xpi</string>
<string>https://addons.mozilla.org/firefox/downloads/latest/istilldontcareaboutcookies/latest.xpi</string>
<string>https://addons.mozilla.org/firefox/downloads/latest/addy_io/latest.xpi</string>
<string>https://addons.mozilla.org/firefox/downloads/file/4170561/bitwarden_password_manager-2023.9.1.xpi</string>
<string>https://addons.mozilla.org/firefox/downloads/file/3739730/what_hacker_news_says-0.2.0.xpi</string>
<string>https://addons.mozilla.org/firefox/downloads/file/4044991/refined_hacker_news-22.12.17.xpi</string>
<string>https://addons.mozilla.org/firefox/downloads/file/4137983/vimium_ff-1.67.7.xpi</string>
<string>https://addons.mozilla.org/firefox/downloads/file/4157491/enhancer_for_youtube-2.0.121.xpi</string>
<string>https://addons.mozilla.org/firefox/downloads/file/4139299/view_page_archive-4.1.0.xpi</string>
<string>https://addons.mozilla.org/firefox/downloads/file/4132819/search_by_image-5.7.0.xpi</string>
</array>
</dict>
<key>ExtensionSettings</key>
<dict>
<key>{446900e4-71c2-419f-a6a7-df9c091e268b}</key>
<dict>
<key>default_area</key>
<string>navbar</string>
</dict>
<key>browser-extension@anonaddy</key>
<dict>
<key>default_area</key>
<string>navbar</string>
</dict>
<key>{2e5ff8c8-32fe-46d0-9fc8-6b8986621f3c}</key>
<dict>
<key>default_area</key>
<string>navbar</string>
</dict>
<key>{d07ccf11-c0cd-4938-a265-2a4d6ad01189}</key>
<dict>
<key>default_area</key>
<string>navbar</string>
</dict>
<key>{6aeddb34-a2e1-4892-9918-564ba5e9313e}</key>
<dict>
<key>default_area</key>
<string>navbar</string>
</dict>
<key>uBlock0@raymondhill.net</key>
<dict>
<key>default_area</key>
<string>navbar</string>
</dict>
</dict>
<key>UserMessaging</key>
<dict>
<key>WhatsNew</key>
<false/>
<key>ExtensionRecommendations</key>
<false/>
<key>FeatureRecommendations</key>
<false/>
<key>UrlbarInterventions</key>
<false/>
<key>SkipOnboarding</key>
<true/>
<key>MoreFromMozilla</key>
<false/>
<key>Locked</key>
<false/>
</dict>
</dict>
</plist>
~/Library/Preferences
it works just fine~/dotfiles
and symlink it instead to ~/Library/Preferences
, just as I do with other dotfiles, using ln -fns "~/dotfiles/firefox/org.mozilla.firefox.plist" "~/Library/Preferences/org.mozilla.firefox.plist"
. Unfortunately, Firefox does not recognize it this way or something. about:policies
page in Firefox shows "The Enterprise Policies service is inactive"Actually, today I've tried to test it with a hard link instead of symbolic link by using ln -fn "~/dotfiles/firefox/org.mozilla.firefox.plist" "~/Library/Preferences/org.mozilla.firefox.plist"
and this way it is working correctly. Made me wonder if the issue is with Firefox not having permissions to access and/or modify the template policy in my dotfiles folder, but I've used chflags nouchg
again to clear immutable flags and even gave Firefox Full Disk Access in Settings, but still not working with a symbolic link.
Let me know if I'm making sense.
If you believe it might not be possible with a symbolic link, I will be satisfied with my hard link solution.
Edit: I've also ran Firefox with browser.policies.loglevel
set to debug, as described in https://support.mozilla.org/en-US/kb/debugging-policy-issues, but it is now showing any logs
For some reason I decided to spend some time on this and I'm list :)
Putting that file in ~/Library/Preferences doesn't work for me because org.mozilla.firefox.plist is a binary plist,. not an XML plist (and the binary data gets added to the file).
Anyway, all that being said, are you ok with me just closing this as I don't think other folks will want to do this.
Sure, we can close that. Like I said, I'm satisfied with my solution with a hard link.
Thanks for putting some time and effort to this anyway :)
I don't know how smart this is, but I was hoping I could store a policy template as one of my MacOS dotfiles I can symlink.
Unfortunately, that doesn't seem to work. Initially I thought the issue was that I wasn't storing my .plist file as a binary, but after copying non-binary version to
~/Library/Preferences
it does work just fine. Apparently Firefox converts and overwrites this file to binary on startup anyway, I think.Then I had tried symlinking binary file, but result did not change. I had also tried clearing immutable flags with
chflags nouchg
, but did not help.So I wanted to ask is it even possible to get it working with a symlink somehow? Or should I ditch that idea?