Re: [Bug 1800280] [NEW] Setting ZSH as the default shell causes various issues because it doesn't source /etc/profile

2018-11-03 Thread Axel Beckert
Hi Martin,

Martin wrote:
> When setting ZSH as the default shell, /etc/profile is never sourced

What do you exactly mean by "setting ZSH as the default shell"?

A) Using it as login shell for a specific user.
B) Letting the /bin/sh symlink point to it.

Case B is definitely not supported and explicitly discouraged by
upstream.

> /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.

This sounds more like case B to me.

> 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.

IMHO the latter needs to happen. Zsh upstream does not source
/etc/profile and users won't expect it to do that and doing it will
probably cause other user irritations and unexcpected subtle side
effects.

See https://tanguy.ortolo.eu/blog/article25/shrc for reference what
each shell loads in which case.

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1800280

Title:
  Setting ZSH as the default shell causes various issues because it
  doesn't source /etc/profile

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zsh/+bug/1800280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1800280] [NEW] Setting ZSH as the default shell causes various issues because it doesn't source /etc/profile

2018-10-27 Thread Martin
Public bug reported:

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.

** Affects: zsh (Ubuntu)
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1800280

Title:
  Setting ZSH as the default shell causes various issues because it
  doesn't source /etc/profile

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zsh/+bug/1800280/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs