Author Topic: Howto: Japanese support  (Read 11641 times)


  • Member
  • *
  • Posts: 2
Howto: Japanese support
« on: October 16, 2006, 08:39:17 pm »
We will first install fonts to be able to display Japanese,
then we'll look in two methods to enable Japanese input in VectorLinux ("VL" from now on).

1) the fonts:

Install Sazanami fonts:
Code: [Select]
# wget
#  tar -xzvf ttf-sazanami_0.0.1.20040629.orig.tar.gz
# cd ttf-sazanami-
# tar -xjvf sazanami-20040629.tar.bz2
# cd sazanami-20040629
# cp *.ttf /usr/X11R6/lib/X11/fonts/TTF/
# fc-cache

logout / login and you have Japanese display support.

2)  Input support

There's 2 options here:
- Scim + scim-anthy + anthy
- Canna + kinput2

first we'll look at scim/anthy:

Add the "VL extra" source in slaptget
(from either the term by manually editing the slapt-getrc,
or from the slaptget gui pref window)

Code: [Select]
# nano /etc/slapt-get/slapt-getrc

Then update your sources and install the 3 packages: scim, scim-anthy, anthy
If you have other sources enabled, just verify the packages really come from VL extra before installing.

Once this is done you need to add a file in /etc/profile.d/

Code: [Select]
# nano /etc/profile.d/
export XMODIFIERS='@im=SCIM'
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"
export LC_CTYPE=ja_JP.utf8

Then chmod the file attributes:

Code: [Select]
# chmod 755 /etc/profile.d/

You need now to add scim to xfce autostarted apps:
Code: [Select]
VL menu> settings > auto started application
choose "add",  then fill the 3 fields with these settings:
name: scim
description: scim
command: scim -d

That's it for scim.. now when xfce starts, you should have an icon looking like a small keyboard in the system tray,
all you need to do to use it is go over some text input area (term, firefox, text editor, whatever) and press:
"ctrl + space" keys and the ime should appear letting you type in Japanese text. "(おめでとうございます^_^)"


Now the 2nd method: using Canna and Kinput2 to input Japanese:

Get the archive from this link .
Once you get the file here's what to do with it:

extract it
Code: [Select]
# tar -jxvf vanillajpn.tar.bz2

compile and install Canna
Code: [Select]
# tar -zxvf Canna36p1.tar.gz
# cd Canna36p1
# xmkmf
# make Makefile
# make canna
# make install

compile and install Kinput2
Code: [Select]
# tar -zxvf kinput2-v3.1-beta3.tar.gz
# cd kinput2-v3.1-beta3
# xmkmf
# make Makefiles
# make depend
# make
# make install

Now Canna and Kinput2 are installed you need to setup and start  em:

place this code in /etc/X11/xinit/xinitrc before your vm get started.
Code: [Select]
export XMODIFIERS='@im=kinput2'
export LC_CTYPE=ja_JP.utf8

First the Canna server must be started
Code: [Select]
# /usr/sbin/cannaserver

Then you can start Kinput2
Code: [Select]
kinput2 -canna &

You  can decide to launch cannaserver and then kinput2 manually each time you need em, or put them in some startup script.
Please note that cannaserver must be started first before you can use kinput2.
Oh and keys to trigger the the Canna/Kinput2 ime is "shift + space"

That's it . have fun.

( for the canna and kinput2 installation infos,  thanks goes to Scott Robbins)

« Last Edit: October 16, 2006, 08:46:57 pm by keisangi »