Skip to content

Consider a dependency on xdg-desktop-portal-gtk

GTK4 has been using settings from the org.freedesktop.portal.Settings even outside sandboxes for a while now, at least under wayland. However, it had a fallback onto gsettings when the settings portal returned no settings under org.gnome.*, which worked on most systems w/o xdg-desktop-portal-gtk as other implementations of the settings portal generally do not provide those GNOME-specific keys.

This was however broken in gtk-4-20 under e.g. KDE w/ https://gitlab.gnome.org/GNOME/gtk/-/commit/d0db42894cf2f0708cf74c4bbc676397773ac463, since while xdg-desktop-portal-kde and darkman do not provide anything under org.gnome.*, they provide org.freedesktop.appearance, leading to GTK4 skipping the fallback and leaving all other settings at their default.

Moreover, the gsettings backend looks like it is going to be removed entirely in GTK 4.22 under wayland.

One of the alternatives is to have e.g. kde-gtk-config depend on that instead. However, that would not work with GTK 4.22 since by then everyone else would also need xdg-desktop-portal-gtk to configure GTK4 applications.

Additional info:

  • package version(s): gtk4 4.20.2-1

Steps to reproduce:

  1. Use KDE and have xdg-desktop-portal-kde installed.
  2. Remove xdg-desktop-portal-gtk
  3. Relogin and notice that gtk4 applications no longer use system settings such as button-layout.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information