Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XDG_RUNTIME_DIR on Mac OS X

Tags:

macos

Does Mac OS X implement the XDG Base Directory Specification? If not, what's the equivalent of $XDG_RUNTIME_DIR? An application I help maintain needs a temporary directory in which binary (i.e., executable) files can be placed and executed. So this directory should be preferably unique to the user and must be guaranteed to allow files to have the executable bit set (if such a thing exists on the file systems used by Mac OS X).

like image 274
Psychonaut Avatar asked Nov 13 '22 13:11

Psychonaut


1 Answers

According to the spec:

$XDG_RUNTIME_DIR defines the base directory relative to which user-specific non-essential runtime files and other file objects (such as sockets, named pipes, ...) should be stored. The directory MUST be owned by the user, and he MUST be the only one having read and write access to it. Its Unix access mode MUST be 0700.

There is not much other guidance given. I believe this to mean that you can put this in any folder in your $HOME. I posit that there's not much reason why this couldn't be the same as your $XDG_CACHE_HOME if the permissions are right and the data is cache-like.

like image 53
mattmc3 Avatar answered Nov 15 '22 07:11

mattmc3