Skip to content

wlheadless: Set sensible defaults for XDG dirs

Olivier Fourdan requested to merge fix-xdg-variables-default into main

The specification says:

 | $XDG_DATA_HOME defines the base directory relative to which user-
 | specific data files should be stored. If $XDG_DATA_HOME is either
 | not set or empty, a default equal to $HOME/.local/share should be
 | used.

And:

 | If $XDG_DATA_DIRS is either not set or empty, a value equal to
 | /usr/local/share/:/usr/share/ should be used.

Set the default values according to the specifications, so that the configuration file can be found even if either or those environment variables is not set.

See-also: https://specifications.freedesktop.org/basedir-spec/latest/index.html#variables

Merge request reports