Base Directory Specification and plugins

Yury G. Kudryashov urkud.urkud at
Sun Dec 11 03:16:32 PST 2011

David Faure wrote:

First of all, thanks a lot for your answer!

> On Tuesday 06 September 2011 23:02:21 Yury G.  Kudryashov wrote:
>> Yury G.  Kudryashov wrote:
>> >>> What do you think about $XDG_LIBRARY_DIRS${LIB_SUFFIX},
> If anything, this should be called XDG_PLUGIN_DIRS or XDG_PLUGIN_PATH.
> Ah, so that's what your LIBRARY_SPECIFIC_SUFFIX was about, right?
Yes, thanks.
> To make that easier to understand, please don't define it as "being part
> of LIB_SUFFIX", LIB_SUFFIX is usually only arch stuff.
> A mandatory implementation-specific suffix (subdir) is orthogonal, and
> very much needed too, indeed.
>> Sorry for answering my own e-mail. What is the standard process of adding
>> something to the xdg dirs standard? Should I prepare a patch with exact
>> phrasing?
> I guess so.
I hope that I'll have some time do it next week-end.
> E.g. at the moment I'm missing some information on what the default value
> would be :-)

XDG_PLUGIN_DIRS: either /usr/lib${LIB_SUFFIX} or 
/usr/lib${LIB_SUFFIX}/plugins - what do you prefer?

If we choose /usr/lib${LIB_SUFFIX}/plugins, it is easier to find all your 

The text below is written for the /usr/lib${LIB_SUFFIX} case but it is easy 
to add "/plugins" to appropriate places.

XDG_PLUGIN_HOME: ~/.local/lib${LIB_SUFFIX} (or 

Plugins should be installed to 
should be chosen in the same way that is used for shared libraries.

Buildsystem of a plugin-enabled library/application should (must?) allow 
distributions to override LIB_SUFFIX and may allow override of 
LIBRARY_SPECEFIC_SUFIX. This is important because different distros may 
prefer different ABI-specific LIB_SUFFIX'es.

Both LIB_SUFFIX ad LIBRARY_SPECIFIC_SUFFIX must be advertised through 
installed development files (e.g., mylib.pc or MyLibConfig.cmake).

Buildsystem of a plugin should install plugins into 
${prefix}/lib${LIB_SUFFIX}/${LIBRARY_SPECIFIC_SUFFIX}, where ${prefix} is 
the plugin's installation prefix (not the prefix of the original 
library/application), LIB_SUFFIX and LIBRARY_SPECIFIC_SUFFIX are taken from 
mylib.pc or MyLibConfig.cmake. If the installation prefix of the plugin 
differs from the installation prefix of the original library/application, 
plugin may (should?) tell user to adjust XDG_PLUGIN_DIRS.
Yury G. Kudryashov,
mailto: urkud at

More information about the xdg mailing list