Monday, April 26, 2021

.profile not being loaded (ksh) when opening shell in X

I have some custom additions to my $PATH. They're defined in ~/.profile
and they are correctly loaded when I log in from a text console.

When I log in to X (cwm) and open a terminal window, $PATH does not
contain the entries.

I tried `chmod +x` on my .profile but that didn't help.

Both the text console and the X terminal window are using ksh.

When I call `/bin/ksh -l` then the resulting shell contains the correct
additions to $PATH.

It looks like the custom $PATH is not being passed from the login shell
on downwards, since ~/.profile is only read by a login shell.

~/.kshrc is (according to ksh(1)) read by every spawning shell, but I
don't see any documentation or examples on the Internet where someone
defined their $PATH in ~/.kshrc ...

What's the correct way to set $PATH and have it stick no matter where
and when the shell is spawned?

No comments:

Post a Comment