1. Install Japanese free fonts from http://sourceforge.jp/projects/efont/files/
Download kochi-substitute-20030809.tar.bz2 and install the .ttf fonts 
in /usr/X11/lib/X11/fonts/truetype

2. Configure truetype fonts.
# vi /usr/X11/lib/X11/fonts/truetype/fonts.scale
# vi /usr/X11/lib/X11/fonts/truetype/fonts.dir

kochi-mincho.ttf -kochi-mincho-medium-r-normal--0-0-0-0-p-0-iso10646-1
kochi-mincho.ttf -kochi-mincho-medium-r-normal--0-0-0-0-c-0-jisx0208.1983-0
kochi-mincho.ttf -kochi-mincho-medium-r-normal--0-0-0-0-c-0-jisx0201.1976-0
kochi-mincho.ttf -kochi-mincho-medium-r-normal--0-0-0-0-p-0-iso8859-1
kochi-gothic.ttf -kochi-gothic-medium-r-normal--0-0-0-0-p-0-iso10646-1
kochi-gothic.ttf -kochi-gothic-medium-r-normal--0-0-0-0-c-0-jisx0208.1983-0
kochi-gothic.ttf -kochi-gothic-medium-r-normal--0-0-0-0-c-0-jisx0201.1976-0
kochi-gothic.ttf -kochi-gothic-medium-r-normal--0-0-0-0-p-0-iso8859-1

3. Configure fc-fonts
# vi /etc/fonts/fonts.conf

....
        <dir>/usr/X11R6/lib/X11/fonts</dir>
....
        <alias>
                ....
                <family>Kochi Mincho</family>
                ....
                <default><family>serif</family></default>
        </alias>
....
        <alias>
                ....
                <family>Kochi Gothic</family>
                ....
                <default><family>sans-serif</family></default>
        </alias>
....
        <alias>
                ....
                <family>Kochi Gothic</family>
                ....
                <default><family>monospace</family></default>
        </alias>
....
        <alias> 
                <family>serif</family>
                <prefer>
                ....
                        <family>Kochi Mincho</family>
                ....
                </prefer>
        </alias>
        <alias> 
                <family>sans-serif</family>
                <prefer>
                ....
                        <family>Kochi Gothic</family>
                ....
                </prefer>
        </alias>
        <alias>
                <family>monospace</family>
                <prefer>
                ....
                        <family>Kochi Gothic</family>
                ....
                </prefer>
        </alias>


# fc-cache -f -v

4. Install canna and kinput2-canna from http://rpmfind.net/linux/rpm2html/search.php


5. Configure IM.

% vi .xsession
export LANG=ja_JP.UTF-8
export XMODIFIRES="@im=kinput2"
kinput2 -canna -cannaserver localhost -xim &

# vi /etc/X11/gdm/Xsession

$HOME/.xsession
gnome-session &

# vi /etc/hosts.canna
localhost

# vi /etc/services
canna 5680/tcp

# vi /etc/init.d/canna
OPTS="-syslog -u bin -inet"
# ln -s /etc/init.d/canna /etc/rc5.d/S99canna

# reboot

6. Invoke gedit with canna.

% gedit

or

% env LANG=ja_JP.UTF-8 LC_ALL=ja_JP.UTF-8 XMODIFIRES="@im=kinput2" gedit

