ZoneO-tips for Mandriva Linux

Hiragana, Katakana, and even Kanji with Mandrake Linux

Well, not that I'm completely fluent in Japanese, but I just wanted to be able to type in few things from time to time, so I had to get going and play around with my favorite linux distribution... Main problem: most of the documentations are in Japanese, so it does not make it easy if you do not read very well. Anyway, I got it going so here are my tricks.


To start with, some useull web pages that helped me a lot, so you may want to have a look at them:

My problem was to get both the french accents and japanese input method with an american keyboard, so I could not really apply any of the techniques presented in these pages directly...

Anyway, let's start. With Mandrake, if you start from installation, things are much easier. Choose english (or anything else) as your main language, and japanese as a second one. This way, you'll have a system in UTF-8 (coding of text file for multilingual environment, see this page for more details), all necessary dictionaries and input methods, and locales files.

If not, you'll need to install

  • FreeWnn:  a network-extensible Kana-to-Kanji conversion system. With it you can type in kana (or romaji) and easily convert to kanji/
  • kinput2-wnn4: an input server for X11 applications that want Japanese text input. 
  • locales-ja: base files for Japanese language localization.
  • locales files for applications (such as openoffice)

Now, second problem. If I followed the instructions in the pages linked above, I could not get my system to take french accents anymore... Therefore, I created a small script to switch from a standard input method to the japanese one. My system is in plain english or french, and I did not modify anything, but I have the following file in my path (/usr/local/bin/japan.bash):

LC_CTYPE=ja_JP.UTF-8 ${1+"$@"}&
Make it executable (chmod a+rx /usr/local/bin/japan.bash) and you're all set.

Now, when you want to type in japanese in openoffice, open a terminal (konsole, somewhere in the KDE menus), and start the japanese input method

kinput2 &
and start openoffice writer with
japan.bask oowriter
And that's it. You'll be able to type in japanese. It also works with ooimpress, oocalc, mozilla, konqueror, kmail, kwrite and many others.

Quick guide to the Japanese IME: just type SHIFT-SPACE and you're in japanese mode. Type the words you want phonetically and a press SPACE to get the kana and kanji suggestions. To go back to romanji, just type SHIFT-SPACE. One thing to remember: turn of any CAP-LOCK or NUM-LOCK: the japanese input method does not like it at all.

When you want to type in french, with the accents, well, just start the application like would do usually, without starting the japan.bash script. And if you want to mix french accents and japanese characters, you'll have to open two windows, one running in standard mode, the other with the japan.bash script, and use copy and paste. I did not find anything better...

Advantages of using this script are:

  • the japanese input method is not running constantly, so no risk of starting it by mistake
  • some applications are not very happy when the japanese mode is on
  • you can get the french accents easily...
またね and 頑張って下さい!

Problems and solutions...

kinput2 doesn't work!

If you get a message like

Warning: ccWnn Object: can't connect to jserver
when you start kinput, here is what you should do
  • get into the Control Center ('Configure My Computer')
  • choose the 'System' panel
  • choose 'Services'
  • in the list, there is something called 'jserver', that's what you are missing.
  • to activate it: 'Start'
  • to activate it automatically at boot time, choose the option 'On boot'.
Et voilà!

I only get little squares in OpenOffice!

You are not using the rigth font. Choose 'Kochi Mincho' or 'Kochi Gothic' and it will work. Same is true for Gimp and plenty of other applications whose default font does not include japanese symbols...

I want kinput to start automatically!

If you want kinput to start automatically when you log into KDE, you can add a link to the application in your folder .kde/Autostart.

07/2004: added comment on kinput2 and jserver.
07/2004: added comment on fonts in OpenOffice.
05/2005: added comment on Autostart folder.
© ZoneO-soft - Contact us - Start page