>I think you should error out on a missing XDG_RUNTIME_DIR, as I agree its path is highly a matter of policy and should be set. However, for other XDG variables, I’d rather have the standard fallback be used. On my systems, XDG_RUNTIME_DIR is usually the only XDG variable set, I’ve never bothered with the others, and some pam plugins only set XDG_RUNTIME_DIR.
We can have a HOME fallback then, all right.
>So in my opinion, the process should be:
>- list whether HOME or XDG variables are undefined
>- grep the config file for occurences of those
>- if HOME or XDG_RUNTIME_DIR matches, fail
>- if any other XDG variable matches, fail if HOME is undefined
There's some tricky flowchart to make to optimize the order of
operations
and avoid grepping several times, but yeah, that sounds sane.
--
Laurent
Received on Wed Sep 23 2026 - 20:56:09 CEST