unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: 宋文武 <iyzsong@member.fsf.org>
Cc: help-guix@gnu.org
Subject: Re: Typing on GuixSD in languages other than English
Date: Sun, 17 Apr 2016 01:26:55 -0700	[thread overview]
Message-ID: <87potok5dc.fsf@gmail.com> (raw)
In-Reply-To: <878u0ith13.fsf@gmail.com> (Chris Marusich's message of "Tue, 12 Apr 2016 18:48:56 -0700")

[-- Attachment #1: Type: text/plain, Size: 4630 bytes --]

Chris Marusich <cmmarusich@gmail.com> writes:

> iyzsong@member.fsf.org (宋文武) writes:
>
>>> Chris Marusich <cmmarusich@gmail.com> writes:
>>>
>>>> Awesome!  Where you able to get this working?  I've tried installing it
>>>> From the version you pushed, and I still can't get it to work.  Even
>>>> when I set all the environment variables mentioned, and I install all
>>>> the packages (ibus, ibus-anthy, and anthy) to my profile.  If you got it
>>>> working, I'd like to know how so I can set it up on my end, too.
>>
>> Yes, I only tested in xterm.
>> set the environemnt variables, run ‘ibus-daemon –-xim -v’.
>> then use ‘ibus-setup’ to add ‘Japanese - Anthy’.
>> in xterm, ‘Super+Space’ work fine.
>>
>>
>> For GTK+ applications, I have to generate the ‘immodules.cache’ file:
>>
>> GTK_IM_MODULE_FILE=/tmp/immodules.cache gtk-query-immodules-3.0 -–update-cache
>>
>> GTK_IM_MODULE_FILE=/tmp/immodules.cache gtk3-demo –-run search_entry
>>
>>
>> With the cache (it contains ibus), it will work.
>
> Thank you so much for the tips!  I've finally gotten ibus-anthy working
> (partially)!  However, I've encountered some additional
> problems/questions, and I hope you can provide some advice:
>
> * When I set up GTK_IM_MODULE_FILE like you've suggested, it works only
>   for GTK3 applications.  Applications using GTK2 crash due to some kind
>   of a version incompatibility problem [1].  However, if I generate the
>   immodules cache file with "gtk-query-immodules-2.0", then the same
>   thing happens in reverse: GTK2 applications work with Japanese input,
>   but GTK3 applications crash.  Do you know of a way we can get it
>   working for both GTK2 and GTK3 applications simultaneously?
>
> * When I install ibus, I notice that the next time I log in, the
>   following environment variables are set even though they were not set
>   before, and even though I did not add them to my $HOME/.bashrc or
>   $HOME/.bash_profile:
>
>   QT_IM_MODULE=ibus
>   XMODIFIERS=@im=ibus
>   IBUS_COMPONENT_PATH=/home/testuser/.guix-profile/share/ibus/component
>
>   Do you know where those environment variables are coming from?  Why
>   isn't GTK_IM_MODULE set, also?  (It seems that setting GTK_IM_MODULE
>   is not necessary if GTK_IM_MODULE_FILE is set, but I do not currently
>   understand the relationship between those two environment variables.)
>
> * If the ibus cache in $HOME/.cache/ibus exists, then installing
>   ibus-anthy will APPEAR to have no effect.  The only way I was able to
>   get GNOME's control panel ("All Settings" > "Region & Language" >
>   "Input Sources") or ibus-setup to recognize the "Japanese (Anthy)"
>   input method after installing ibus-anthy was to invoke "rm -rf" on the
>   $HOME/.cache/ibus directory and then restart ibus-daemon (e.g., by
>   restarting the xorg-server service).  To make it easier to install and
>   use ibus-anthy, there a way we can ensure that the ibus cache is
>   refreshed when the user installs ibus-anthy?
>
> Thank you,

Regarding question #1 (i.e., the problem by which GTK2 and GTK3
applications cannot share the same GTK_IM_MODULE_FILE environment
variable without crashing one or the other), it seems that this is
simply the way GTK behaves currently, with no obvious solution:

https://developer.gnome.org/gtk3/unstable/gtk-running.html
"GTK_IM_MODULE_FILE.  Specifies the file listing the IM modules to
load. This environment variable the default value
libdir/gtk-3.0/3.0.0/immodules.cache (libdir has the same meaning here
as explained for GTK_PATH). The immodules.cache file is generated by the
gtk-query-immodules-3.0 utility."

At first blush, it seems that it is simply quite difficult to teach
GNOME about where to find its input method modules in the world of
GuixSD.  This is really unfortunate, since I imagine that many people
want to type in languages other than English within GTK applications.  I
wonder what features might exist in GNOME or GuixSD that would make it
easier to tell GNOME where to find its dependencies?  If it isn't
currently possible, I wonder what changes could be made to make it
possible?

There is good news, though.  I can happily report that the Japanese
language input method which comes built into Emacs (i.e., "quail
japanese") works perfectly out of the box.  After all the trouble I
spent trying to figure out how to use ibus-anthy in GNOME, it blew my
mind when I discovered this emacs feature.  So cool!

emacsを使えば馬鹿みたいに簡単で驚きました。

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  reply	other threads:[~2016-04-17  8:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-02 21:51 Typing on GuixSD in languages other than English Chris Marusich
2016-04-03  1:00 ` 宋文武
2016-04-03  4:17   ` Chris Marusich
2016-04-04  0:26     ` Chris Marusich
2016-04-04  2:26       ` Luis Felipe López Acevedo
2016-04-04  5:37         ` Chris Marusich
2016-04-04 14:36           ` Luis Felipe López Acevedo
2016-04-09  1:41           ` 宋文武
2016-04-09 19:38             ` Chris Marusich
2016-04-10  9:47               ` 宋文武
2016-04-13  1:48                 ` Chris Marusich
2016-04-17  8:26                   ` Chris Marusich [this message]
2016-04-18  7:27                   ` Ricardo Wurmus
2016-04-04 20:10       ` Ricardo Wurmus
2016-04-05  6:48         ` Chris Marusich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87potok5dc.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=iyzsong@member.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).