FS#8946 - zsh is missing profiles
Attached to Project:
Arch Linux
Opened by Pierre Schmitz (Pierre) - Sunday, 16 December 2007, 18:14 GMT
Last edited by Pierre Schmitz (Pierre) - Friday, 16 May 2008, 13:16 GMT
Opened by Pierre Schmitz (Pierre) - Sunday, 16 December 2007, 18:14 GMT
Last edited by Pierre Schmitz (Pierre) - Friday, 16 May 2008, 13:16 GMT
|
Details
When setting zsh as default shell for a user the
/etc/profile script and no script in /etc/profile.d are
executed. Esspecially when using an utf8 layout you will not
be able to type or read non-ascii chars.
A woraround is to create symlinks from /etc/profile to /etc/zsh/zprofile and from /etc/profile.d to /etc/zprofile.d. |
This task depends upon
Closed by Pierre Schmitz (Pierre)
Friday, 16 May 2008, 13:16 GMT
Reason for closing: Fixed
Additional comments about closing: I fixed the problem in kdm
Friday, 16 May 2008, 13:16 GMT
Reason for closing: Fixed
Additional comments about closing: I fixed the problem in kdm
This allows zsh to read correctly the /etc/profile
But another problem is that /etc/profile uses some bash-specific stuff (like PS1,2)
So why not got with the symlinks? It would not break anything.
Kde, gnome and xfce terms have an option in their gui iirc.
And for urxvt and xterm, I have these two lines in ~/.Xdefaults :
urxvt*loginShell: true
xterm*loginShell: true
I just wanted to mention this because that's what I use and it works fine for me.
I don't understand what is wrong, zsh loads /etc/profile just fine here..
So far all I've seen is that people aren't running login shells when they want one..
mkdir -p $startdir/pkg/etc/zsh
install -D -m 755 $startdir/zprofile $startdir/pkg/etc/zsh/zprofile
http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/system/zsh/PKGBUILD.diff?r1=1.16&r2=1.17&cvsroot=Extra
it is included with the build files from abs, so i thought it was a mistake that it didn't get installed.
so wouldn't '--enable-zprofile=/etc/profile \' be a better option than
'--enable-zprofile=/etc/zsh/zprofile \' ?
or maybe 'echo ">> link /etc/profile to /etc/zsh/zprofile" in the post_install
--enable-zprofile=/etc/profile \
in the new version
---------
if [ `ls -A1 /etc/profile.d/ | wc -l` -gt 0 ]; then
for profile in /etc/profile.d/*.sh; do
if [ -x $profile ]; then
. $profile
fi
done
unset profile
fi
-----------
If you don't use a login shell at any point when starting your working environment, that's your problem, so fix it.
For example, you might be using a broken login manager like kdm which assumes that zsh profile is in /etc/zprofile. You can work around that issue by making a zprofile symlink manually. But that's an issue with kdm, not zsh.
And if you are going to hack it like above, then just do source /etc/profile in your .zshrc instead of duplicating everything.