Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zprofile and .profile sourcing
- X-seq: zsh-users 28059
- From: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- To: Piscium <groknok@xxxxxxxxx>
- Cc: zsh-users@xxxxxxx
- Subject: Re: zprofile and .profile sourcing
- Date: Thu, 8 Sep 2022 18:14:51 -0500
- Archived-at: <https://zsh.org/users/28059>
- In-reply-to: <CAFMg86us4mMjoxT4O0EGGHnKdKwWbV=2ZON5kz6UAkBXGoVJYQ@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAFMg86us4mMjoxT4O0EGGHnKdKwWbV=2ZON5kz6UAkBXGoVJYQ@mail.gmail.com>
On Thu, Sep 8, 2022 at 4:37 PM Piscium <groknok@xxxxxxxxx> wrote:
>
> I have been trying (unsuccessfully) to figure out why ~/.profile is
> sourced in some cases and not in others.
> The Zsh man page says (in different sections):
> "Login shells source /etc/profile followed by $HOME/.profile."
That's only in sh or ksh compatibility mode.
> "If the shell is a login shell, commands are read from
> /etc/zsh/zprofile and then $ZDOTDIR/.zprofile."
As Eric Cook already pointed out, the display manager sources
~/.profile for you when you login, but that doesn't happen in the
console, you need to source ~/.profile from ~/.zprofile.
I actually created a video going step by step on how to create a
proper configuration [1], and I also maintain a very simple
configuration that should be generic enough for everyone [2].
Cheers.
[1] https://youtu.be/ESEP7WezCqY
[2] https://github.com/felipec/dot-team
--
Felipe Contreras
Messages sorted by:
Reverse Date,
Date,
Thread,
Author