I am running Ubuntu (Preview), which is Ubuntu 23.10, in Windows 11 WSL2. I installed Flatpak, and from there installed Gnome Web browser, aka Epiphany. I cannot figure out how to set the browser theme to dark mode.
In Epiphany settings, under Appearance, there are Theme options of "Light" and "Dark," but selecting Dark doesn't do anything, even after restarting the browser (and even restarting the whole Ubuntu VM). The browser window is still white.
I have tried the following solutions:
sudo apt install gnome-tweaks gsettings set org.gnome.shell.ubuntu color-scheme prefer-dark gsettings set org.gnome.desktop.interface gtk-theme Yaru-dark gsettings set org.gnome.desktop.interface color-scheme prefer-dark gsettings reset org.gnome.shell.ubuntu color-scheme
gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark gsettings set org.gnome.desktop.interface color-scheme prefer-dark
flatpak install org.gtk.Gtk3theme.Yaru
Add
GTK_THEME=Adwaita:dark
to the/etc/environment
file
sudo apt install dbus-x11
Add the following to the ``~/.config/gtk-3.0/settings.ini
and
~/.config/gtk-4.0/settings.ini` files:[Settings] gtk-application-prefer-dark-theme=1
Is this a limitation of WSL2 that color theming is broken? (note: I am using WSL2's built-in GUI renderer, which I believe is called WSLg. I would prefer a solution for this scenario, not a workaround that involves using some other x-server.)
P.S. In case it's relevant, this is the bash output when I launch Epiphany from the terminal:
Note that the directories
'/var/lib/flatpak/exports/share'
'/root/.local/share/flatpak/exports/share'
are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.
(epiphany:2): Gdk-WARNING **: 00:41:41.376: Failed to read portal settings: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
(epiphany:2): epiphany-WARNING **: 00:41:41.589: Failed to search secrets in password schema: org.freedesktop.DBus.Error.ServiceUnknown
(process:2): Gdk-WARNING **: 00:41:41.671: Failed to read portal settings: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
libEGL warning: MESA-LOADER: failed to open vgem: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/vgem_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/GL/default/lib/dri, suffix _dri)
libEGL warning: MESA-LOADER: failed to open vgem: /usr/lib/x86_64-linux-gnu/GL/default/lib/dri/vgem_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/GL/default/lib/dri, suffix _dri)
Unable to access the GBM device, disabling DMABuf video sink.