zsh-users
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Piscium <groknok@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re: zprofile and .profile sourcing
Date: Thu, 8 Sep 2022 18:14:51 -0500	[thread overview]
Message-ID: <CAMP44s0+XAzUpy53EQ+p5hKw=jBG-ROmCz9s=bRon=d5dpc_uA@mail.gmail.com> (raw)
In-Reply-To: <CAFMg86us4mMjoxT4O0EGGHnKdKwWbV=2ZON5kz6UAkBXGoVJYQ@mail.gmail.com>

On Thu, Sep 8, 2022 at 4:37 PM Piscium <groknok@gmail.com> 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


      parent reply	other threads:[~2022-09-08 23:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08 21:37 Piscium
2022-09-08 21:42 ` Eric Cook
2022-09-08 21:45   ` Eric Cook
2022-09-08 22:12     ` Piscium
2022-09-08 22:30       ` Lawrence Velázquez
2022-09-08 22:45         ` Piscium
2022-09-13  7:28           ` Piscium
2022-09-08 23:14 ` Felipe Contreras [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMP44s0+XAzUpy53EQ+p5hKw=jBG-ROmCz9s=bRon=d5dpc_uA@mail.gmail.com' \
    --to=felipe.contreras@gmail.com \
    --cc=groknok@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).