← Back to issue list

User specific font configuration does not survive snap updates

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1948980
Type
issue
State
open
Author
~gunnarhj
Labels
—
Created
Updated
Closed
—

Current evaluation

Snaps ignore $HOME fontconfig config and rewrite fonts.conf per revision; reporter later narrowed it to fonts.conf edits (conf.d files do persist) and suggests documenting the workaround. Untriaged since Nov 2021.

Suggested action: needs triage

Reason: The bug has no labels, no assignee and no maintainer response — only the reporter's own 2021-11-17 comments, which themselves downgrade it ("the importance of this issue is limited") and propose merely documenting the conf.d workaround. Code confirms the reported mechanism: extensions/desktop/common/init:44 sets XDG_CONFIG_HOME="$SNAP_USER_DATA/.config" and desktop-exports:328-329 rewrites "$XDG_CONFIG_HOME/fontconfig/fonts.conf" on every revision change (needs_update), so manual edits there are lost — but the reporter verified files in ../conf.d/ are copied to the new revision, i.e. a workaround exists. It also predates the move of this logic to snapcraft-desktop-integration (noted in extensions/desktop/common/fonts: "not used with the gnome extension for core22 and later"), so part of it now belongs to another repo. Uncertain whether honouring $HOME/.config/fontconfig is wanted at all, given the deliberate opposite decision in #4257, so a maintainer decision on scope is needed.

Evaluated by: mr-cal-bot

Impact: 38 Quick Win: 7 Complexity: 50 Confidence: 70 Actionability: 35

Issue body

After the merge of <https://github.com/snapcore/snapcraft/pull/3586>, the Firefox snap will hopefully soon see files in the /etc/fonts/conf.d directory. That directory basically consists of files (or symlinks) provided by packages installed on the host system. While it's possible for a user with admin privileges to add their own fontconfig config files to that directory, the natural place for user specific font configuration is $HOME. The user equivalent of /etc/fonts/conf.d is ~/.config/fontconfig/conf.d . fontconfig reads files in that directory as well as the file ~/.config/fontconfig/fonts.conf . But the instance of fontconfig used by the Firefox snap does not. Even if you can edit ~/snap/firefox/current/.config/fontconfig/fonts.conf or put files in ~/snap/firefox/current/.config/fontconfig/conf.d, your changes will be ignored as soon as the Firefox snap gets updated. This is an Ask Ubuntu question which points at the problem: https://askubuntu.com/questions/1368185/fontconfig-that-survives-firefox-snap-updates So we would need a way to make user specific font configuration persistent. While I wrote this bug with the Firefox snap in mind (since it has replaced the .deb by default in Ubuntu 21.10), I suppose this issue is a general snap issue. As an example it was mentioned for the Chromium snap at <https://forum.snapcraft.io/t/snap-package-cannot-read-fonts-conf/16657>.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 38
Quick Win: 7
Complexity: 50
Confidence: 70
Actionability: 35
needs triage Snaps ignore $HOME fontconfig config and rewrite fonts.conf per revision; reporter later narrowed it to fonts.conf edits (conf.d files do persist) and suggests documenting the workaround. Untriaged since Nov 2021.
stealth/space-bunny-alpha
Impact: 42
Quick Win: 12
Complexity: 59
Confidence: 87
Actionability: 68
needs triage Snap desktop apps such as Firefox ignore $HOME fontconfig configuration and overwrite revision-local fonts.conf; conf.d persists as a workaround, but the general behavior remains untriaged.
stealth/space-bunny-alpha
Impact: 47
Quick Win: 11
Complexity: 65
Confidence: 89
Actionability: 64
needs triage Fontconfig user configuration remains scoped to revision-specific snap data, with persistent ~/.config/fontconfig handling unimplemented and no maintainer triage recorded.
qwen/qwen3.8-27b
Impact: 45
Quick Win: 11
Staleness: 88
Complexity: 75
Confidence: 70
Support Request: 10
needs triage User fontconfig settings in ~/.config/fontconfig are ignored by Firefox/Chromium snaps and wiped on updates due to snapd's per-revision home directory. Open ~4.8 years, no labels, no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 70
Confidence: 80
Support Request: 10
close stale User-specific fontconfig settings in ~/.config/fontconfig are ignored by Firefox and Chromium snaps, resetting on updates. The issue is over 4.5 years old with zero maintainer response or activity.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 60
Confidence: 85
Support Request: 10
close stale User-specific fontconfig settings are ignored by the Firefox snap and lost on updates. The issue highlights a broader snap confinement limitation regarding persistent user configuration paths.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 65
Confidence: 85
Support Request: 15
close stale User-specific fontconfig settings in ~/.config/fontconfig/ are ignored by Firefox and other snaps, as changes in ~/snap/... are overwritten during updates. The issue highlights a persistence gap for user font configurations across snap revisions.

Update history

Date Change
created

Related work

  • Related To: snapcore/snapcraft#3586 (confidence 92%)

    PR explicitly referenced in the issue body; merged as 407dc7551 and added the '<include ignore_missing="yes">conf.d</include>' in make_user_fontconfig.

  • Related To: snapcraft#4257 (confidence 85%)

    Merged commit 7877ca5bb 'stop fontconfig from loading from host's /etc/fonts/conf.d' (LP #2025651) deliberately keeps host conf.d out of the snap, so the reporter's include-/etc/fonts/conf.d workaround runs against that decision.

Related issues

No related issues found above the similarity threshold.