Smart Common Input Method platform
- 1 About SCIM
- 2 Installing SCIM
- 3 Configure SCIM
Su Zhe (or James Su)-who at that time worked for TurboLinux- started this project about 2001 with the goal:
- Act as an unified frontend for current available input method libraries. Currently bindings to uim and m17n library are available.
- Act as a language engine of IIIMF input method framework (TBD).
- Provide as many native IMEngines as possible.
- Support as many input method protocol/interface as possible.
- Support as many operating systems as possible.
SCIM has the following features:
- Fully Object Oriented structure written in C++.
- Highly modularized.
- Very flexible architecture, can be used as a dynamically loaded library as well as a C/S input method environment.
- Simple programming interface.
- Fully i18n support with UCS-4/UTF-8 encoding.
- Include many handy utility functions to speedup the development.
- GUI Panel with very rich features.
- Unified configuration framework.
- pacman -S 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):
Chinese Smart PinYin:
# pacman -S scim-pinyin
Chinese WuBi or other tables based:
# pacman -S scim-tables
# pacman -S scim-anthy
# pacman -S scim-hangul
In order to work correctly, SCIM configuration needs three steps:
1. exporting environment variables
2. modify locale-related files
3. start the application
Best case example
If you use a good DE/WM and do need SCIM to work urgently, put these lines into /etc/profile and reboot:
export XMODIFIERS=@im=SCIM export GTK_IM_MODULE="scim" export QT_IM_MODULE="scim" scim -d
This is also the base example. The Correct Way of Doing Things is presented below, together with some common variants.
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 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:
Note for KDE3
For KDE you should either change QT IMM to xim, or have scim-qtimm-cvs installed from AUR. Like this:
If your keyboard locale is en_US.UTF-8 (or en_US.utf8), just skip this second step.
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
Obviously, you have to put your locale instead of de_CH.UTF-8.
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:
(alternatively you can look at /etc/locale.gen).
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.
eg. LC_CTYPE="zh_CN.utf8" //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.
To execute SCIM, you usually can just execute (but see below):
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:
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).
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:
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 DE, the command above seems not to work as expected. Instead, you have to execute the following:
scim -f socket -c socket -d
You can also apply following optional steps:
1. Install skim from the AUR.
2. Start SKIM, right click on the system tray icon and click 'Configure'
3. Under Frontend > X Window, tick the checkbox for "Start skim automatically when KDE starts"
4. Logout and restart X server (ctrl+alt+del), then login again
In any application, press ctrl+space to activate the input window.