guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: move "source /etc/profile" from .zlogin to .zprofile


From: Meiyo Peng
Subject: Re: move "source /etc/profile" from .zlogin to .zprofile
Date: Sun, 14 Oct 2018 03:14:08 +0000

Hi Chris,

/etc/profile should do the preparation work for users settings in .zshrc. But
since .zlogin is sourced after .zshrc, it will override users settings in
.zshrc. It resets $PATH and many other environment variables. This is
counterintuitive.

You can find what archlinux did here: https://wiki.archlinux.org/index.php/Zsh
  • /etc/zsh/zprofile Used for executing commands at start, will be sourced when starting as a login shell. Please note that on Arch Linux, by default it contains one line which source the /etc/profile.
    • /etc/profile This file should be sourced by all Bourne-compatible shells upon login: it sets up $PATH and other environment variables and application-specific (/etc/profile.d/*.sh) settings upon login.
  • $ZDOTDIR/.zprofile Used for executing user's commands at start, will be sourced when starting as a login shell.
  • ...
  • $ZDOTDIR/.zshrc Used for setting user's interactive shell configuration and executing commands, will be sourced when starting as an interactive shell.
  • ...
  • $ZDOTDIR/.zlogin Used for executing user's commands at ending of initial progress, will be sourced when starting as a login shell.

On Sun, Oct 14, 2018, 09:34 Chris Marusich <address@hidden> wrote:

Is the intended use of .zprofile any different from the intended use of
.zlogin?  If .zprofile and .zlogin are both meant to serve the same
purpose, then I'm not sure why one would be preferable over the other.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]