SCIM / Wiki / Documentation / Installation and Configuration / All / System configuration    


Left menu


Created

18/03/2005 5:18:13 am
by Cougar Liu

Last updated

09/01/2008 6:45:20 am
by Hwanjin Choe

Authors

Cougar Liu
William J Beksi
Hwanjin Choe



Right menu

Not logged in

Quick Poll

Which distro?

Under which linux distribution or OS do you use SCIM.

  Result

Contributors

User information

There are 0 registered and 30 anonymous users online.

Stats


System configuration

This section covers the necessary configuration steps for SCIM to be usable on your system. First, general SCIM configuration steps are described. Then the procedures for setting skim as the default input method are discussed.

General SCIM configuration

Some environment variables on your system must be correctly set in order to start applications for use with SCIM. Without these necessary environment variables other applications will not be aware that you intend to use SCIM.

Different approaches to setting the environment variables

If an input method is required for all of your applications then you should consider setting the environment variables globally. In different Linux/Unix distributions, the configuration files for global environment variables are so diverse that we will not try to enumerate them.

Alternatively, you can set these environment variables in the script which will be executed by the startx (or similar) script.

If an input method is occasionally required you can set these variables in a console and then from the console start applications in which you want to use SCIM.

It's recommended before setting the environment varibles globally that you use the above approach to set them locally in order to check that everything works as expected.

Choosing a locale

Before using SCIM a locale must be selected. Not all locales are supported by SCIM.

locale

language

* can be

ja_JP(.*)

Japanese

eucJP, ujis

ko_KR(.eucKR)

Korean

 

zh_CN(.*)

Simplified Chinese

GB2312,GBK,GB18030

zh_HK(.Big5-HKSCS)

Traditional Chinese (HK)

 

zh_TW(.Big5)

Traditional Chinese

 

*.UTF-8

Other

Most of the other locales

Please consult the above table to identify the locale you wish to use. It is generally recommanded to use UTF-8 locales, even if you are using zh_(CN|HK|TW),ja_JP or ko_KR. After deciding use the command below to check whether your desired locale is available on your system:

locale -a

If the output contains a line which is the same as your chosen locale then your locale is supported. Otherwise, TODO "how to add utf-8 locale".

You may only see *.utf8 locales from the output of "locale": they are just what you are looking for. However, you should set your LC_* to *.UTF-8 not *.utf8.

Environment variable settings

First set your locale environment variable:

export LC_CTYPE="en_US.UTF-8"   # you have to set LC_CTYPE or LANG, see below for details

You have to set LC_CTYPE to the supported locale you selected in the previous step. Alternatively, you can set LANG which will take effect if LC_CTYPE is not set explicitly. The differences are described in the table below. For more information on all the environment variables the locale supports try "man locale".

Environment Variable

Description

Comment

LC_ALL

If set to a non-empty string value, override the values of all the other internationalization variables

Generally it is not recommended to set this variable: use the two variables below

LANG

Provide a default value for the internationalization variables that are unset or null.

Set this variable to the supported locale you selected if you want the same UI language as which the input method would be able to input

LC_CTYPE

Determine the locale for the interpretation of sequences of bytes of text data as characters

Set this variable if you do not want to change your UI language

Next there are 3 variables ( XMODIFIERS, GTK_IM_MODULE, QT_IM_MODULE) you may need to set up for all of your applications to work with SCIM. There are 2 combinations/situations you may choose from. We will start with the least recommended way.

Using the XIM (X input method) protocol

Being the least optimal approach this combination will work in every distribution/environment as long as you have X. Set the three variables according to the commands below:

export XMODIFIERS=@im=SCIM    #case matters for this variable!
export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim

The environment variable XMODIFIERS specifies the XIM server to talk to. The last two lines are telling your system to disable everything except the native XIM protocol (X built-in) and to enable it throughout your system. Because the XIM protocol has a lot of limitations (for example, it may freeze your entire X when something goes wrong with the input method server), this combination of settings is generally not recommended.

Higher level input method protocol support

Alternatively to the above method, you can ask your GTK/Qt applications to make use of the GTK/Qt im-module, which are specifically designed to meet modern input method requirements. The GTK im-module support is a built-in feature in scim, while Qt im-module support is in a separate package, called scim-qtimm.

The Qt im-module support is experimental right now and the qt-immodule patch is not included in most Linux distributions. If you can not find a Qt with im-module support built-in for your favorite distribution, chances are that you have to setup your Qt to work with XIM (like other X based apps). In that case, XMODIFIERS must be setup correctly for any KDE/Qt apps to work with SCIM.

This time we should set our variables to these values:

export XMODIFIERS=@im=SCIM    #case matters for this variable!
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim

XMODIFIERS will be used in all X applications (via an older XIM protocol), such as xpdf. It does not have other more advanced input method abstract layers.

Default input methods of GTK/Qt im-module are set by the last two lines. Please set them as above. Even if the necessary support does not exist, these two lines should have no side effects at all on your system.

General skim configuration

If you installed skim and want it to be the default GUI, then please follow the steps described in this section, otherwise please skip this section.

By default, libscim (scim) will make use of GTK+2 GUIs, so you have to change that:

skim -d -f

Under X, the above command will start skim no matter whether scim-panel-gtk is running or not. Next open the configure dialog (by selecting the configure action in the right click menu of either the system tray icon or the main window) and go to

FrontEnd

->

General SCIM

->

Other

tab (before skim 1.3.0, please go to

Global Settings

->

General SCIM

instead) and change these settings to the following:

GUI Option

Change to Value

Panel Program

scim-panel-kde

Config Module

kconfig

Starting SCIM from your window manager

TODO: "to be continued"

Comments

Change Language using shell commands

Is it possible to choose scim language using shell command?

regards,
Zoobave A
http://zoobave.blogspot.com

You are not allowed to create comments. Please log in or register a new user.