How to set an environment variable when starting an application

There’s a neat trick with systemd (your case on Fedora), where you can create a file in your home directory and it will exported session wide.

Create, for example:
.config/environment.d/00-ardour-bug-8280.conf

And inside just put the var you want:
LV2_PATH=your-value

Your GNOME Session should pick that up automatically on login, and all apps and processes will see it available. It works fine for me for a few apps.

4 Likes