Skip to content

Switch Firefox from Flatpak to RPM with win95 retro theme#94

Draft
ledif wants to merge 7 commits into
mainfrom
firefox-retro-theme
Draft

Switch Firefox from Flatpak to RPM with win95 retro theme#94
ledif wants to merge 7 commits into
mainfrom
firefox-retro-theme

Conversation

@ledif
Copy link
Copy Markdown
Member

@ledif ledif commented Apr 28, 2026

Summary

  • Replaces `org.mozilla.firefox` Flatpak with the `firefox` RPM, eliminating all Flatpak sandbox issues (drag-and-drop, filesystem access, native messaging)
  • Adds `25-firefox-theme.sh`: installs nodejs at build time, builds win95-themes CSS, installs fx-autoconfig to `/usr/lib64/firefox/`, and stages theme files into Firefox's default profile template (`/usr/lib64/firefox/browser/defaults/profile/chrome/`); nodejs is removed after the build
  • Adds `run_after_04-firefox-theme.sh`: chezmoi script that copies the theme into any existing profiles on upgrade (new profiles are handled automatically by `config.js` bootstrap on first launch)
  • Updates the panel launcher from Pale Moon → `/usr/bin/firefox`
  • Installs `browser/defaults/preferences/blue95-firefox.js` with all required system-wide Firefox prefs

System prefs set

Pref Value Purpose
`toolkit.legacyUserProfileCustomizations.stylesheets` `true` Enable userChrome.css
`win95.colors` `win2000` Load Win2000 color palette (required — without this no color variables are defined)
`browser.tabs.inTitlebar` `0` Let xfwm4/Chicago95 draw the Win95-style WM title bar
`win95.navbar-button-labels` `true` IE-style text labels on toolbar buttons
`sidebar.revamp` `true` Required for sidebar theming
`widget.gtk.overlay-scrollbars.enabled` `false` Win95-style scrollbars
`widget.non-native-theme.scrollbar.size.override` `16` Correct scrollbar size
`widget.non-native-theme.scrollbar.style` `4` Win95 scrollbar style

Pinned versions

Component SHA
win95-themes `d1d459c78939` (v2.3.0)
fx-autoconfig `54f88294ea70`

Testing

To test without waiting for CI, rebase to the PR image tag once the CI build completes:
```
rpm-ostree rebase ostree-image-signed:docker://ghcr.io/winblues/blue95:pr-94-43
```

Or test the theme wiring live on an unlocked system by running `25-firefox-theme.sh` directly and then triggering the chezmoi script.

Maintenance note

The win95-themes CSS targets Firefox internal element IDs which can break on Firefox updates. Firefox is not pinned — it updates freely via the base image. When the theme breaks after a Firefox update, bump `WIN95_SHA` in `25-firefox-theme.sh` to the latest win95-themes release and rebuild.

ledif added 7 commits April 27, 2026 19:28
- Replace org.mozilla.firefox Flatpak with firefox RPM
- Add 25-firefox-theme.sh: builds win95-themes CSS at image build time,
  installs fx-autoconfig to /usr/lib64/firefox/, stages theme files to
  /usr/share/winblues/firefox-theme/, sets system-wide Firefox prefs
- Add run_after_04-firefox-theme.sh: chezmoi first-login script that
  wires up the chrome/ directory in the user's default Firefox profile
- Update panel launcher from Pale Moon to native Firefox RPM

WIN95_SHA=d1d459c78939 (v2.3.0), FXAC_SHA=54f88294ea70
…ng path

Firefox copies browser/defaults/profile/chrome/ into every new profile
automatically on first launch, so no chezmoi profile-detection is needed
for fresh installs. The chezmoi script is now upgrade-only: it copies
chrome/ into any existing profiles that are missing it.
- Replace vendored fx-autoconfig config.js with a custom version that
  copies chrome/ from browser/defaults/profile/chrome/ on first launch
  if chrome/utils/ is missing. Firefox does not copy defaults/profile/
  to new profiles automatically, so the loader must do it.
- Fix chezmoi script to check ~/.config/mozilla/firefox/ (XDG) first,
  falling back to ~/.mozilla/firefox/ for legacy systems.
Three bugs prevented the theme from rendering correctly:

- CSS/colors/ dir was not created; win95.colors pref was not set, so all
  three @import color conditionals in firefox_global.uc.css evaluated false
  and no --color-* variables were defined, making the entire theme invisible
- browser.tabs.inTitlebar was not set to 0, so Firefox used CSD instead of
  letting xfwm4/Chicago95 draw the Win95-style WM title bar
- win95.navbar-button-labels was not enabled; add it as the system default
  for authentic Win95 IE-style labeled toolbar buttons
…displays

Win95's original 8pt (11px at 96dpi) is uncomfortably small on modern
monitors. Override --text-ui-size via a cascade-order append to userChrome.css
so all tab/toolbar/URL text renders at 14px.
@ledif ledif marked this pull request as draft April 28, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant