How can you determine the user's icon theme without using neither GNOME nor KDE nor any other desktop specific programs/libraries/files?

I could not find anything about how to determine users icon theme, in the pyxdg library nor in the xdg spec.

The xdg-* command-line tools cannot do it either, in particular:

$ xdg-settings --list
Known properties:
  default-web-browser           Default web browser

is the only setting it "knows" about!

For GNOME it can be done, among others, by

$ gsettings list-recursively | grep icon-theme
org.gnome.desktop.interface icon-theme 'ubuntu-mono-dark'

but that does not work elsewhere!

My problem more specifically is that the pyxdg library does not return icons for many apps, unless I pass the theme's name explicitly or set the libraries corresponding global variable myself. Hence I

  • either have to find all installed themes myself (lots of extra ugly code, pyxdg does not do this either) and search with potentially all of them (slow)
  • or have to look up the name of the current theme (extra ugly code for each desktop-environment, what about custom/minimal setups like xmonad)

Hence this really belongs into libraries like pyxdg. But they do not do it, despite claiming to implement the xdg standard. Which makes me wonder if/why that does not specify it.

1 Answer 1


There is no global icon theme setting, so this cannot be done in principle. If you change your KDE icon theme, it will not change your icons in your GNOME applications.

KDE applications, when run in a GNOME desktop environment, will use the GNOME theme settings, but that is not because of global settings but rather because the Qt toolkit has added a mechanism to detect the GNOME theme and use it. It is still ultimately a GNOME-specific setting, and it won't carry over if you switch to another desktop environment.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .