If XDG_RUNTIME_DIR is set, put the socket file there.
If not, default to storing it in our data dir. We cannot default to a path such as /run/user/$UID/ because it does not exist on all systems. Any system running systemd will set this var by default, and ensure that the directory it points to is correctly setup.
Resolves #2153
Checks
[ ] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
[ ] I have checked that there are no existing pull requests for the same thing
If XDG_RUNTIME_DIR is set, put the socket file there.
If not, default to storing it in our data dir. We cannot default to a path such as /run/user/$UID/ because it does not exist on all systems. Any system running systemd will set this var by default, and ensure that the directory it points to is correctly setup.
Resolves #2153
Checks