Base directory specification

Brian J. Tarricone bjt23 at
Mon Mar 26 09:23:13 PDT 2007

On Mon, 26 Mar 2007 17:12:12 +0200 Sanel Zukan wrote:

>Hi to all,
>I am currently implementing Base directory specification for EDE,
>according to documentation located at:
>There is stated: "If $XDG_DATA_HOME is either not set or empty, a 
>default equal to $HOME/.local/share should be used." 
>Here is, at least for me, unclear whether desktop should set
>$XDG_DATA_HOME, $XDG_CONFIG_HOME, etc. when they are not present and
>point them to default locations ?
>I checked in Xfce and KDE, and I find out that Xfce sets some of them, 
>but KDE does not at all.

We (Xfce) set the ones that make our startup scripts easier.  It's up
to the applications to also know what the defaults should be in case
some (or all) of them aren't set.

For an app-level implementation, never assume that the desktop
environment (if any!) has set the XDG_* env vars.  Just hard-code the
defaults and use those for variables that are unset.  You can choose to
have EDE set them or not on desktop startup, but the applications should
to be able to handle the case where they're not set.


More information about the xdg mailing list