* Provide as many native [http://www.scim-im.org/projects/imengines IMEngines] as possible.

−

* Support as many input method protocol/interface as possible.

+

* Support as many input method protocols/interfaces as possible.

* Support as many operating systems as possible.

* Support as many operating systems as possible.

−

SCIM has the following features:

+

Nowadays, SCIM is also:

−

* Fully Object Oriented structure written in C++.

+

* Highly modularized.

* Highly modularized.

−

* Very flexible architecture, can be used as a dynamically loaded library as well as a C/S input method environment.

+

* Very flexible in its architecture, it can be used as a dynamically loaded library as well as a C/S input method environment.

−

* Simple programming interface.

+

* Simple from a programming interface perspective.

−

* Fully i18n support with UCS-4/UTF-8 encoding.

+

* Fully i18n enabled with support for UCS-4/UTF-8 encoding.

−

* Include many handy utility functions to speedup the development.

+

* Easy to configure through its unified configuration framework.

−

* GUI Panel with very rich features.

+

−

* Unified configuration framework.

+

== Installing SCIM ==

== Installing SCIM ==

−

# pacman -S scim

+

SCIM can be [[Pacman|installed]] with the package {{Pkg|scim}}, available in the [[official repositories]].

+

=== Installing Input Method Engines ===

=== Installing Input Method Engines ===

−

Currently the SCIM project has a wide range of input methods (some may need other libraries), covering more than 30 languages, including (Simplified/Traditional) Chinese, Japanese, Korean and many European languages.

+

Currently the SCIM project has a wide range of input methods (some may need other libraries), covering more than 30 languages, including (Simplified/Traditional) Chinese, Japanese, Korean and many European languages. These are some of the examples (more can be found [http://www.scim-im.org/projects/imengines here]):

−

These are some of the examples (more can be found [http://www.scim-im.org/projects/imengines here]):

+

−

Chinese Smart PinYin:

+

* '''Chinese Smart PinYin''': {{Pkg|scim-pinyin}}.

−

# pacman -S scim-pinyin

+

* '''Chinese WuBi or other tables based''': {{Pkg|scim-tables}}.

−

Chinese WuBi or other tables based:

+

* '''Japanese''': {{Pkg|scim-anthy}}.

−

# pacman -S scim-tables

+

* '''Korean''': {{Pkg|scim-hangul}}

−

Japanese:

+

−

# pacman -S scim-anthy

+

−

Korean:

+

−

# pacman -S scim-hangul

+

== Configure SCIM ==

== Configure SCIM ==

+

Configuring SCIM correctly requires the following three steps:

+

# Exporting some environment variables that specify the used input method.

+

# Modifying locale related files.

+

# Finally, starting SCIM.

−

In order to work correctly, SCIM configuration needs three steps:

+

=== A Simple scenario ===

−

1. exporting environment variables

+

If you just need SCIM to work urgently in any Desktop Environment or Window Manager, put these lines into {{ic|/etc/xprofile}} or {{ic|~/.xprofile}} and then reboot:

+

{{hc|~/.xprofile|<nowiki>

+

export XMODIFIERS=@im=SCIM

+

export GTK_IM_MODULE="scim"

+

export QT_IM_MODULE="scim"

+

scim -d</nowiki>

+

}}

−

2. modify locale-related files

+

These lines can be added to other files that are run at startup, such as: {{ic|/etc/profile}}, {{ic|~/.profile}}, {{ic|~/.xinitrc}} or {{ic|~/.config/openbox/autostart}} (when using [[Openbox]]).

−

3. start the application

+

{{Note|The first environment variable conflicts with some (unusual) options like {{ic|1=XMODIFIERS=urxvt}}.}}

−

Method 1: === Best case example ===

+

This is a very basic example for configuring XIM (X Input Method) to work with SCIM. XIM is not recommended because it has quite some limitations.

−

If you use a good DE/WM and do need SCIM to work urgently, put these lines into /etc/profile or ~/.xprofile, then reboot:

+

=== Note for GTK+ ===

−

export XMODIFIERS=@im=SCIM

+

If you use [[GNOME]], edit {{ic|/etc/gtk-2.0/gtk.immodules}} by adding follow content at the end:

−

export GTK_IM_MODULE="scim"

+

{{hc|/etc/gtk-2.0/gtk.immodules|

−

export QT_IM_MODULE="scim"

+

"/usr/lib/gtk-2.0/immodules/im-scim.so"

−

scim -d

+

"scim" "SCIM Input Method" "scim" "/usr/share/locale" "ja:ko:zh"

+

}}

−

This is also the base example. The Correct Way of Doing Things is presented below, together with some common variants.

+

If your {{ic|LC_CTYPE}} or {{ic|LANG}} is ''en_US.UTF-8'', change {{ic|ja:ko:zh}} to {{ic|en:ja:ko:zh}}.

−

Method 2: === Just a try ===

+

After making those changes, be sure to reboot. You can find out what input method modules are available on your system by executing {{ic|gtk-query-immodules-2.0}}.

−

If you use GNOME, edit /etc/gtk-2.0/gtk.immodules. Add follow content to the end.

+

If SCIM does not work with GTK+ applications after these changes, check that the GTK_IM_MODULE_FILE environment variable is set to {{ic|/etc/gtk-2.0/gtk.immodules}}.

−

"/usr/lib/gtk-2.0/immodules/im-scim.so"

+

You can use another file (in this example {{ic|~/.immodules}}) that contains the necessary information about input methods modules by adding these lines in the file you selected in the [[#A simple scenario|section above]].

−

"scim" "SCIM Input Method" "scim" "/usr/share/locale" "ja:ko:zh"

+

gtk-query-immodules-2.0 > ~/.immodules

−

+

export GTK_IM_MODULE_FILE=~/.immodules

−

If your LC_CTYPE is en_US.UTF-8, change "ja:ko:zh" to "en:ja:ko:zh". You can find im-modules when you execute gtk-query-immodules-2.0. Reboot. Maybe you will find there is no SCIM tray icon. But when you type CTRL + SPACE, the SCIM bar will show if you have enabled some INPUT METHODs. Maybe the QT immodules is the same way.Caution: GNOME PANEL may disappear sometime when your PC boots. You can turn to SHELL with typing CTRL + ALT + F1, and execute sudo reboot or reboot. You can edit /etc/gtk-2.0/gtk.immodules with vi or vim.

+

−

+

−

=== Environment variables ===

+

−

+

−

Following environment variables have to be exported ''before'' executing scim:

+

−

+

−

export XMODIFIERS=@im=SCIM

+

−

export GTK_IM_MODULE="scim"

+

−

export QT_IM_MODULE="scim"

+

−

+

−

It is usual to put these lines into some script file, e.g. ~/.xinitrc or /etc/profile (for global settings), or also ~/.config/openbox/autostart.sh (if you use Openbox as WM). If you put them into ~/.xinitrc, they have to be put ''before'' executing your DE/WM.

+

−

+

−

'''If you do not know which solution is the right one for you, just use /etc/profile.'''

+

−

+

−

Note: the first environment variable conflicts with some (unusual) options like XMODIFIERS=urxvt.

+

−

==== Note for amsn users ====

+

==== Note for aMSN users ====

−

You must also export the following variable to be able to use scim input with amsn.

+

You must also export the following variable to be able to use scim input with aMSN.

export XIM_MODULE="scim -d"

export XIM_MODULE="scim -d"

−

==== Note for GNOME, XFCE, LXDE ====

+

==== Note for GNOME, Xfce, LXDE ====

−

If ''export QT_IM_MODULE="scim"'' didn't work for you, you can use 'scim-bridge'' from AUR. This configuration is working in GNOME, XFCE, LXDE with last updates on 2009.02.15 (scim 1.4.7-1, scim-bridge 0.4.15-1 from AUR). Like this:

+

{{Out of date|The package {{ic|scim-bridge}} does not exist anymore.}}

+

If you are using GNOME, Xfce or LXDE and Qt applications do not pick up the {{ic|1=export QT_IM_MODULE="scim"}} variable, you can use {{AUR|scim-bridge}} from the [[AUR]]. To use ''scim-bridge'' instead, export the following:

export QT_IM_MODULE="scim-bridge"

export QT_IM_MODULE="scim-bridge"

==== Note for KDE3 ====

==== Note for KDE3 ====

−

For '''KDE''' you should either change QT IMM to '''xim''', or have ''scim-qtimm-cvs'' installed from AUR. Like this:

+

For KDE3 you should {{ic|export QT_IM_MODULE&#61;"xim"}} instead of ''scim'' and also install [http://www.scim-im.org/projects/scim_qtimm qtimm]] for Qt3.

−

+

−

export QT_IM_MODULE="xim"

+

−

+

−

==⁼= Note for GTK ====

+

−

+

−

If scim doesn't work with gtk applications, check GTK_IM_MODULE_FILE environment variable. It has to be set to /etc/gtk-2.0/gtk.immodules or other location that has the needed file containing input method modules.

+

−

+

−

Adding the following lines to the script file mentioned before should work. The lines should be put before executing your DE/WM:

+

−

+

−

gtk-query-immodules-2.0 > ~/.immodules

+

−

export GTK_IM_MODULE_FILE=~/.immodules

+

−

+

−

GTK will now look into ~/.immodules file. You can set the GTK_IM_MODULE_FILE to /etc/gtk-2.0/gtk.immodules, in that case you don't need the first line.

+

=== Locale-related files ===

=== Locale-related files ===

−

If your keyboard locale is en_US.UTF-8 (or en_US.utf8), just skip this second step.

+

If your keyboard locale is not {{ic|en_US.UTF-8}} (or {{ic|en_US.utf8}}), you have to modify the first line of {{ic|~/.scim/global}} (or {{ic|/etc/scim/global}} to apply these settings to all users) according to the following example:

−

+

−

If your keyboard locale is ''not'' en_US.UTF-8 (nor en_US.utf8), you have to modify the first line of ~/.scim/global (or /etc/scim/global to have an user-indipendent effect) according to the following example:

+

/SupportedUnicodeLocales = en_US.UTF-8,de_CH.UTF-8

/SupportedUnicodeLocales = en_US.UTF-8,de_CH.UTF-8

−

Obviously, you have to put your locale instead of de_CH.UTF-8.

+

and replace your {{ic|de_CH.UTF-8}} with your locale.

−

Note: your locale has to be active (i.e. you have to uncomment it in /etc/locale-gen and then execute locale-gen as root) ''and'' has to be supported by SCIM (most *.UTF-8 locales are).

+

{{Note|Your locale has to be active (i.e. you have to uncomment it in {{ic|/etc/locale-gen}} and then execute {{ic|locale-gen}} as root) ''and'' has to be supported by SCIM (most *.UTF-8 locales are).}}

If you do not know which locales you have active at the moment, you can check it:

If you do not know which locales you have active at the moment, you can check it:

Line 127:

Line 105:

locale -a

locale -a

−

(alternatively you can look at /etc/locale.gen).

+

(alternatively you can look at {{ic|/etc/locale.gen}}).

==== Further troubleshooting with locales ====

==== Further troubleshooting with locales ====

−

If after you have install scim and the necessary input tables, and scim still doesn't work (click on the system tray, and nothing pops up), then you need to set the '''LC_CTYPE''' environmental variable in '''/etc/profile''' to the locale you plan to use. Simply create an entry for LC_CTYPE in /etc/profile, if there isn't one.

+

If after you have install SCIM and the necessary input tables, SCIM still does not work, then you need to set the {{ic|LC_CTYPE}} environmental variable in {{ic|/etc/profile}} to the locale you plan to use. Simply create an entry for LC_CTYPE such as:

−

+

LC_CTYPE="zh_CN.UTF-8" # if you want to type simplified chinese

−

eg. LC_CTYPE="zh_CN.UTF-8" //if you want to type simplified chinese

+

−

+

−

Finally you need to generate the locale using the locale-gen command. Modify the /etc/locale.gen file to uncomment the language and encoding set you wish to use scim with. Then run the following command to generate the locale for your system.

+

−

+

−

locale-gen

+

+

Finally you need to generate the locale using the {{ic|locale-gen}} command.

=== Executing SCIM ===

=== Executing SCIM ===

−

To execute SCIM, you ''usually'' can just execute (but see below):

+

SCIM can be run by just executing the {{ic|scim}} command, although it is common to start SCIM as a daemon:

−

+

−

scim

+

−

+

−

It is common to start SCIM as a daemon, so that you can use your computer/terminal while SCIM is working. '''That is, the normal case is to execute''':

+

−

+

scim -d

scim -d

−

As above, it is a common practice to put this command into some script file instead of executing it explicitely. As above, usual places are ~/.xinitrc (after environment variables and before DE/WM), /etc/profile (after environment variables) or ~/.config/openbox/autostart.sh (after environment variables and possibly after some sleep command).

+

You can put the above command in a script file and execute it automatically. Usual places are {{ic|~/.xinitrc}} (after environment variables and before DE/WM), {{ic|/etc/profile}} (after environment variables) or {{ic|~/.config/openbox/autostart}} (after environment variables and possibly after some sleep command).

==== Note for GNOME ====

==== Note for GNOME ====

−

In case you use GNOME as DE, the command above seems not to work as expected. Instead, you have to execute the following:

+

In case you use GNOME as your desktop environment, the command above does not seem to work as expected. Instead, you have to execute the following:

scim -f x11 -c simple -d

scim -f x11 -c simple -d

Line 160:

Line 129:

If you want SCIM to start automatically at startup, go to System > Preferences > Session and create a new command with the line above.

If you want SCIM to start automatically at startup, go to System > Preferences > Session and create a new command with the line above.

−

Note: If you use the line scim -f socket -c socket -d instead, the configuration of your SCIM will be unmodifiable.

+

{{Note| If you use the line {{ic|scim -f socket -c socket -d}} instead, the configuration of your SCIM will be unmodifiable.}}

==== Note for KDE ====

==== Note for KDE ====

−

In case you use KDE as a DE, the command above seems not to work as expected. Instead, you have to execute the following:

+

In case you use KDE as a desktop environment, the command above does not seem to work as expected. Instead, you have to execute the following:

Installing SCIM

Installing Input Method Engines

Currently the SCIM project has a wide range of input methods (some may need other libraries), covering more than 30 languages, including (Simplified/Traditional) Chinese, Japanese, Korean and many European languages. These are some of the examples (more can be found here):

Note for GNOME, Xfce, LXDE

If you are using GNOME, Xfce or LXDE and Qt applications do not pick up the export QT_IM_MODULE="scim" variable, you can use scim-bridgeAUR from the AUR. To use scim-bridge instead, export the following:

export QT_IM_MODULE="scim-bridge"

Note for KDE3

For KDE3 you should export QT_IM_MODULE="xim" instead of scim and also install qtimm] for Qt3.

Locale-related files

If your keyboard locale is not en_US.UTF-8 (or en_US.utf8), you have to modify the first line of ~/.scim/global (or /etc/scim/global to apply these settings to all users) according to the following example:

/SupportedUnicodeLocales = en_US.UTF-8,de_CH.UTF-8

and replace your de_CH.UTF-8 with your locale.

Note: Your locale has to be active (i.e. you have to uncomment it in /etc/locale-gen and then execute locale-gen as root) and has to be supported by SCIM (most *.UTF-8 locales are).

If you do not know which locales you have active at the moment, you can check it:

locale -a

(alternatively you can look at /etc/locale.gen).

Further troubleshooting with locales

If after you have install SCIM and the necessary input tables, SCIM still does not work, then you need to set the LC_CTYPE environmental variable in /etc/profile to the locale you plan to use. Simply create an entry for LC_CTYPE such as:

LC_CTYPE="zh_CN.UTF-8" # if you want to type simplified chinese

Finally you need to generate the locale using the locale-gen command.

Executing SCIM

SCIM can be run by just executing the scim command, although it is common to start SCIM as a daemon:

scim -d

You can put the above command in a script file and execute it automatically. Usual places are ~/.xinitrc (after environment variables and before DE/WM), /etc/profile (after environment variables) or ~/.config/openbox/autostart (after environment variables and possibly after some sleep command).

Note for GNOME

In case you use GNOME as your desktop environment, the command above does not seem to work as expected. Instead, you have to execute the following:

scim -f x11 -c simple -d

If you want SCIM to start automatically at startup, go to System > Preferences > Session and create a new command with the line above.

Note: If you use the line scim -f socket -c socket -d instead, the configuration of your SCIM will be unmodifiable.

Note for KDE

In case you use KDE as a desktop environment, the command above does not seem to work as expected. Instead, you have to execute the following: