[Bug 1800280] Re: Setting ZSH as login shell causes various issues because it doesn't source /etc/profile
Axel Beckert
abe at debian.org
Fri Feb 15 13:32:22 UTC 2019
> > What do you exactly mean by "setting ZSH as the default shell"?
>
> I just mean using chsh to set the default login shell. /bin/sh is left unchanged.
JFTR: "default" is still the wrong term for this. There is only _one_
login shell per user. "default" always suggests that there are others to
use if you don't like the default value. But there is none. The "default
login shell" is still bash because that's what new users get as their
login shell _by default_.
I changed the title of the bug report accordingly as it just confused me
again.
** Summary changed:
- Setting ZSH as the default shell causes various issues because it doesn't source /etc/profile
+ Setting ZSH as login shell causes various issues because it doesn't source /etc/profile
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to zsh in Ubuntu.
https://bugs.launchpad.net/bugs/1800280
Title:
Setting ZSH as login shell causes various issues because it doesn't
source /etc/profile
Status in zsh package in Ubuntu:
Confirmed
Bug description:
When setting ZSH as the default shell, /etc/profile is never sourced
(because ZSH instead sources its own /etc/zsh/zprofile). That's
problematic, because /etc/profile (and the files in /etc/profile.d)
are responsible for a bunch of important stuff. For example:
/etc/profile.d/apps-bin-path.sh adds /var/lib/snapd/desktop to
XDG_DATA_DIRS. Setting the default shell to ZSH means that desktop
environments suddenly can't launch snap packages.
/etc/profile.d/input-method-config.sh works around
https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1720250, so
setting the default shell to ZSH un-fixes that bug.
Arch Linux's zsh package has `emulate sh -c 'source /etc/profile'` in
/etc/zsh/zprofile. Either Ubuntu's zsh package should do the same (or
something similar), or Ubuntu must put important environment variable
stuff somewhere else and have only bash-specific stuff in /etc/profile
and /etc/profile.d.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zsh/+bug/1800280/+subscriptions
More information about the foundations-bugs
mailing list