On systemd, you can use ~/.config/environment.d to set it. Don't rely on your shell.