Ed Greshko wrote:
Paul Allen Newell wrote:
I think part of my confusion is that I am not understanding whether a login shell covers everything that is done once I have logged in via splash screen or if it is confined to "logining into a shell". If the former, then I would assume bash_profiles is hit once and everything done thereafter would be under its command. If the latter, then I am probably unclear about whether launching a terminal is a "login" act (hence under bash_profile only within that shell).
As I said on my initial reply to this thread, "Naive question". I may be missing a fundamental understanding of shells and logins and all that sort of stuff.
A login shell is what it says it is. A shell created as a consequence of logging in. That could be a console login in run level 3, the GUI login screen in run level 5, an ssh login from a remote system, etc. Starting, for example, "gnome-terminal", does not constitute a login shell.
I also forgot to mention the "-i and -l" parameters on the #!/bin/bash line of a shell script that would also affect the type of shell.
One thing you can do to learn when .bashrc and .bash_profile are sourced is to add something like....
touch /tmp/bashrc.time to the end of your .bashrc file and a similar line to your .bash_profile. Then you can "ls -l --time-style=full-iso" (to display the seconds).
I also think you may want to learn about PID's and PPID's (Process ID, and Parent Process ID).