Subject: ibus-mozc: Automatically enables itself on non-Japanese systems

From: Will Thompson <[email-masked]>
Date: Wed, 29 Nov 2023 11:30:14 +0000

Package: ibus-mozc
Version: 2.28.4715.102+dfsg-2.2
Severity: normal

ibus-mozc contains an xdg autostart script for GNOME sessions which 
checks whether any ibus input methods are already configured for the 
user session and, if not, prepends the mozc-jp input method to the list.

 From reading #983623 I believe the intention is to remove the need for 
manual setup after the package is installed. However, this also means 
that if the package happens to be installed on the system, the input 
method will be enabled even if the user has no interest in Japanese 
text input. I believe the xdg-autostart script is the wrong way to 
handle this. GNOME Initial Setup selects an appropriate input method 
for the configured locale. On Debian systems, for Japanese, this is 
ibus-mozc (if installed) or ibus-anthy (if mozc is not installed but 
anthy is). It is true that, if you install ibus-mozc after configuring 
your desktop session, it will not be enabled; but 
task-japanese-gnome-desktop recommends ibus-mozc so I would expect that 
mozc would typically be installed.

The current approach causes a particular problem on image-based 
systems. Endless OS is a Debian-based distribution which is distributed 
as an immutable snapshot, using libostree. End-users do not have the 
ability to add or remove Debian packages from the system. This means 
that we must bundle a reasonable input method for every language our 
users may wish to use. By including ibus-mozc in the immutable image, 
mozc gets automatically enabled on (for example) my UK English system. 
So at present we have to either patch the mozc package (the current 
approach) or remove support for Japanese text input from our OS. (We 
previously had the same problem with ibus-anthy, see #992753, but since 
gnome-desktop 43.2-2 switched to preferring mozc, we have followed this 
switch.)

Please consider removing the XDG autostart script in both packages.

Regards,

– Will

-- System Information:
Distributor ID:    Endless
Description:    Endless OS 5.2.0
Release:    5.2.0
Codename:    n/a
Architecture: x86_64

Kernel: Linux 6.5.0-10-generic (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE 
not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages ibus-mozc depends on:
ii  ibus             1.5.27-5
ii  libabsl20220623  20220623.1-1
ii  libc6            2.36-9+deb12u3
ii  libgcc-s1        12.2.0-14
ii  libglib2.0-0     2.74.6-2
ii  libibus-1.0-5    1.5.27-5
ii  libprotobuf32    3.21.12-3
ii  libstdc++6       12.2.0-14
ii  libxcb-xfixes0   1.15-1
ii  libxcb1          1.15-1
ii  mozc-data        2.28.4715.102+dfsg-2.2
ii  mozc-server      2.28.4715.102+dfsg-2.2

Versions of packages ibus-mozc recommends:
ii  mozc-utils-gui  2.28.4715.102+dfsg-2.2

ibus-mozc suggests no packages.

-- no debconf information

---

From: Osamu Aoki <[email-masked]>
Date: Sat, 22 Jun 2024 17:14:50 +0900

Hi,

I am not the maintainer of this package but came to this bug after hearing it on
a Debian JP workshop session.

I think what should happen is the following:

For now, Endless OS should create its customization package which used dpkg-
divert to disable ibus-mozc's autostart script and provides its own per-user
input method setting script (or use gnome-initial-setup?).   After all, the act
of installing all the language support packages is a non-typical use case.

Here is my rationale and comment for the future direction.:

Fundamental problem is that Debian Package installation script can configure
system wide settings via post-inst script but not each user's personal settings.
 Since ibus input method activation is performed per-user basis, we need some
mechanism to make 99% of use case as smooth as possible like what is done. Under
normal use case, whoever install ibus-mozc expects it to work upon first login
to the system.

I do understand what ibus-mozc is doing may not be the best technical solution
but is a reasonable **DE independent solution**.

If you can come up with a new **DE independent** per-user IM setting package and
upload to Debian, we can stop using current mechanism. That will be great
contribution to Debian from Endless OS. (FYI: I like your Gnome DE mod code
which I use via extension.)

Please remember Debian need to support many DEs.

Best regards,

Osamu

---

From: Will Thompson <[email-masked]>
Date: Mon, 8 Jul 2024 14:34:14 +0100

On Sat, 22 Jun 2024 at 09:16, Osamu Aoki <[email-masked]> wrote:

> For now, Endless OS should create its customization package which used
> dpkg-divert to disable ibus-mozc's autostart script and provides its own
> per-user input method setting script (or use gnome-initial-setup?).
>

Thanks for the dpkg-divert suggestion. Currently we patch this package to
remove this problematic autostart file but we could avoid that with
dpkg-divert. GNOME Initial Setup is used at first boot to configure the
system language and input method.

> After all, the act of installing all the language support packages is a
> non-typical use case.
>

As noted in this thread, Debian live media does the same – I don't think
this is so non-typical!

> I do understand what ibus-mozc is doing may not be the best technical
> solution but is a reasonable **DE independent solution**.
>
> If you can come up with a new **DE independent** per-user IM setting
> package
>

I don't think such a thing is possible or desirable. Each DE already has
its own way to configure input methods per-user (and system-wide).

Limiting the auto-enabling behaviour to Japanese locales would be an
improvement but consider the case where the system has two different input
methods installed, both of which have this script. Which one should win?

– Will