Thanks for the fix. I've been using zsh as my default shell for more than 2 
decades and intend on keeping it that way ;⁠-⁠)

Antoine
________________________________
From: Osamu Aoki <[email protected]>
Sent: Tuesday, March 10, 2026 2:50:24 AM
To: Antoine Cellerier <[email protected]>; [email protected] 
<[email protected]>
Subject: Re: Bug#1130136: im-config_wayland.sh outputs "/usr/bin/systemd-cat -> 
/usr/bin/systemd-cat" to term

Thanks.

Anyway, I decided to change the detection logic without invoking which command.

(I also noticed gnu-which also lacks -s option and higher priority than
debianutils which.)

I just ploaded.


FYI:

Although zsh works like dash/bash in most cases, it is problematic to set it as
so-called "default shell" in /etc/passwd.  This is not the first time breaking
im-config by zsh.

If you want to avoid breaking system provided code, set default loginshell in
/etc/passwd to bash.  You can set up different shell for your GUI terminal from
the profile menu.  For ssh and linux virtual console, you can "exec zsh"
conditionally at the end of your ~/.profile or similar.


Osamu

On Mon, 2026-03-09 at 17:49 +0100, Antoine Cellerier wrote:
>
>
> On Tue, 2026-03-10 at 00:21 +0900, Osamu Aoki wrote:
> > I guess you have different which ...
>
> 17:38 antoine@yoga ~% which which
> which: shell built-in command
>
> Looks like which (== whence) is one of the zsh built-in commands. So it
> doesn't actually invoke the which binary.
>
> https://zsh.sourceforge.io/Doc/Release/Shell-Builtin-Commands.html
>
> which [ -wpamsS ] [ -x num ] name ...
>
>     Equivalent to whence -c.
>
> whence [ -vcwfpamsS ] [ -x num ] name ...
>
>     -s    If a pathname contains symlinks, print the symlink-free
> pathname as well.
>
>
> I'm pretty sure there's a well known way to deal with it ... but I
> don't know what it is :-)
>
> In case it's helpful, according to Opus-4.6: The issue is that which -s
> (silent mode) is a feature of the standalone /usr/bin/which, but zsh's
> built-in which doesn't support -s the same way. The most portable fix
> is to replace which -s with command -v ... >/dev/null 2>&1, which is
> POSIX-compliant and works identically across all shells (dash, bash,
> zsh).

Reply via email to