I need an environment variable KEY="value" made available to a GUI application before starting it. The launcher file (the one that places the icon on the desktop and sidebar in Ubuntu) has a value of Exec=/path/to/executable/file.
When using ZSH, where should I define this variable so that it is available to that application whether I click the application launcher or whether I directly type /path/to/executable/file in my shell?
In my command line prompt, I tried typing both KEY="value" and export KEY="value" before clicking the launcher, but it didn't seem to work. I also tried both of those lines in my ~/.zshrc, did a source ~/.zshrc from my shell then clicked the launcher again, but that also didn't work.
Which file should it go in? I believe have a choice of ~/.zshenv, ~/.zprofile, ~/.zshrc, and ~/.zlogin.
(For bonus points, should I use export or not?)
(Am I required to at least log out and log back in, before the variable becomes available to the application when it's launched from the launcher?)