On Fri, Dec 12, 2014 at 12:12 PM, Bryan Linton <b...@shoshoni.info> wrote:
> On 2014-12-11 22:46:48, Joel Rees <joel.r...@gmail.com> wrote:
>> On Thu, Dec 11, 2014 at 10:07 PM, Joel Rees <joel.r...@gmail.com> wrote:
>> > Followup:
>> >
>> > On Tue, Oct 14, 2014 at 2:02 PM, Joel Rees <joel.r...@gmail.com> wrote:
>> >> What're the recommended input methods for Japanese and Spanish?
>> >
>> > I have got Japanese input running and useable, by installing the packages
>> >
>> > ja-fonts-gnu
>> > ja-sazanami-ttf
>> > ja-mplus-ttf
>> > ibus-anthy
>> >
>> > with pkg_add . I'm not comfortable that this is the most optimal way
>> > to do it, but it allows me to work on an openbsd box.
>>
>> I should note, that I have to launch the ibus preferences (as from
>> Setings in XFCE4) to get the ime daemon started at this point. Haven't
>> found out how to get it to start when X11 starts.
>>
>
> I use UIM, not ibus, but I have the following lines in my .xinitrc
> (among several others which are not relevant here) which starts
> UIM automatically when X is started.
>
>         export XMODIFIERS=@im=uim
>         export GTK_IM_MODULE="uim"
>         export QT_IM_MODULE="uim"

For ibus:

    export GTK_IM_MODULE=ibus
    export XMODIFIERS=@im=ibus
    export QT_IM_MODULE=ibus

>         env LC_CTYPE=ja_JP.UTF-8 uim-xim &

I found this in the ubuntu lists:

    http://ubuntuforums.org/showthread.php?t=1315439

It talks about a Startup Items menu entry. There's an equivalent in
the XFCE4 Settings menu,

    Session and Startup

where you can go to the Application Autostart tab and Add (button) the
ibus daemon as an application with the command

    /usr/local/bin/ibus-daemon -d

where -d is daemonize. (And I'd like to find in XFCE4 where that gets
registered.) It doesn't seem to need the LC_CTYPE env variable to be
specified as Japanese for ibus.

The archlinux pages on ibus:

    https://wiki.archlinux.org/index.php/IBus

suggest an ibus-qt package which we don't seem to have in openbsd, at
least not as a separate package.

>         exec env LC_CTYPE="en_US.UTF-8" /usr/X11R6/bin/cwm

For XFCE4, we have the

   startxfce4

command, and, again, it doesn't seem to need LC_CTYPE to be specified.

I'll try to make some time to play around with cwm later. XFCE4 is
sometimes too cumbersome, too.

> If you play around with these, you could probably get something
> working with ibus.

I want to figure out what the following is about later:

> For GTK at least, I think these module names are currently sourced
> from either:
>         /usr/local/lib/gtk-2.0/2.10.0/immodules
> or
>         /usr/local/lib/gtk-3.0/3.0.0/immodules
>
> And are cached in /etc/gtk-2.0/gtk.immodules by running
> gtk-query-immodules-2.0.  It seems like GTK-3 is doing something
> different, maybe under ~/.config or something or just running
> gtk-query-immodules-3.0 directly.  It works for me, so I haven't
> really looked into it much.
>
> Note that some applications refuse to accept Japanese input unless
> they're run with the correct locale settings *AND* an overridden
> input module, so I have
>
>         bind C-g "env GTK_IM_MODULE=xim LC_CTYPE=ja_JP.UTF-8 gwaei"
>
> in my .cwmrc so that a Japanese dictionary program of all things
> will accept Japanese input.
>
> As I said before, unfortunately xombrero needs the same hack
>         #bind C-x "env GTK_IM_MODULE=xim LC_CTYPE=ja_JP.UTF-8 xombrero"
> but this makes the fonts very ugly on most pages and in the
> general UI.  I'm still hoping to find some way to get it to
> support Japanese input without needing to force the locale to
> change, since it seems like Firefox, xterms, and most any non-GTK
> programs just "Do the Right Thing (TM)".

I've found, with the Japanese fonts installed, I don't need to specify
the LC_CTYPE as Japanese, if I don't need Japanese language menus. (My
kids need to practice their English anyway?) And that avoids the
ugliness of two-byte double-width Latin characters.

> I find it somewhat ironic that I was able to get Japanese
> input/output in xterm/irssi/mutt/tmux working with less than 5
> minutes of reading manpages, but have spent literally hours
> getting GTK to work.
>
> GTK apps used to "Just Work (TM)", but it seems like after new
> versions have been released over the last few years, more and more
> hacks have been needed to keep things working.  First it was only
> the LC_CTYPE=ja_JP.UTF-8 that was needed, now GTK_IM_MODULE=xim is
> needed too.
>
> I'm sure the GTK developers have good reasons for continually
> changing these, but it's certainly inconvenient to upgrade GTK and
> find that one's IME stops working.
>
> Once again, any cluebats are appreciated, but I have a feeling
> this is just how things are WRT needing all these environment
> overrides.
>
> I hope you're able to get ibus to start automatically from this
> information.  If not, maybe try giving UIM a try?

More things I need to experiment with when I get a chance.

-- 
Joel Rees

Be careful when you look at conspiracy.
Look first in your own heart,
and ask yourself if you are not your own worst enemy.
Arm yourself with knowledge of yourself, as well.

Reply via email to