Apply custom global gnome and firefox configuration - /etc and /usr/lib64 folders in Silverblue

Gnome allows you to have custom default global values:
By creating a a profle file, a key file and then let dconf generate its database. You end up with these newly created files that normally do not exists:

New folder: /etc/dconf/profile/
new file: /etc/dconf/profile/user
new file: etc/dconf/db/local.d
new file: etc/dconf/db/database

While writing this post, I also read that /etc is writable, and will survive reboots/updates + allow rollback, because it is included in snapshots! This means, for Gnome I don’t have to sweat. I SB does exactly what I want while allowing for changes in /etc :slight_smile:

Similarly, Firefox documentation explains how to create policy template and default preferences.

  • For policies, the latest documentation does indicate you can use /etc/firefox, which I will test on SB instead of what I have been using successfully on Manjaro: /usr/lib64/firefox/distribution/policies.json.

  • However, for Firefox default preferences, you need to work with these files:

On non-immutable distros like Manjaro Gnome I have been doing this successfully with the files in /usr/lib, but with Silverblue I am not sure if (using overlay --hotfix) is the best way to go?
I am also not sure what will happen when the SB team decides to deliver Firefox as Flatpak instead of RPM…

You should write files in /etc as much as possible. For cases where this does not work due to missing support in upstream software, you can make a small RPM that as the config file that you need and overlay it on top of your system.

I decided to not apply Firefox AutoConfig. That way I do not need to rely on --hotfix. It is super annoying to manually configure the browser again… but oh well.

I filed a bug report with Mozilla.