Gstreamer error: XDG_RUNTIME_DIR not set in the environment

The solution from this answer worked for me

To make it easy - more explained the new booting of my system.

After all explanations here I came to the result - and "env" in terminal said already that is right for these session:

These two rows to use the environment variable:

for the tmp behavior I have chosen:

mkdir -pv ~/.cache/xdgr

For setting the environment variable:

export XDG_RUNTIME_DIR=$PATH:~/.cache/xdgr

After closing the terminal and a new open for the recall of env they tells:

XDG_RUNTIME_DIR=/run/user/1001