Skip to content

Instantly share code, notes, and snippets.

@DenebTM
Last active January 28, 2025 19:48
Show Gist options
  • Select an option

  • Save DenebTM/3cad3bbaee0cdc2ad190162a969e4a87 to your computer and use it in GitHub Desktop.

Select an option

Save DenebTM/3cad3bbaee0cdc2ad190162a969e4a87 to your computer and use it in GitHub Desktop.
Fix GTK application themes on KDE Plasma 6 Wayland once and for all (as of 2025-01-27)
  1. ensure that glib2, dconf and xdg-desktop-portal-gtk are all installed

    note: these package names apply to Arch; glib2 and dconf provide the gsettings and dconf binaries and dbus interfaces, respectively.

  2. add the following overrides (e.g. for "All Applications" in Flatseal) to fix theming for X11 GTK apps:

    --filesystem=~/.icons:ro
    --filesystem=/usr/share/icons:ro
    --filesystem=~/.local/share/icons:ro
    --filesystem=xdg-config/kcminputrc:ro
    --filesystem=xdg-config/fontconfig:ro
    --filesystem=xdg-config/gtk-4.0:ro
    --filesystem=xdg-config/gtk-3.0:ro
    --filesystem=xdg-config/gtkrc-2.0:ro
    
  3. add the following overrides to do the same for Wayland apps:

    --filesystem=xdg-run/dconf
    --filesystem=~/.config/dconf:ro
    --env=DCONF_USER_CONFIG_DIR=.config/dconf
    
    --talk-name=ca.desrt.dconf
    

    (--talk-name refers to a Session Bus Talk override)

  4. log out and log back in — things should be fine now.

    if they aren't, or you're having other xdg-desktop-portal-related issues such as firefox not using the KDE file picker (this affects non-flatpak applications too), and upon launching a GTK app via the command line you see a message like No such interface “org.freedesktop.portal.Settings”:

    create ~/.config/xdg-desktop-portal/portals.conf with the following contents:

    org.freedesktop.impl.portal.Settings=gtk
    

    (this SHOULD be handled by /usr/share/xdg-desktop-portal/kde-portals.conf, but in my case for some reason it just wasn't)

  5. log out and log back in. things WILL be fine now. you may finally stop screaming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment