Closed Bug 1858224 Opened 1 year ago Closed 25 days ago

AutoConfig not possible with Fedora Silverblue immutable OS (/var/lib readonly)

Categories

(Core :: AutoConfig (Mission Control Desktop), enhancement)

Firefox 118
enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: zilexa, Assigned: mkaply)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0

Steps to reproduce:

I can apply AutoConfig by following the documentation here:
https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig

Actual results:

But on Fedora Silverblue, this is not possible because /usr/lib64/ is part of the immutable OS image and not writeable.

Expected results:

A solution would be to use the same directory used for Policies (https://mozilla.github.io/policy-templates/).

This would require Firefox to support
/etc/firefox/defaults/pref/autoconfig.js instead of /usr/lib64/firefox/defaults/pref/autoconfig.js
/etc/firefox/firefox.cfg instead of /usr/lib64/firefox/firefox.cfg

Please consider this, to support easy deployments with Fedora Silverblue OS as base.

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: ImageLib' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics: ImageLib
Product: Firefox → Core

Not sure where this should go, taking a guess.

Component: Graphics: ImageLib → Widget: Gtk

See bug 1785278

We added the ability to read autoconfig from /etc/firefox when running under Flatpak or Snap.

Not going to dupe yet until you verify it works.

Question, though. Why are you still using Autoconfig? What do you need it for?

Assignee: nobody → mozilla
Component: Widget: Gtk → AutoConfig (Mission Control Desktop)

To pass system settings to Firefox flatpak you can use: https://jhorakdevblog.wordpress.com/2023/06/22/how-to-set-firefox-enterprise-policies-and-system-preferences-under-flatpak/.

However as you've noted if the /var/lib is immutable, that won't work. Problem is that the system /etc is not accessible for the Firefox flatpak. It even cannot be overriden by the --filesystem=/etc flatpak argument. I'm not a silverblue expert and I don't know any workaround regarding this problem.

@jhorak I use autoconfig to change default about:config settings systemwide, also for profiles created in the future. This includes the layout of the toolbars of Firefox, with the extensions that I prefer. The following:
defaultPref("services.sync.prefs.sync.browser.uiCustomization.state",true);
defaultPref("media.ffmpeg.vaapi.enabled",true);
defaultPref("widget.use-xdg-desktop-portal.file-picker",1);
defaultPref("widget.use-xdg-desktop-portal.mime-handler",1);
defaultPref("browser.toolbars.bookmarks.visibility", "always");
defaultPref("browser.uiCustomization.state", "{"placements":{"widget-overflow-fixed-list":["screenshot-button","print-button","save-to-pocket-button","bookmarks-menu-button","library-button","preferences-button","panic-button"],"nav-bar":["back-button","forward-button","stop-reload-button","customizableui-special-spring1","downloads-button","ublock0_raymondhill_net-browser-action","urlbar-container","customizableui-special-spring2"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["fxa-toolbar-menu-button","history-panelmenu","personal-bookmarks"]},"seen":["save-to-pocket-button","d133e097-46d9-4ecc-9903-fa6a722a6e0e-browser-action","_contain-facebook-browser-action","sponsorblocker_ajay_app-browser-action","ublock0_raymondhill_net-browser-action","developer-button"],"dirtyAreaCache":["nav-bar","widget-overflow-fixed-list","PersonalToolbar"],"currentVersion":17,"newElementCount":3}");

@jhorak thank you but I am not using Flatpak Firefox. Fedora Silverblue (and the uBlue images) all ship with rpm-ostree Firefox.

Please see my suggestion in the the description of the bug. Quoting myself:
A solution would be to use the same directory used for Policies (https://mozilla.github.io/policy-templates/).

This would require Firefox to support
/etc/firefox/defaults/pref/autoconfig.js instead of /usr/lib64/firefox/defaults/pref/autoconfig.js
/etc/firefox/firefox.cfg instead of /usr/lib64/firefox/firefox.cfg

Please consider this, to support easy deployments with Fedora Silverblue OS as base.

Just to be clear:

  • this is not flatpak related
  • /etc folder is accessible by firefox, that is why policies work fine. /usr/lib64 is immutable. Currently with Firefox 127 my suggestion above does not work (putting autoconfig.js and firefox.cfg in the /etc location).

All of these preferences are settable via policy. Do they not work if you set them via policies.json?

Flags: needinfo?(whirlpooll10050)
Restrict Comments: true

Redirect a needinfo that is pending on an inactive user to the triage owner.
:mkaply, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(zilexa) → needinfo?(mozilla)

I don't want to do more for autoconfig.

Status: UNCONFIRMED → RESOLVED
Closed: 25 days ago
Flags: needinfo?(mozilla)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.