Skip to main content.

Sunday, September 09, 2007

Ubuntu Feisty Fawn and the related Kubuntu (Ubuntu + KDE) works neatly with UIM, which is superior to SCIM and SKIM in many aspects. However, a couple of configuration problems gave me some headache. The problem is present also in the new upcoming Gupsy. As I need Japanese (and possibly Chinese and Korean) input system for my work, here's how I did.
GTK applications have the ability to pick the preferred input method on t fly, so you won't notice this problem if working with base Ubuntu.

The problem is that XIM (scim and UIM) seems not to work with KDE applications under Kubuntu. The wrong thing is a missing link to your local language XIM setup in the directory that Ubuntu startup scripts read at X start. Log into /etc/X11/xinit/xinput.d and list the files.
Here's what I got:

all_ALL none scim_xim uim uim-toolbar-qt zh_SG
ja_JP scim th_TH uim-systray zh_CN zh_TW
default ko_KR scim-immodule th-xim uim-toolbar zh_HK

Ubuntu X startup scripts read the settings from the file which has the name of your locale in this directory. If it's not found, it should read all_ALL (but I am not sure it does). However, all_ALL contains empty settings, while the settings you need to make UIM to work are in ja_JP. It seems that Ubuntuers thinks that if you want to write in Japanese, you must be Japanese.
The problem is easily solved by creating a symbolic link to the ja_JP file with the name of your default locale. In my case, as I am Italian, it was it_IT::

$ sudo ln -s ja_JP it_IT


If this doesn't work, consider also changing all_ALL:

$ sudo mv all_ALL all_ALL.old
$ sudo ln -s ja_JP all_ALL


The script ja_JP contain some code that will automatically bring up GTK toolbar for UIM. In Ubuntu 7.04 (Feisty), there's a GTK applet that integrates UIM in the GTK task bar, and a KDE taskbar applet has been added in Kubuntu 7.10 (Gutsy). If you prefer to use those applets instead of the floating toolbar, comment the following line in ja_JP by placing a '#' in front of it:

XIM_PROGRAM_XTRA="(sleep 10; uim-toolbar-gtk)"


You may also wish to change the "sleep 10;" part in "sleep 2;"... my pc is fast enough to load KDE in much less than 10 seconds.

Now log out from your current session and use the CTRL+ALT+BACKSPACE key combination to kill and reload X.
You should now be able to access UIM from both GTK and QT applications.

Comments

Thanks. That worked very well. I didn't have to edit xorg.conf in Ubuntu 8.04 and 8.10. Maybe this is some incompatibility between VirtualBox 2.2.0 ( http://rapid4me.com/?q=Virt... ) and Ubuntu 9.04 ( http://file.sh/ubuntu+9+4&+... )

Posted by marta at Wednesday, May 13, 2009 01:52:00

Uhm, maybe. I had a bit of trouble bringing back the thing in Ubuntu 9

Posted by Giancarlo at Thursday, July 02, 2009 12:26:15

Add Comment

This item is closed, it's not possible to add new comments to it or to vote on it