lunes, 25 de febrero de 2013

Typying in Japanese with Firefox: SCIM in Mandriva 2011/Mageia 2

Yesterday, I shared how to get SCIM to behave correctly to handle Japanese typying in PCLinuxOS 2013.02.  Thanks to that discovery, I learned the way to enable SCIM when using Firefox in Mandriva 2011/Mageia 2.

First of all, let me say that while iBus does the same and can be installed fairly easy in both Mandriva 2011 and Mageia 2, the problem is that it ruins the keyboard accents in Spanish for those people who work in that language with LibreOffice.  Therefore, SCIM is a better option.

I am running Firefox 19.0 at the moment, but this trick works with previous versions of the browser and future ones, too (Aurora and Nightly).

To activate Japanese IME (SCIM) in Mandriva 2011 or Mageia 2, the following packages are needed:

1. Japanese fonts (Use MCC to get them)
2. Scim (and all of its dependencies)
3. Canna (and its dependencies)
4. Anthy (and its dependencies)
5. UIM (make sure that the bridging packages are included)

Once all the packages are installed,open the terminal Konsole and use SU to log in as root with your password.

Then go to /etc/sysconfig by using
cd..
cd..
cd etc
cd sysconfig

once there, activate Kwrite by typying
export $ (dbus-launch)
kwrite

The idea is to modify a file called i18n.
When Kwrite is functional, using the open icon, and locate the file i18n to open it. Once it is displayed, append the following lines to the end of the file and save it.

GTK_IM_MODULE=scim
QT_IM_MODULE=scim
XIM_PROGRAM="scim -d"
XMODIFIERS=@im=SCIM

Close the terminal and then go to usr/share/X11/xdm
Once there, open Konsole and type su and the system will ask you for your root password.  Enter it and then type
export $ (dbus-launch)
then type kwrite (to start Kwrite and edit a file)

Once Kwrite appears, open the file Xsession with it. You have to append the following lines before the line that starts with exec
SCIM working with Firefox in Mandriva 2011
 
export XMODIFIERS=@im=xim  
export GTK_IM_MODULE=scim-bridge
export QT_IM_MODULE=xim
export XIM_PROGRAM="scim -d"

Save and log out and back in to your session.  That's the end of the show.  From now on, your browser will accept Japanese input for searches, or searches in other languages (Korean, Thai, etc) as long as you have the fonts for those languages installed.

The good thing about this method is that it also enabled SCIM for LibreOffice 4 (which is not in the official repositories of Mandriva/Mageia yet).

SCIM working with LibreOffice 4 in Mageia 2

1 comentario:

  1. I tried to follow your method when I updated my Pardus 2013 test system, but unfortunately, the folder structure is different. It turned out that my update hadn't broken iBus. Actually, the process was not complete. I ran synaptic again and my iBus works.

    ResponderEliminar