gnome: Fedora/CentOS source .bash_profile but Ubuntu/Debian source .bashrc
I understand since "Run command as a login shell" is usually
UNTICKED under Gnome Terminal -> Menu Bar -> Edit -> Profiles -> Edit -> "Title and Command" whenever I open a terminal, I just don't understand why Fedora/CentOS source the .bash_profile (which in turns source .bashrc conveniently with Quote:
What makes Fedora/CentOS decides to source .bash_profile (i.e., it knows that it is login screen) ?? |
Have you tried reading and comparing the differences between the Debian and Redhat bash man pages?
Evo2. |
Huh? I don't believe they are different since there is only one bash man pages. I think different distros tweak the customization differently.
|
I have this theory:
Fedora and Ubuntu cannot agree on the login shell definition. When a user logins to the gnome session, Fedora considers that as a login shell and it sources the .bash_profile once (and .bashrc too since .bash_profile has a line to source .bashrc). However, Ubuntu/Debian does not consider that as a login shell since the default setting when invoking a gnome terminal is not to run it as a login shell according to the unticked status of "Run command as a login shell", so it ignores .bash_profile but sources .bashrc instead. Strictly speaking, when a user login, one would consider that as a login shell according to the logic of Fedora, but this `violates' the default setting of unticked status of "Run command as a login shell". If my theory is right, then it just shows that they are too much entropy in the linux world... Personally, I find this PATH=$PATH:blahblah is so confusing. I would like to put it in .bash_profile since we want to source PATH=$PATH:something once or else $PATH gets longer and longer (such as the Xcrysden configure sticks add the software to .bashrc and this is rather unwieldy, the best place to put PATH=$PATH should be in .bash_profile. |
Quote:
The bash man page in Debian is quite explicit about the shell invocation. Quote:
Evo2. |
believe or not, "man bash" does not belong to any distro. Anyway, you have to base on common sense to decide certain things.
|
Quote:
*plonk* Evo2. |
All times are GMT -5. The time now is 02:22 PM. |