From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: use zsh as login shell Date: Fri, 28 Nov 2014 23:26:30 +0100 Message-ID: <8761dzynah.fsf@gnu.org> References: <87k32gtz2p.fsf@gmail.com> <87mw7cjt7b.fsf@gnu.org> <87mw7b74ar.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuTzq-0000SD-Q7 for guix-devel@gnu.org; Fri, 28 Nov 2014 17:26:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuTzl-0006RT-CH for guix-devel@gnu.org; Fri, 28 Nov 2014 17:26:38 -0500 Received: from hera.aquilenet.fr ([2a01:474::1]:43123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuTzl-0006RE-5e for guix-devel@gnu.org; Fri, 28 Nov 2014 17:26:33 -0500 In-Reply-To: <87mw7b74ar.fsf@gmail.com> (=?utf-8?B?IuWui+aWh+atpiIncw==?= message of "Fri, 28 Nov 2014 23:06:36 +0800") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?utf-8?B?5a6L5paH5q2m?= Cc: guix-devel@gnu.org =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > Ludovic Court=C3=A8s writes: > >> =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: [...] >>> IMO, we should use `/etc/environment' for system variables: >>> LANG=3Den_US.UTF-8 >>> PATH=3D/run/current-system/profile/bin:/run/setuid-programs >>> And add `pam_env.so' to /etc/pam.d/login, to make tty login work. >>> >>> With `/etc/profile', `/etc/zlogin' just: >>> source /etc/environment >>> to make `bash -l' and `zsh -l' work. >> >> Is =E2=80=98pam=C2=A0env=E2=80=99 needed at all if /etc/profile and /etc= /zlogin are provided >> anyway? > Yes, it's redundant. > Now I think the better way is just provide /etc/environment. > then `bash -l' would take ~/.bash_profile and ~/.profile. > We can have a default ~/.bash_profile like: > source /etc/environment > export PATH=3D$PATH:$HOME/.guix-profile/bin Currently, the .bashrc skeleton sources /etc/profile. So, instead of what you suggest, what about having: 1. /etc/profile and /etc/zlogin (?) both source /etc/environment, which uses plain Bourne syntax. 2. PATH is defined in /etc/environment and includes ~/.guix-profile/bin. 3. The skeleton for ~/.bash_profile sources /etc/profile, /etc/bashrc, and ~/.bashrc. 4. The definition of PS1 is moved from /etc/profile to /etc/bashrc. 5. The skeleton for ~/.bashrc sources /etc/bashrc. ? (I was reading the Bash manual to make sure (info "(bash) Bash Startup Files"), and as an exercise, I=E2=80=99ve cleaned up my own ~/.bashrc and ~/.bash_profile accordingly, which fixes the issue I reported a couple of weeks ago regarding =E2=80=98guix environment=E2=80=99.) Thanks, Ludo=E2=80=99.