Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zprofile and .profile sourcing
On Thu, 8 Sept 2022 at 22:47, Eric Cook <llua@xxxxxxx> wrote:
>
> On 9/8/22 17:42, Eric Cook wrote:
> >
> > One of more possible things around your display manager is happening,
> >
> > 1) not using your login shell to start graphical environment, but does uses a shell that reads .profile
> > 2) it is manually checking for and sourcing it before starting the graphical environment, possibly with or without your login shell
> > 3) something else unrelated to zsh.
> >
>
> And is seemingly documented on the archlinux wiki: https://wiki.archlinux.org/title/LightDM#X_session_wrapper
Thanks. In /etc/lightdm/Xsession there is:
# Load profile
for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile"
"$HOME/.xprofile"; do
if [ -f "$file" ]; then
echo "Loading profile from $file";
. "$file"
fi
done
This means "$HOME/.profile" is loaded.
However in /etc/zsh/zprofile there is:
emulate sh -c 'source /etc/profile'
so I would expect /etc/profile to be loaded in all cases, even when
not logging in over lightdm, and "$HOME/.profile" being sourced
because 'emulate sh' which calls zsh in sh compatibility mode?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author