SKIM

SCIM can be used in Kubuntu, though via another helper application aptly named SKIM. It's fairly easy to install, and the majority of the steps needed is identical to the ones needed to install SCIM.

Other wiki entries on this subject suggest adding the Japanese Ubuntu repository. While not needed, it does contain updated versions of the packages you need installed as well as some outright missing from the normal repositories.

Installation

Packages

Enter the following in a terminal to download and install all needed packages.

  • sudo aptitude install skim scim-anthy ~nscim-bridge scim-gtk2-immodule

Set as default IM

Per default, KDE won't use SCIM as the default IM, so SKIM won't work. Enter the following in a terminal.

  • sudo im-switch -s skim

This will set the IM to be used for the current locale to SKIM. In some cases, it won't be a true locale, but rather a catch-all all_ALL (as compared to en_US, en_GB, sv_SE, etc). If you want to make sure you have it set for a specific locale, call the same command but with an added argument; -z lang_LANG . Example follows.

  • sudo im-switch -s skim -z en_US

If it returns an error message saying that input method cannot be chosen for that locale, enter the following and then retry the above command afterwards. Replace lang_LANG with the locale in question.

  • sudo update-alternatives --install /etc/alternatives/xinput-lang_LANG xinput-lang_LANG /etc/X11/xinit/xinput.d/skim 0

Enter SKIM

As mentioned, SKIM is merely the KDE helper application that interacts with the real SCIM. At this point, with SCIM set as the default IM, upon restart of X SCIM will automatically load, and launch its own helper application, preempting SKIM. To prevent this, you want to open up SKIM and set it to automatically load upon startup. It should be available via your application menu, though you can start it manually via a terminal or a run box.

  • skim &

An icon should pop up in your system tray. Right-click it, and hit Configure.

In the Frontend / General SCIM section, go to the Other tab and select Panel Program: scim-panel-kde, as well as Config Module: kconfig. Likewise, in the X Window section, check Start skim automatically when KDE starts.

IM configuration file

The "skim" we've so far been referring to is actually a file named skim, located in /etc/X11/xinit/xinput.d. Per default it is incomplete, missing entries to make programs that rely on XIM for input work with SCIM.

Open it up in a text editor with superuser persmissions, such as by running the following in a terminal or a run box (Alt+F2).

  • kdesudo kate /etc/X11/xinit/xinput.d/skim &

Paste the following contents into the file and save it.

  • XIM=SCIM
    XIM_PROGRAM=/usr/bin/skim
    XIM_ARGS="-d"
    XIM_PROGRAM_SETS_ITSELF_AS_DAEMON=yes
    
    if [ -e /usr/lib/gtk-2.0/*/immodules/im-scim-bridge.so ]; then
        GTK_IM_MODULE=scim-bridge
    elif [ -e /usr/lib/gtk-2.0/*/immodules/im-scim.so ]; then
        GTK_IM_MODULE=scim
    else
        GTK_IM_MODULE=xim
    fi
    if [ -e /usr/lib/qt3/plugins/inputmethods/im-scim-bridge.so ] || [ -e /usr/lib/qt4/plugins/inputmethods/im-scim-bridge.so ]; then
        QT_IM_MODULE=scim-bridge
    elif [ -e /usr/lib/qt3/plugins/inputmethods/libqscim.so ]; then
        QT_IM_MODULE=scim
    else
        QT_IM_MODULE=xim
    fi
    
    DEPENDS="skim, scim-bridge-client-gtk | scim-bridge-client-qt | scim-bridge-client-qt4 | scim-gtk2-immodule | scim-qtimm"

At this point you need to restart X, such as by rebooting, or logging out and hitting Ctrl+Alt+Backspace.

  • NOTE: Zapping (the Ctrl+Alt+Backspace shortcut) will be disabled in 9.04 Jaunty. To restart the X server, you would instead need to switch to a text console, such as by hitting Ctrl+Alt+F1. Login, and then enter the following

    sudo service kdm restart

    Replace kdm with gdm if for some reason you're using GNOME's login manager.

Configuration

For general SKIM configuration, access the configuration window via its system tray icon. For language specific support (such as Anthy for Japanese), you may need to open up SCIM's configuration window, however. Enter the following in a terminal or a run box.

  • scim-setup &

The following guide is for people who want to install SKIM for Chinese/Japanese/Korean input on Kubuntu.

For users wanting to set up Chinese/Japanese/Korean on Ubuntu using SCIM, click HERE

The guide below was created with a view to enabling Chinese input.

Substitute any selection for the Chinese language for a language of your choice to enable input for said language. Provided it's supported by SCIM of course.

Installation and Setup for 6.06

  1. Select KMenu -> System -> Language Support (in Kubuntu 7.10 and 8.04 it is KMenu -> System Settings -> Regional & Language -> Add language)

    • LanguageSelection.png

  2. Select Chinese from the language list, click 'Apply', and allow the package manager Adept to finish downloading the language pack
  3. Close the Adept window when the download is complete
  4. Right click the SKIM icon in your taskbar and select Configuration -> General SCIM -> "Other" Tab

    • Under the 'Panel Program' dropdown, select 'scim-panel-kde' Under the 'Config Module' dropdown, select 'kconfig'

      SKIM_PanelConfig.png

  5. If your default language coincides with your new input language (e.g. Installed Chinese input for a Chinese desktop), Go onto to step 6.

    • For users utilizing different default and input languages (e.g. Chinese input for an English Desktop). Open up Konsole and type:
      mkdir ~/.xinput.d
      cp /etc/X11/xinit/xinput.d/scim-pinyin ~/.xinput.d/default
  6. Restart KDE by logging out and back in, or typing sudo /etc/init.d/kdm restart.

  7. Once you are logged in, you should be able to activate SKIM with CTRL-Space or SHIFT-Space within any application that allows keyboard inputs.
    • e.g.
      1. Start Kate
      2. Press CTRL-Space. A SKIM toolbar would have poped up.
      3. Choose Chinese input -> Smart PinYin on the SKIM toolbar

      4. You can now input Chinese in Kate

        SKIM_UpAndRunning.png

To switch back to the default language of your desktop, press the shortcut key in (ii), which is used to toggle between the desktop default language and the input method set up in (iii).

If you encountered any problems during the installation, check the Problems Section for possible solutions.

For 6.10 and 7.04 users:

You have to tell the system you want to use SCIM as the input method for your locale.

  1. To find out which locale you are using open up Konsole and type:
    • locale | grep LANG= 
      you will get something like
      LANG=de_DE.UTF-8 
  2. Now open up Konsole and type:
    • im-switch -z de_DE.UTF-8 -s scim 
      Replace "de_DE.UTF-8" with what you got from your first command.

For 8.04 users:

You do not have know the locale to use SCIM - there is "catch-all" called all_ALL that covers all locales for this purpose (see man im-switch for more information). Also, you should use scim-bridge instead of scim. Hence:

  1. Open up Konsole and type:
    • im-switch -z all_ALL -s scim-bridge 

Problems Section

PROBLEM

Some of the Chinese characters that I'm entering show up as big black dots! Problem_BlackDotChar.png

SOLUTION

Chances are whatever application you are using isn't set to a font which can handle the full set of Chinese characters. Kate for example defaults to the 'DejaVu Sans', which though can handle a large number of Chinese characters, doesn't actually support the full set.

Switch to something like 'AR PL ShanHeiSun Uni' which by default comes with Kubuntu (to do this go: Settings Menu -> Configure Kate -> Fonts & Colors -> Fonts tab).

Also, the entire KDE desktop font can be changed from: KMenu -> System Settings -> Appearance -> Fonts

However, different applications have different ways of setting the fonts, so don't hesitate to do some exploring if you encounter this problem in a new application.

PROBLEM

I get a

  • Could not read network connection list.

    /home/<username>/DCOPserver_mini-desktop_ _0

error everytime KDE starts up (where <username> is the name you login with). NB: There aren't actually any spaces between the underscores.

SOLUTION

See if the problem is fixed by reboots, if not you can try delaying the sequence that im-switch loads in:

cd /etc/X11/Xsession.d/
sudo mv 90im-switch 98im-switch

SCIM/Kubuntu (last edited 2010-04-20 23:56:38 by kailaasa)