Fwd: $XDG_RUNTIME_DIR

Thomas Kluyver thomas at kluyver.me.uk
Wed Dec 5 14:31:22 PST 2012


On 5 December 2012 22:14, David Faure <faure at kde.org> wrote:

> OK, so /run/user/ is a better default, when available, than /tmp, I'll
> adjust
> my code. Thanks for pointing this out, it looks like I didn't take this
> into
> account.
>

/run/user was created for this use, though, so systems that don't have
$XDG_RUNTIME_DIR set probably won't have /run/user. My Ubuntu 12.04
installation doesn't have either, while 12.10 does have both. And you can't
create a directory in /run, because it's not user-writable.

I went too far in one direction (fallback without warning), you're going too
> far into the other one (no fallback), I think we should both do what the
> spec
> says: fallback, with a warning :-)
>

I'm still not convinced that I am going too far. The runtime directory is
supposed to have a very precisely specified set of properties that
application authors can depend on. Silently (a stderr warning is all but
silent for GUI developers) falling back to a substitute that *probably*offers
*most* of the same features sounds like a recipe for hard to find bugs and
security holes. I think there's a real argument for forcing application
developers to think about the problem themselves.

Also, while it's unclear how this will be used, I'm inclined to be
conservative. If consensus develops on a suitable fallback, I can add a
wrapper function to use it. But if I provide a fallback and later decide it
was a mistake, removing it would break a lot of code.

Best wishes,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xdg/attachments/20121205/1a66a9b8/attachment.html>


More information about the xdg mailing list