XDG Base Directory Specification

Kjetil Torgrim Homme kjetil.homme at redpill-linpro.com
Thu May 14 11:44:45 CEST 2020


On 14/05/2020 09.28, password-store at storiepvtride.it wrote:
> Am 14.05.20 um 07:55 schrieb Serpent7776:
> 
>>> Maybe a good strategy could be to check in this order:
>>>
>>> ~/.password-store
>>> $XDG_CONFIG_DIR/.password-store
>> Shouldn't this be:
>>
>> ~/.password-store
>> $XDG_DATA_HOME/.password-store
>>
>> As I understand XDG_CONFIG_DIR should contain configuration files. Password
>> store is data, not configuration - so it should go to XDG_DATA_HOME.
> 
> Ah right, you're probably correct here, thanks for pointing that out!

to pick further nits - inside $XDG_DATA_HOME we should not be using 
hidden files, so make it $XDG_DATA_HOME/password-store

you can look at what others do, this should be ~/.local/share when 
XDG_DATA_HOME is not set.  to summarise, this should be the order used:

   $PASSWORD_STORE_DIR
   $HOME/.password-store
   ${XDG_DATA_HOME-$HOME/.local/share}/password-store

if none of these exist, the last value should be used as the default 
place to initialise a password store so new installations are compliant 
with the XDG.

-- 
Kjetil T. Homme
Redpill Linpro - Changing the Game


More information about the Password-Store mailing list