| > An interactive shell can be a login-shell or a non-login-shell. A shell can be login and non-interactive. This happens e.g when starting a session from a X session manager. Subsequently a terminal such as Xterm starts non-login interactive sessions, inherits stuff like env vars like PATH from the login shell, and is only concerned with setting up the additional interactive stuff. Similarly doing ssh <host> <command> starts a non-interactive login shell. > However, bash behaves like an interactive non-login shell in this case and reads `bashrc`. IIRC nope: distros such as Debian often have bashrc source bash profile (or the other way around, I can't recall) which has me irate to no end+. They even have some TTY dependent stuff in profile which spits out some error in some cases when no TTY is allocated because heh not interactive. + I took great length to have my rc and profile properly separated because it's that much faster not to source the unneeded stuff (at the cost of having to logout to apply login stuff) https://github.com/lloeki/dotfiles |
Interesting, is there a source for this? Genuinely interested, because the manpage leaves this part a bit vague:
Sadly, the manpage for sshd also doesn't mention how exactly the users shell is invoked. It does say however: ...which I took to understand that the shell dows in fact run as an interactive shell.> IIRC nope: distros such as Debian often have bashrc source bash profile
Well, these are distro dependent things. Since I am not on Debian, I am just refering to the manpage.