How can I read
.desktop files without having to (re)invent the wheel?
Is there a Python or C library that is available in the Ubuntu repos?
Or something with a command line front-end
that could be used in any language?
xdg-tools does only installation and validation.
pyxdg only returns the strings for each key. I want something higher level corresponding to how it is meant to be used according to the spec, not just a ini-file-parsing library. For example, I want escaping and quoting of
%d etc., of the Exec key, those additional application actions, etc.
I do not want to re-implement (nor read all the details of) the spec, because I am sure there exists some implementation of it already used by GNOME KDE, Ubuntu Unity, etc.