#1011088 zsh: wrong $PATH for regular user under GNOME/Wayland

Package:
zsh
Source:
zsh
Description:
shell with lots of features
Submitter:
Jan Dittberner
Date:
2022-05-16 18:09:05 UTC
Severity:
normal
#1011088#5
Date:
2022-05-16 17:49:09 UTC
From:
To:
Dear Maintainer,

in a fresh Bookworm installation with GNOME I installed zsh and set users'
shell to /usr/bin/zsh using chsh -s /usr/bin/zsh $USER. Logout/login (via GDM)
select option 2 (copy default .zsh setup).

* What exactly did you do (or not do) that was effective (or
  ineffective)?

I observed the effect on an upgraded Buster installation first. I did a fresh
testing installation in a KVM/QEMU VM and observed the same issue.

The problem does not occur in a GNOME/Xorg session, so it seems to be a
combination of GNOME/Wayland and zsh that triggers the issue.

I tested with a bash login shell which had $PATH set correctly.

* What was the outcome of this action?

% echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

* What outcome did you expect instead?

same behavior as with a bash login shell (or zsh in a GNOME/Xorg session):

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games