Package Details: librewolf-allow-dark 1:150.0.0_1-1

Git Clone URL: https://aur.archlinux.org/librewolf-allow-dark.git (read-only, click to copy)
Package Base: librewolf-allow-dark
Description: Librewolf with the privacy.override_rfp_for_color_scheme about:config option added, which (if enabled) let's you change the color scheme even if rfp is turned on
Upstream URL: https://librewolf.net/
Licenses: MPL-2.0
Conflicts: librewolf
Provides: librewolf
Submitter: Mecso
Maintainer: Mecso
Last Packager: Mecso
Votes: 7
Popularity: 1.45
First Submitted: 2024-08-11 01:56 (UTC)
Last Updated: 2026-04-25 19:09 (UTC)

Required by (37)

Sources (9)

Latest Comments

1 2 Next › Last »

karolyi commented on 2026-05-09 11:24 (UTC)

FYI, librewolf/firefox can achieve the same thing without having to compile it with this patch: https://librewolf.net/docs/faq/#what-are-the-most-common-downsides-of-rfp-resist-fingerprinting

just got informed in the librewolf matrix channel.

Voxorin commented on 2026-04-12 21:16 (UTC) (edited on 2026-04-13 14:49 (UTC) by Voxorin)

Edit: I will propose changes upstream!

I'm running into fusermount3 permissions errors again:

fusermount3: failed to access mountpoint /run/user/1000/doc: Permission denied
error: fuse init failed: Can't mount path /run/user/1000/doc

Could you update the PKGBUILD to explicitly set mountpoint location and permissions? Here's what I added to work around the issue:

build() {
  cd librewolf-$_firefoxver-$_librewolfver

  # FUSE ISOLATION: Redirect runtime dir to bypass xdg-document-portal
  export XDG_RUNTIME_DIR="$srcdir/tmp-runtime"
  mkdir -p "$XDG_RUNTIME_DIR"
  chmod 0700 "$XDG_RUNTIME_DIR"

  # DISPLAY & SUBSYSTEM ISOLATION
  unset WAYLAND_DISPLAY
  export GTK_USE_PORTAL=0
  export MOZ_ENABLE_WAYLAND=0
  export NO_AT_BRIDGE=1              # Disables AT-SPI accessibility bus
  export GNOME_KEYRING_CONTROL=""    # Disables GNOME keyring socket requests

  # ... [rest of the original build function]
package() {
  cd librewolf-$_firefoxver-$_librewolfver

  # FUSE ISOLATION: Maintain override for the install phase
  export XDG_RUNTIME_DIR="$srcdir/tmp-runtime"

  # DISPLAY & SUBSYSTEM ISOLATION
  unset WAYLAND_DISPLAY
  export GTK_USE_PORTAL=0
  export MOZ_ENABLE_WAYLAND=0
  export NO_AT_BRIDGE=1              # Disables AT-SPI accessibility bus
  export GNOME_KEYRING_CONTROL=""    # Disables GNOME keyring socket requests

  # ... [rest of the original package function]

Also, maybe adding set -eo pipefail to build() and package() so they fail faster would be a good idea?

Mecso commented on 2026-03-21 00:22 (UTC)

@CryogEnix, it should be fixed with 148.0.2

CryogEnix commented on 2026-03-17 20:08 (UTC) (edited on 2026-03-17 20:19 (UTC) by CryogEnix)

Failure to build package due to the following error:

0:02.76 checking for clock() in wasi sysroot... no
 0:02.76 checking for emulated clock() in wasi sysroot...
 0:02.76 DEBUG: Creating `/tmp/conftestq4m6f7i0.c` with content:
 0:02.76 DEBUG: | #include <time.h>
 0:02.76 DEBUG: | int
 0:02.76 DEBUG: | main(void)
 0:02.76 DEBUG: | {
 0:02.76 DEBUG: | clock();
 0:02.76 DEBUG: |   ;
 0:02.76 DEBUG: |   return 0;
 0:02.76 DEBUG: | }
 0:02.76 DEBUG: Executing: `/usr/bin/clang --target=wasm32-wasi /tmp/conftestq4m6f7i0.c -Werror -D_WASI_EMULATED_PROCESS_CLOCKS -lwasi-emulated-process-clocks --sysroot=/usr/share/wasi-sysroot`
 0:02.76 DEBUG: The command returned non-zero exit status 1.
 0:02.76 DEBUG: Its error output was:
 0:02.76 DEBUG: | clang: error: argument '--target=wasm32-wasi' is deprecated, use --target=wasm32-wasip1 instead [-Werror,-Wdeprecated]
 0:02.76 ERROR: Can't find clock() in wasi sysroot.
*** Fix above errors and then restart with "./mach build"
==> ERROR: A failure occurred in build().

Mecso commented on 2026-02-18 10:29 (UTC)

@Voxorin, it was caused by glibc 2.43 update (which happened after my testing), it's been worked around it in upstream since then, it should be fine now

Voxorin commented on 2026-02-12 16:58 (UTC) (edited on 2026-02-12 17:03 (UTC) by Voxorin)

1:147.0.3_2-1 is failing to compile for me coming from v146.0.1_1-1.

I'm not sure if this is due to an upstream change or my display drivers got messed up somehow.

I'm getting many warnings and an error for glslopt v0.1.12:

 1:11.82 error: failed to run custom build command for `glslopt v0.1.12`
 1:11.82 Caused by:
 1:11.82   process didn't exit successfully: `/home/justin/.cache/yay/librewolf-allow-dark/src/librewolf-147.0.3-2/obj-x86_64-pc-linux-gnu/release/build/glslopt-5127639dcd9c22ea/build-script-build` (exit status: 1)
 1:11.82   --- stdout
 1:11.82   OUT_DIR = Some(/home/justin/.cache/yay/librewolf-allow-dark/src/librewolf-147.0.3-2/obj-x86_64-pc-linux-gnu/release/build/glslopt-3d79f7b27f801063/out)
 1:11.82   OPT_LEVEL = Some(1)
 1:11.82   TARGET = Some(x86_64-unknown-linux-gnu)
 1:11.82   HOST = Some(x86_64-unknown-linux-gnu)
 1:11.82   cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
 1:11.82   CC_x86_64-unknown-linux-gnu = None
 1:11.82   cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
 1:11.82   CC_x86_64_unknown_linux_gnu = Some(/usr/bin/clang)
 1:11.82   RUSTC_WRAPPER = None
 1:11.83   cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
 1:11.83   cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
 1:11.83   CRATE_CC_NO_DEFAULTS = None
 1:11.83   DEBUG = Some(false)
 1:11.83   cargo:rerun-if-env-changed=CFLAGS
 1:11.83   CFLAGS = Some(-march=znver4 -mtune=generic -O2 -pipe -fno-plt          -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer    -fno-semantic-interposition)
 1:11.83   cargo:rerun-if-env-changed=CC_SHELL_ESCAPED_FLAGS
 1:11.83   CC_SHELL_ESCAPED_FLAGS = None
 1:11.83   cargo:rerun-if-env-changed=HOST_CFLAGS
 1:11.83   HOST_CFLAGS = None
 1:11.83   cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
 1:11.84   CFLAGS_x86_64_unknown_linux_gnu = Some(  -I/home/justin/.cache/yay/librewolf-allow-dark/src/librewolf-147.0.3-2/obj-x86_64-pc-linux-gnu/dist/system_wrappers -include /home/justin/.cache/yay/librewolf-allow-dark/src/librewolf-147.0.3-2/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -fstrict-flex-arrays=1 -DNDEBUG=1 -DTRIMMED=1 -I/home/justin/.cache/yay/librewolf-allow-dark/src/librewolf-147.0.3-2/obj-x86_64-pc-linux-gnu/dist/include -I/usr/include/nspr -I/usr/include/nss -I/usr/include/nspr -I/home/justin/.cache/yay/librewolf-allow-dark/src/librewolf-147.0.3-2/obj-x86_64-pc-linux-gnu/dist/include/nss -DMOZILLA_CLIENT -include /home/justin/.cache/yay/librewolf-allow-dark/src/librewolf-147.0.3-2/obj-x86_64-pc-linux-gnu/mozilla-config.h -pthread -ffunction-sections -fdata-sections -fno-math-errno -fPIC -march=znver4 -mtune=generic -O2 -pipe -fno-plt -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-semantic-interposition -gdwarf-4 -O3 -fomit-frame-pointer -funwind-tables -Wno-error=tautological-type-limit-compare -Wno-range-loop-analysis -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wno-psabi -Wno-error=builtin-macro-redefined -Wno-unknown-warning-option -Wno-character-conversion -fno-strict-aliasing -ffp-contract=off -DNS_FREE_PERMANENT_DATA=1)
 1:11.84   cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
 1:11.84   CFLAGS_x86_64-unknown-linux-gnu = None
 1:11.84   CARGO_ENCODED_RUSTFLAGS = Some()
...
 1:12.00   --- stderr
 1:12.01   error occurred in cc-rs: command did not execute successfully (status code exit status: 1): LC_ALL="C" "/usr/bin/clang" "-O1" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "--target=x86_64-unknown-linux-gnu" "-I" "glsl-optimizer/include" "-I" "glsl-optimizer/src/mesa" "-I" "glsl-optimizer/src/mapi" "-I" "glsl-optimizer/src/compiler" "-I" "glsl-optimizer/src/compiler/glsl" "-I" "glsl-optimizer/src/gallium/auxiliary" "-I" "glsl-optimizer/src/gallium/include" "-I" "glsl-optimizer/src" "-I" "glsl-optimizer/src/util" "-D__STDC_FORMAT_MACROS" "-D_GNU_SOURCE" "-DHAVE_ENDIAN_H" "-DHAVE_PTHREAD" "-DHAVE_TIMESPEC_GET" "-DMOZILLA_CONFIG_H" "-DMOZ_INCLUDE_MOZALLOC_H" "-Dmozilla_throw_gcc_h" "-march=znver4" "-mtune=generic" "-O2" "-pipe" "-fno-plt" "-Wp,-D_FORTIFY_SOURCE=2" "-Wformat" "-Werror=format-security" "-fstack-clash-protection" "-fcf-protection" "-fno-omit-frame-pointer" "-mno-omit-leaf-frame-pointer" "-fno-semantic-interposition" "-I/home/justin/.cache/yay/librewolf-allow-dark/src/librewolf-147.0.3-2/obj-x86_64-pc-linux-gnu/dist/system_wrappers" "-include" "/home/justin/.cache/yay/librewolf-allow-dark/src/librewolf-147.0.3-2/config/gcc_hidden.h" "-U_F

konvix commented on 2025-04-05 10:39 (UTC)

This patch has been updated and extended into https://aur.archlinux.org/packages/konform-browser, where the preference has been renamed to privacy.resistFingerprinting.allowTheming.

Feel free to check out / port back!

karolyi commented on 2025-02-17 18:39 (UTC)

diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
index 8227fe6..ece4236 100644
--- a/browser/components/preferences/main.js
+++ b/browser/components/preferences/main.js
@@ -4284,6 +4284,7 @@ const AppearanceChooser = {
     FORCED_COLORS_QUERY.addEventListener("change", this);
     Services.prefs.addObserver(PREF_USE_SYSTEM_COLORS, this);
     Services.prefs.addObserver("privacy.resistFingerprinting", this);
+    Services.prefs.addObserver("privacy.override_rfp_for_color_scheme", this);
     Services.obs.addObserver(this, "look-and-feel-changed");
     this._update();
   },
@@ -4321,6 +4322,7 @@ const AppearanceChooser = {
   destroy() {
     Services.prefs.removeObserver(PREF_USE_SYSTEM_COLORS, this);
     Services.prefs.removeObserver("privacy.resistFingerprinting", this);
+    Services.prefs.removeObserver("privacy.override_rfp_for_color_scheme", this);
     Services.obs.removeObserver(this, "look-and-feel-changed");
     FORCED_COLORS_QUERY.removeEventListener("change", this);
   },
@@ -4362,7 +4364,8 @@ const AppearanceChooser = {
     this.warning.hidden = !forcingColorsAndNoColorSchemeSupport;

     document.getElementById("web-appearance-rfp-warning")?.remove();
-    if (Services.prefs.getBoolPref("privacy.resistFingerprinting")) {
+    if (Services.prefs.getBoolPref("privacy.resistFingerprinting") &&
+      !Services.prefs.getBoolPref("privacy.override_rfp_for_color_scheme")) {
       document.getElementById("web-appearance-chooser").style.opacity = 0.3;
       document.getElementById("web-appearance-chooser").style.pointerEvents = "none";
       const infoBox = document.createElement("div");
diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp
index 46de702..e5e664f 100644
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -19567,7 +19567,8 @@ ColorScheme Document::DefaultColorScheme() const {

 ColorScheme Document::PreferredColorScheme(IgnoreRFP aIgnoreRFP) const {
   if (ShouldResistFingerprinting(RFPTarget::CSSPrefersColorScheme) &&
-      aIgnoreRFP == IgnoreRFP::No) {
+      aIgnoreRFP == IgnoreRFP::No &&
+      !StaticPrefs::privacy_override_rfp_for_color_scheme()) {
     return ColorScheme::Light;
   }

diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
index 7364514..a5b603c 100644
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
@@ -15049,6 +15049,12 @@
   value: false
   mirror: always

+# Allows overriding RFP for only the dark/light pref
+- name: privacy.override_rfp_for_color_scheme
+  type: bool
+  value: false
+  mirror: always
+
 # Enforce tracking protection in all modes.
 - name: privacy.trackingprotection.enabled
   type: bool

karolyi commented on 2025-02-17 18:39 (UTC)

Wow, I thought you're not communicative at all. :) So I kept using my patchset.

Yes it does speed things up, in my experience. sccache has a ~5% cache hit rate when compiling with it, still seems to be more easy on the CPU. Also, it seems to hit compilations between source version changes, as not a lot of changes there between versions — as compared to the entire codebase.

Anyways, I'm thinking on creating the -bin version of this repo, so I could use my own compiled librewolf on my other PC as well. And it seems that I manage to compile it pretty timely manner upon update, since I am a dev for various websites and librewolf is also my chosen tool for working.

Nice touch with reenabling the chooser in preferences! Just tested the compiled version, there was a typo-like thing you did there, attached my patch for review. I'm thinking on making the override_rfp_for_color_scheme option changeable with a Services.prefs.setBoolPref() call sometime, by adding an option to the librewolf settings section. Then the whole thing could become a bit more official. I'm just not on the same page with librewolf patchers' opinion on disabling it forcingly, they still didn't manage to provide good evidence on how this breaks entropy, to this day.

Feel free to use this change — or not. :) I'm already using it since a long time.

Mecso commented on 2025-02-17 16:31 (UTC)

@karolyi the main.js modification makes it so that the the theme option in the settings is not grayed out