Alright, I took a closer look at the man page and this caught my eye:
ENV If this parameter is found to be set after any profile files are
executed, the expanded value is used as a shell start-up file.
It typically contains function and alias definitions.
And it seems that the usual way to have a .kshrc is to set ENV=~/.kshrc.
But to get to the actual bug: We've agreed that the documentation makes
it clear that .profile and /etc/profile are sourced only if the shell is
a login shell. Here's what I noticed:
1) running 'ksh -l' definitely gives you a login shell. And ~/.profilie does
get sourced when you run 'ksh -l'
2) gnome-terminal doesn't seem to run ksh as a login shell even if you ask it
to by clicking "run command as a login shell" in its preferences. It doesn't
seem to work for bash either. However, you can set the custom command to run
'ksh -l' and that seems to work. So maybe this is a bug against gnome-terminal.
3) ssh doesn't seem to run a login shell when you login. Didn't work for ksh
or bash. I tested by seeing if .profile got sourced (or in the case of bash,
.bash_profile didn't get sourced). $- also doesn't contain an "l" after
logging in.
Does that match up with your experience?
--
pdksh's operation conflicts with documentation, /etc/profile and ~/.profile are
not read
https://launchpad.net/bugs/49633
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs