I recently switched from terminal prompt login (getty?) to GNOME Display Manager. It seems that GDM always reads
.profile, regardless of user's setting of login shell (Zsh in my case). Why is that? I assume it's hardcoded in their source, but I can't find. Why did they do that? Does the software depends on some functionality of Bourne shell?
This is not very good if I want to use both GDM and getty (as fallback), because I then need to keep my
.zprofile in sync. I'm not so confident about sourcing
.zprofile (I met some compatibility issues before, when I tried to source
.zshrc). I think Bash called as
/bin/sh behaves in POSIX mode, but I'm not sure whether it avoids all the pitfalls.
In case it matters, I'm on latest Arch Linux, running GNOME with Wayland (so there should not be any
Xsession script involved).