I have been trying to understand shell scopes and environment in depth. I have been reading about how if
export VARIABLE=VALUE it will be available in subshell. So I wanted to ask a question I had in mind.
If I understand right, if we execute a binary program by a script file, it will be able to see environment variables because, environment variables that are set through terminal in linux( let's say debian ) are visible to all programs run by a script file.
So my question and confusion is, whether there is a shell that is the parent of all. I am kinda confused about hierarchy. When I open terminal in debian, and type
export VARIABLE=VALUE, is this going to be visible to all script files, even if I run them by double clicking at the desktop ?
I hope my question is not vague and suitable for serverfault.