1) Configure GTK2 to enable Xinput.
Configure GTK2 with the "--with-xinput=yes" option becore compilation.
Confirmation of setting can be seen as follows.
bsd5# ls /usr/X11R6/lib/gtk-2.0/2.2.0/immodules/*
/usr/X11R6/lib/gtk-2.0/2.2.0/immodules/im-xim.so
...
bsd5# vi /usr/X11R6/etc/gtk-2.0/gtk.immodules
...
"/usr/X11R6/lib/gtk-2.0/2.2.0/immodules/im-xim.so"
"xim" "X Input Method" "gtk+" "NONE/lib/locale" "ko:ja:zh"
...
Japanese(ja) should handle this configuration with XIM.
2) When Canna is used.
I like canna of the kanji change server which can be built from the ports collection. Canna requires the use of Unix domain sockets. Check for the existance of /usr/local/etc/rc.d/canna.sh to ensure canna will start at boot.
Confirm canna is running:
/usr/local/sbin/cannaserver -u bin
3) The use of kinput2.
Make this from ports collection.
app-defaults must be editted - make sure ja_JP.UTF-8 is used.
bsd5# vi /usr/X11R6/lib/X11/app-defaults/Kinput2
...
*XimpProtocol.ForceDefaultServer: true
! X Input Method Protocol
*IMProtocol.locales: eucJP, ja_JP.SJIS, ja_JP.EUC, ja_JP, ja, ja_JP.UTF-8
...
The next script is set up in Xsession and so on.
XMODIFIERS="@im=kinput2"
export XMODIFIERS
kinput2 -canna -xim &
4) The pgAdmin3 environment is set up as follows.
bsd5# export LC_CTYPE=ja_JP.UTF-8
bsd5# export LANG=ja_JP.UTF-8
bsd5# pgadmin3
Please Enjoy it.
Note: For locale information, please see freebsd_notes.html.