Any ultimate Guide on how to use KiCad 4 and 5 on one System?

As I mentioned in another thread:

“I have been writing a HowTo/FAQ which should help with environment variables. It’s mostly meant for the possibly soon coming KICAD_CONFIG_HOME feature but includes the library paths, too. Here is a preview: https://docs.google.com/document/d/1Rq8i2Ay7qpGpffaj-AQmE-Xp88ikHhgyt0Ygpi8717o/edit?usp=sharing

The idea of using XDG_CONFIG_HOME on every platform was problematic (see the above mentioned mailing list thread for details). The latest suggestion by Wayne was to use KICAD_CONFIG_HOME which would override, if set, the default config directory on every platform. I tested the patch on Linux and it works. The HowTo instructions give details on how to use use v4 and v5 side by side with this new and other environment variables. It’s a work in progress and not tested yet. Please comment.