Why GNOME Display Manager always read .profile?
Your problems with .bashrc
are unrelated. .profile
needs to be compatible with all sh
-compatible shells, whereas of course .bashrc
is specific to Bash and should generally not be sourced by other shells.
Generally, put the stuff you want to share between shells in .profile
, and make sure you do source it from the startup files of your other shells (unless of course they already do that by default).
Obviously, you need to make sure you avoid code which behaves differently in different shells (lack of quoting is okay in Zsh but a problem in properly Bourne-compatible shells, for example).
As for the "why" part of your question, this is so that settings in your .profile
are available to programs you run from your GUI session, not just by the ones you run from within a shell (or maybe we should say "traditional" shell, and regard your GUI session as a "non-traditional" shell).