Librewolf dark mode

Go to your AppVM, and search for a file named something like ~/.librewolf/<something>.default-default/prefs.js
That is the pre-config of about:config of your browser instance. Add this lines at the end:

user_pref("ui.systemUsesDarkTheme", 1);
user_pref("layout.css.prefers-color-scheme.content-override", 2);
user_pref("browser.theme.dark-private-windows", true);
user_pref("devtools.theme", "dark");
user_pref("privacy.resistFingerprinting", false);
user_pref("privacy.fingerprintingProtection", true);
user_pref("privacy.fingerprintingProtection.overrides", "+AllTargets,-CSSPrefersColorScheme");

Last three lines (privacy tweaks) are needed to add because, if not, librewolf keeps using light mode to enhance privacy.
Privacy tweaks reference here: https://www.reddit.com/r/LibreWolf/comments/1d9d3k4/dark_mode_websites_despite_resist_fingerprinting/

I am not losing that much privacy for using a dark mode, imho.

I would like to apply this at TemplateVM level, but I haven’t been able yet, because TemplateVMs will have different folders under .librewolf than its AppVMs. So yeah, you must do this manually in each AppVM…

Edit:
For disposable VMs, you can add it to the disposable template.
For example, let’s say you have the default default-dvm. Open that template, not the disp???? one. There, browse to the ~/.librewolf/<something>.default-default/prefs.js path. Apply the patch and shutdown the Disposable template. Now any disp???? you open will inherit the dark mode patch.

I don’t think it is related to Qubes OS because everything happens in the app qube.

You might want to read this:

1 Like

I’ve tried to put those value in the template but it work only for firefox , mullvad-browser for some reason librewolf ignore the /etc/environment maybe asking to the dev directly would solve our issue look like the browser is “resisting” to /etc/environment
GTK_THEME=Adwaita:dark
QT_QPA_PLATFORMTHEME=qt5ct
QT_STYLE_OVERRIDE=Adwaita-dark

I will try to install Mullvad, so I can check why is that happening to you. What installer are you using?
Btw this is my config:

export QT_QPA_PLATFORMTHEME=gtk2
export QT_STYLE_OVERRIDE=Adwaita-dark
export GTK_THEME=Adwaita:dark

I’m using a different QT_QPA_PLATFORMTHEME. Can you try with this?

I tested your value on debian and fedora it doesn’t work unfortunately