I recently decided to compile and install a package that is required for work, and this package is compatible with a package that I had before. Let’s call them A and B.
A and B are incompatible with another.
To get A to work I need to set the environmental variable
now, I have current work-around to make sure everything is working, but I came across a larger mystery.
How would I find where the environmental variables are set?
Something is setting the two environmental variables prior to .bashrc
I have been trying searching online for a very long time, and a very well experienced technician told me he ran in the same problem and he’s not sure. He suggested that this has something to do with KDE.
Mind you, the package A and B are NOT installed via zypper, and they were just simply compiled and linked manually. I would appreciate an input from someone more experienced.
It is not quite clear to me what your problem is. You do not tell (and show) us what you do, what you expect to happen and what happened instead. These three parts are the main points of defining a problem ;).
When I read your title, the answer is:
Environment variables are a property of every process. They are inherited by a child process from it’s parent process.
Thus any environment variable defined in a process at it’s start is inherited from it’s parent or set there by the kernel (which of did the hard work in starting the process). A process can then remove, add, change environment variables (not all, some are protected) for it’s own usage or to pass them on to child processes.
The PATH variable is one normally set and used by the shell (in your case probably bash). But it is of course available to all child processes started from a bash process.
man bash
will tell you a lot about the PATH variable. It will have a (system installation dependent) start value. A user can change it e.g. in .profile (included when login shell is started) and/or .bashrc (included at every bash start).