On 12/9/17 6:41 PM, Yuri wrote: > On 12/09/17 15:24, Chet Ramey wrote: >> Of course not: that's not a login shell. As the documentation says, >> >> "A login shell is one whose first character of argument zero is a -, or >> one started with the --login option." >> >> The INVOCATION section of the manual page explains it in exhaustive detail. > > > Ok, but that's not what my situation is. I am just logging in, using the > display manager, when user has /usr/local/bin/bash as the shell in passwd.
Of course it's what your situation is. You're logging in, and you want some shell in the sequence (you haven't said exactly which one) to be started as a login shell and run the login shell startup files. So if you think about it logically, here's how the startup sequence probably goes: display manager authenticates the user, starts the user's window manager, window manager starts up whatever apps its startup config files specify, one of which is probably a terminal window. It's that shell (the one running in the terminal emulator) that determines whether it's a login shell -- based on the criteria listed in the man page -- and sources the appropriate startup files. > Why doesn't it execute ~/.profile? That's what you have to figure out. You have to determine why the shell that is started by the terminal emulator is not started as a login shell, if that's what you want to have happen. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/