From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?5a6L5paH5q2m?= Subject: Re: use zsh as login shell Date: Fri, 28 Nov 2014 23:11:10 +0800 Message-ID: <87lhmv7435.fsf@gmail.com> References: <87k32gtz2p.fsf@gmail.com> <87mw7cjt7b.fsf@gnu.org> 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]:49989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuNCa-0003VR-Au for guix-devel@gnu.org; Fri, 28 Nov 2014 10:11:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuNCU-0000sP-RX for guix-devel@gnu.org; Fri, 28 Nov 2014 10:11:20 -0500 In-Reply-To: <87mw7cjt7b.fsf@gnu.org> 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s writes: > =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > >> Currently, zsh doesn't work out of box. > > On the standalone system, right? Yes. > >> 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 And install skeletons only when needed by using: (operating-system (skeletons (list bash-profile))) WDYT? > >> And `~/.bash_profile', `~/.zlogin' for user variables: >> [[ $- =3D=3D *i* ]] && source ~/.bashrc # only for bash >>=20=20=20=20=20 >> export PATH=3D$PATH:$HOME/.guix-profile/bin > > OK. It would be best to have $HOME/.guix-profile/bin in PATH installed > by /etc/{profile,zlogin}, though, so that it works out of the box. > >> Use `~/.bashrc', `~/.zshrc' for interactive settings: >> PS1=3D'$ ' >> alias ls=3D'ls -p --color' >> # $(guix package --search-paths)? > > OK. > > Thanks for the very good summary! I never had this clear an > understanding of all this. In fact, I'm confused about this even now :) > > Would you like to submit a patch? The relevant parts are in (gnu > system) for /etc/profile, in (gnu system shadow) for the .bashrc > template, and in (gnu services base) for the PAM settings of the =E2=80= =98login=E2=80=99 > command. Sure, I'll try to write a patch, thanks for the direction. > > Ludo=E2=80=99.