This question already has an answer here:
Considering that environment variables defined in a shell are available to the child processes of the shell.
When we open a terminal, it reads .bashrc and executes its commands. That means the .bashrc is available to all the terminals.
I want to know whether the environment variables of bashrc are available to those scripts which are run periodically at fixed intervals? i.e. We manually do not open a terminal to run these scripts.
What if I start QtCreator by clicking on the desktop icon? Will the environment variables of bashrc be available to this QtCreator process? Why?
If not, then what will be the way to supply environment variables to those scripts which do not physically open a terminal?
Please include references while answering.