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, 05 Dec 2014 00:10:35 +0100 Message-ID: <87oarjqadw.fsf@gnu.org> References: <87k32gtz2p.fsf@gmail.com> <87mw7cjt7b.fsf@gnu.org> <87mw7b74ar.fsf@gmail.com> <8761dzynah.fsf@gnu.org> <87vblyy9ia.fsf@gmail.com> <87egsjcyst.fsf@gnu.org> <87wq6aun7b.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]:39744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwfXo-0001Cn-BD for guix-devel@gnu.org; Thu, 04 Dec 2014 18:10:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XwfXi-00057e-SH for guix-devel@gnu.org; Thu, 04 Dec 2014 18:10:44 -0500 Received: from hera.aquilenet.fr ([2a01:474::1]:48559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwfXi-000574-3m for guix-devel@gnu.org; Thu, 04 Dec 2014 18:10:38 -0500 In-Reply-To: <87wq6aun7b.fsf@gmail.com> (=?utf-8?B?IuWui+aWh+atpiIncw==?= message of "Tue, 02 Dec 2014 22:43:20 +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: [...] >>>> 3. The skeleton for ~/.bash_profile sources /etc/profile, /etc/bashr= c, >>>> and ~/.bashrc. >>>> >>>> 4. The definition of PS1 is moved from /etc/profile to /etc/bashrc. >>>> >>>> 5. The skeleton for ~/.bashrc sources /etc/bashrc. >>> It seem too much, what I suggested is: >>> for login, su (pam_env): /etc/environment >>> for login shell: ~/.bash_profile, ~/.zlogin >>> for interactive: ~/.bashrc, ~/.zshrc >>> skeletons only installed when needed :) >> >> As a first step, what about always installing the skeletons? Then we >> can see whether/how to refine that. [...] > From 1e400957b29a47f63548df39b36a7c0f1d8a37d9 Mon Sep 17 00:00:00 2001 > From: =3D?UTF-8?q?=3DE5=3DAE=3D8B=3DE6=3D96=3D87=3DE6=3DAD=3DA6?=3D > Date: Tue, 2 Dec 2014 21:40:52 +0800 > Subject: [PATCH] gnu: Add /etc/environment. > > * gnu/system.scm (default-/etc/environment): New procedure. > (etc-directory)[profile]: Remove it. > (etc-directory)[environment]: Add it. > * gnu/system/linux.scm (unix-pam-service): Add #:readenv? parameter. > * gnu/services/base.scm (mingetty-service): Pass #t as #:readenv? > to unix-pam-service. > * gnu/system/shadow.scm (default-skeletons): Add .bash_profile. Adjust .b= ashrc. So you ended up choosing pam_env? I thought we had concluded that it wasn=E2=80=99t needed, no? If it can be avoided, it=E2=80=99s better to do= so, IMO. > + (mlet %store-monad ((bash-profile (text-file "bash_profile" "\ > +# honor ~/.bashrc if the shell is interactive > +[[ $- =3D=3D *i* ]] && source ~/.bashrc I don=E2=80=99t think the test is needed, because ~/.bash_profile is only r= ead by interactive Bash. > +# load system-wide environment varibales > +source /etc/environment > + > +# common varibales for user profile > +export PATH=3D$HOME/.guix-profile/bin:$HOME/.guix-profile/sbin:$PATH > +export INFOPATH=3D$HOME/.guix-profile/share/info:$INFOPATH\n")) > + (bashrc (text-file "bashrc" "\ > +PS1=3D'\\u@\\h \\w\\$ ' I think PS1 should go to /etc/profile. WDYT? Thanks! Ludo=E2=80=99.