Allow changing of XDG_BASE standard gnupg directory
Hello, I changed on my Linux System my default folder from ~/.gnupg to ~/.config/gnupg after the free desktop XDG_BASE_DIRECTORY standard. It's possible to implement a hierarchy how gajim find the gnupg default directory to de- and encrypt messages if it's changed from ~/.gnupg?
Here is my proposal,
- If the environment variable $GNUPGHOME is set, use this directory as home for gnupg
- If the environment variable $GNUPGHOME isn't set, but the variable $XDG_CONFIG_HOME, use $XDG_CONFIG_HOME/gnupg as fome directory for gnupg
- If one of this variable are set, check it the directory ~/config exists and create an use the directory ~/.config/gnupg as default directory
- The last option is, that gajim use the old directory ~/.gnupg as default directory.
Link 1: https://wiki.archlinux.org/index.php/XDG_Base_Directory_support Link 2: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Volker