Sample Header Ad - 728x90

In XDG Base Directory Specification what if $HOME is unset or empty

3 votes
1 answer
786 views
Personally I'd like to adhere to to XDG Base Directory Specification to make my utility more portable. However when doing so it requires me to re-implement for systems that do not have the XDG_ parameters implemented. This on it's own is not much of a problem as the XDG Base Directory Specification covers this detailing what to do instead. For example if XDG_DATA_HOME is unset or empty use ~/.local/share instead. However what to do if $HOME is unset or empty? Should I adhere to the system wide options at least for where it is in the XDGBDS given (e.g. no $HOME but more /etc/*something* etc.)? Honestly I have very little experience under which circumstances $HOME actually is empty, so it's hard for me to decide well here.
Asked by hakre (457 rep)
Dec 12, 2019, 11:07 PM
Last activity: Dec 13, 2019, 07:30 PM