zsh-users
 help / color / mirror / code / Atom feed
From: Piscium <groknok@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re: zprofile and .profile sourcing
Date: Thu, 8 Sep 2022 23:12:01 +0100	[thread overview]
Message-ID: <CAFMg86shQp+-kOd3WPTakhU8GtbNoLE7CKBYtZ5_Swbb_DPPcA@mail.gmail.com> (raw)
In-Reply-To: <91037551-fa22-610e-ec6d-a350d69b80cf@gmx.com>

On Thu, 8 Sept 2022 at 22:47, Eric Cook <llua@gmx.com> 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?


  reply	other threads:[~2022-09-08 22:13 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 [this message]
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

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=CAFMg86shQp+-kOd3WPTakhU8GtbNoLE7CKBYtZ5_Swbb_DPPcA@mail.gmail.com \
    --to=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).