From: 宋文武 <iyzsong@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: use zsh as login shell
Date: Fri, 28 Nov 2014 23:06:36 +0800 [thread overview]
Message-ID: <87mw7b74ar.fsf@gmail.com> (raw)
In-Reply-To: <87mw7cjt7b.fsf@gnu.org>
Ludovic Courtès <ludo@gnu.org> writes:
> 宋文武 <iyzsong@gmail.com> 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=en_US.UTF-8
>> PATH=/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 ‘pam env’ 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=$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:
>> [[ $- == *i* ]] && source ~/.bashrc # only for bash
>>
>> export PATH=$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='$ '
>> alias ls='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 ‘login’
> command.
Sure, I'll try to write a patch, thanks for the direction.
>
> Ludo’.
next prev parent reply other threads:[~2014-11-28 15:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-27 15:58 use zsh as login shell 宋文武
2014-11-27 20:15 ` Ludovic Courtès
2014-11-28 15:06 ` 宋文武 [this message]
2014-11-28 22:26 ` Ludovic Courtès
2014-11-29 3:24 ` 宋文武
2014-12-01 12:57 ` Ludovic Courtès
2014-12-02 14:43 ` 宋文武
2014-12-04 23:10 ` Ludovic Courtès
2014-12-05 5:11 ` Mark H Weaver
2014-12-05 18:54 ` Ludovic Courtès
2014-12-05 11:21 ` 宋文武
2014-12-06 8:04 ` use zsh and fish " 宋文武
2014-12-06 15:09 ` Ludovic Courtès
2014-11-28 15:11 ` use zsh " 宋文武
2014-12-05 13:57 ` 宋文武
2014-12-06 22:35 ` /etc/profile and .zshrc skeleton Ludovic Courtès
2014-12-07 4:06 ` 宋文武
2014-12-07 20:35 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mw7b74ar.fsf@gmail.com \
--to=iyzsong@gmail.com \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.