Suppose that some random program Foo
- modifies its behavior according to the values of environment variables; and
- can be started by clicking on some Foo icon available through a graphical desktop.
Let's assume, for the rest of this post, that every instance of Foo under discussion was, or will be, started as described in (2) above. IOW, for this post, rule out the possibility of starting Foo via some command line.
For concreteness, let's also assume that the current X11 session was started "manually" by the user; i.e. by typing
startx on the (text interface) command-line at some point after a (text-interface) login 1.
Now, AFAICT, by default, the environment inherited by every instance of Foo is the one in place at the time the user executed
startx2. (Please, correct me if I'm wrong.)
My question is: Is there some generic way (i.e. independent of Foo) for me to modify the environment inherited by subsequent instances of Foo (or at least by the next instance of Foo that gets started)?
Anticipating the possibility that the answer to the (general) question above is "No", below I provide some specific details, in the hope that the more specific variant of the question will have the answer "Yes":
- at the moment I'm particularly interested in the case where Foo happens to be Terminator (a terminal emulator);
- my shell is
- my desktop is xfce4 + xfwm4.
1If the answer to this question would be different if X11 session was started automatically after the user logged in via a graphical login, please let me know.
2Or perhaps it would be more precise to say that the inherited environment is that consisting of the exported shell variables, and their values, as they were when the user invoked
startx. I expect that even this more carefully worded description is, at best, an oversimplification, but I hope not such an extreme one as to render the rest of the post moot.