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: Thu, 27 Nov 2014 21:15:36 +0100 Message-ID: <87mw7cjt7b.fsf@gnu.org> References: <87k32gtz2p.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]:39073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xu5Th-0007dO-O6 for guix-devel@gnu.org; Thu, 27 Nov 2014 15:15:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xu5TX-0001th-Ri for guix-devel@gnu.org; Thu, 27 Nov 2014 15:15:49 -0500 Received: from hera.aquilenet.fr ([2a01:474::1]:42080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xu5TX-0001pq-DT for guix-devel@gnu.org; Thu, 27 Nov 2014 15:15:39 -0500 In-Reply-To: <87k32gtz2p.fsf@gmail.com> (=?utf-8?B?IuWui+aWh+atpiIncw==?= message of "Thu, 27 Nov 2014 23:58:38 +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: > Currently, zsh doesn't work out of box. On the standalone system, right? > 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/zl= ogin are provided anyway? > 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. 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=98l= ogin=E2=80=99 command. Ludo=E2=80=99.