Contributed by Jim Young <jim at hughsropes.com>
This is just a rough sketch of what I did to get Japanese input and reading working in AMSN. WARNING: if you are using tcl version 8.4.xx, Japanese input will not work as of this writing.. 8.4 tcl/Tk is unstable and I recommend you dont use it unless you have to until it has developed a bit more.
This is from a Debian testing point of view. if you are using a different distribution, change to Debian. ;) if you dont want to change to Debian, you should be able to do similar things very simply.
Also, this is just roughly what I did to get Japanese working on my system. I am not sure which parts are neccesary for only ime support, so if someone wants to test and play witht it and make a more precise and generic explanation, pleaes do so.
First of all, one of the simplest programs to get working with Japanese input is mozilla. If you can write Japanese in mozilla, then amsn should work as well. since depending on your amsn and Tcl/Tk versions Japanese input can be a pain, I recommend trying to get ime working in mozilla first.
Okay, this is basically what I did:
First of all, you need to install japanese fonts, a japanese input/conversion server, and an IME.
I recommend installing canna or wnn (I have personally had issues with skk). If you are using Debian, here are some packages I recommend you install:
- canna | freewnn-jserver freewnn-common
- kinput2-canna | kinput2-canna-wnn | kinput2-wnn
- xfonts-intl-asian xfonts-intl-japanese xfonts-intl-japanese-big
you may want other fonts depending on your preferences
you may also want mozilla-locale-ja
first, you need to set your locale stuff up ( I recommend this for general Japanese use, and I think its necessary for ime..)
go through the options, choose Japanese, and for all options choose either WNN or canna, whichever you installed above.
It should tell you at the end which packages it thinks you should install, and how to edit your locale definitions files.
you should run this in X to see the Japanese properly (if you insist on running in console, seek out the jfb package). I recommend gnome-terminal, kterm, or some other japanese capable terminal (xterm doesn't support japanese, at least on my machine).
after editing your locale definition files, run /usr/sbin/locale-gen Warning, all of your programs may be Japanese after this setup.. you can fix it by setting your LANG environment variables (type /usr/bin/locale for list of the relevant variables) to C or whichever locale you prefer.
Okay, now everything should be in place. there are a few more things which need to be done. You need to make sure that your cannaserver or wnn-jserver is loaded at startup.. if you used Debian apt-get it should be already all done for you. If not, make sure that your conversion server loads. Also, you need to run kinput2 at some point. Some people like to invoke it manually, others like to have it automatic. I use gnome for my desktop environment, so I get kinput2 to run in my session startup. for now, just open a terminal and type:
to start it running.
Next, you need to set your xmodifiers properly. you may want to do this in your xsession file, but in my case i have users who hate having the IME enabled (shift space gets in their way) so this is what i did:
su touch /usr/bin/ime
in the file, put:
#!/bin/bash XMODIFIERS="@im=kinput2" LC_CTYPE=ja_JP $1 &
and do a:
chmod 755 /usr/bin/ime
to make it executable.
then, to make a program ime capable, run:
of course, if this works then you can work it into a menu shortcut.