0

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:

  1. From https://code.adonline.id.au/dark-theme-in-wsl2/...
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
  1. From https://askubuntu.com/a/1408728/1020711...
gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark
gsettings set org.gnome.desktop.interface color-scheme prefer-dark
  1. From https://askubuntu.com/a/1216263/1020711...

flatpak install org.gtk.Gtk3theme.Yaru

  1. From https://www.reddit.com/r/bashonubuntuonwindows/comments/nmsmm9/comment/gzrv2gi/?context=3...

Add GTK_THEME=Adwaita:dark to the /etc/environment file

  1. From https://github.com/microsoft/wslg/issues/251...

sudo apt install dbus-x11

  1. From https://askubuntu.com/a/882515/1020711...

Add the following to the ``~/.config/gtk-3.0/settings.iniand~/.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.

ETL
  • 101
  • thanks for catching that. Ubuntu version is 23.10. I misread/mistyped, because I have WSL version 2.0.14 – ETL Feb 10 '24 at 05:51

0 Answers0