You are not logged in.
The basedir spec says, "If $XDG_RUNTIME_DIR is not set applications should fall back to a replacement directory with similar capabilities and print a warning message." What would be a good replacement directory which is also available on other Unix systems? My thought is to try in order /run/user/$UID, /var/run/user/$UID, and then may be something in $HOME or /tmp.
Last edited by fsckd (2016-02-24 04:53:50)
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
Hmm, there are very rarely that many musts in a specification like that. Sticking to those criteria would rule out anything under $HOME and probably /tmp too. /var/run/user/$UID then /run/user/$UID are the only ones that make sense to me. If both of those are absent it seems like a moot point to me - put the data wherever convientient at that point. If the filesystem hierarchy standard isn't used on a system, would users of that system be mad that your program didn't abide by the XDG specificiation? The former seems (to me) to be a higher level than the latter. So trying to abide by the XDG on a non FHS system just seems silly.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks, that's a reasonable way to look at it. Between $HOME and /tmp, /tmp is perhaps the better choice. The files can be given restricted permissions and will likely be cleared on reboot.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline