[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/2] Fix IBus input methods.

From: Chris Marusich
Subject: Re: [PATCH 0/2] Fix IBus input methods.
Date: Fri, 18 Nov 2016 02:37:41 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Ricardo Wurmus <address@hidden> writes:

> with these patches different versions of GTK+ can be given different input
> method module caches.
> Currently, the problem with additional GTK input methods (such as IBus) is
> that to make them visible you need to generate a cache file and point to it
> with GTK_IM_MODULE_FILE.  Since this variable is respected by both major
> versions of GTK+ (and the cache file doesn't allow specification of input
> method modules for specific versions of GTK+) incompatible input method
> modules will be loaded, which results in crashes.
> GUIX_GTK3_IM_MODULE_FILE we can bypass this problem as GTK+ applications will
> only load modules compatible with their major version.
> I've tested this by generating two cache files for both versions with
> "gtk-query-immodules-2.0" and "gtk-query-immodules-3.0" and setting the
> variables.  This allows me to use IBus libpinyin in all (tested) GTK
> applications.

This is so good.  Thank you for doing it!  I am happy to confirm that
Japanese input via ibus-anthy works like a charm after your changes.
All I had to do was the following:

(1) install ibus, ibus-anthy, and anthy (anthy is probably not strictly
necessary to have in my profile, but it provides a potentially useful
tool for managing user dictionaries, so I want it in my profile),

(2) generate two cache files for both GTK+ versions with
"gtk-query-immodules-2.0" and "gtk-query-immodules-3.0" (it took me a
minute to find the latter program, which was hiding in the "bin" output
of the address@hidden package),

(3) set the environment variables GUIX_GTK2_IM_MODULE_FILE and
GUIX_GTK3_IM_MODULE_FILE to those files (I added export statements to my
~/.bashrc to make it permanent), and

(4) restart xorg-server via "sudo herd restart xorg-server" to ensure
my new environment variables would be seen by all programs I launch.

After that, Japanese input using ibus-anthy just works in GNOME3.  It
works in Icecat, Gedit, GNOME Terminal, and even Emacs (although I
learned recently that Emacs has a great Japanese IME of its own [1]).

Curiously, I did not have to set GTK_IM_MODULE at all.  Even though
GTK_IM_MODULE is not set to anything, Japanese input using ibus-anthy
works.  I guess GTK+ must be automatically finding the right input
method module via some other mechanism.  Whatever - I'm happy for now!

My only concern is that when installing ibus , Guix displays no message
indicating to the user that they will need to go through the above steps
to get their input methods working.  It would also be nice if we could
emit a similar message any time ibus or one of its engines, like
ibus-anthy, is installed/removed/updated, since as you know it is
necessary to regenerate the immodules cache files in that case [2].  Is
there a way to notify the user when installing?  Or, would it be better
to just describe what needs to be done in the manual?



Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]