Things are a little more complex than just what your shell provides.
There are three main ways to login:
- login from a true terminal (nowadays, mainly the console)
- login from a pseudo-terminal (mainly network connections)
- login from a graphic environment
They all are able to set up the environment before executing your shell, and they all do (
TERM are probably not set by your shell, and even if you have no start-up files, your shell usually inherits the
PATH environment variable).
When logging in from a true terminal, the process handling the connection will probably set up the
TERM environment variable and delegate the rest of the work to the
login program. That program does some verifications (such as preventing login for root on insecure terminals), ensures that the whole environment excepted
TERM is clean, initializes
LOGNAME and then launch your login shell. Your shell will then do its own initialization.
When logging in from a pseudo-terminal, the same things happen with a little twist. Often the environment gets more initialization from the process handling the connection than just the
TERM environment variable (network protocols often have a way to transfer the environment from the other side) and thus
login is used in a mode in which it doesn't clean the environment, the clean up is done by the program handling the connection.
Graphic environments usually don't delegate to
login but behave similarly. After verifying your credentials, they create a clean environment (with usual environment variable and at least
DISPLAY set correctly; they often allow a sysadmin provided script to add things) then launch the start up script for your desktop environment; those may try to get the environment from your login shell and also often provide the possibility to provide a script to complete the set up. So when you launch any program from your desktop, its environment is the combination of what the graphical login program, your desktop environment and your login scripts set.
One last thing: when you launch a terminal emulator, you may get either a login shell (in which case the login script from the shell is executed and thus you get to see the effect of your latest changes in it, but won't see the same environment as the other programs) or not (in which case the login script from the shell isn't executed, you don't see your latest changes, but you get the same environment as the other programs — modified by the interactive initialization script of your shell).