Difference between revisions of "Smart Common Input Method platform"
(→Steps for KDE with kdm)
|Line 3:||Line 3:|
Revision as of 07:49, 4 February 2009
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
Add the following lines to ~/.xinitrc before executing your DE/WM. If you want all the users of your system to use scim, place these lines in your /etc/profile.
export XMODIFIERS=@im=SCIM export GTK_IM_MODULE="scim" export QT_IM_MODULE="scim" scim -d
If you use "scim -f socket -c socket -d" instead of "scim -d ",you cannot use scim in some qt program, like eva .
This is what your .xinitrc file should look like. Note that the "exec DE/WM" line comes after the lines for SCIM
#!/bin/sh # # ~/.xinitrc # # Executed by startx (run your window manager from here) # # exec wmaker # exec startkde # exec icewm # exec blackbox # exec fluxbox # SCIM export XMODIFIERS=@im=SCIM export GTK_IM_MODULE="scim" export QT_IM_MODULE="scim" scim -d exec gnome-session
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 get scim working for me, I had to additionally add my current locale to /etc/scim/global (~/.scim/global should work too probably). Change the first line to include your locale. In my case it looks like this now:
/SupportedUnicodeLocales = en_US.UTF-8,de_CH.UTF-8
Configure SCIM for GNOME with gdm
This method seems to work with GNOME when logging in through gdm.
1. Install scim and the relative input methods through pacman
2. Insert the following lines at the end of your /etc/profile
export XMODIFIERS=@im=SCIM export GTK_IM_MODULE="scim" export QT_IM_MODULE="scim"
3. In your GNOME desktop, go to System > Preferences > Session and create a new command with the following line:
scim -f x11 -c simple -d
4. Restart your machine and enjoy!
Note: I tried to put the first three lines in my .xinitrc instead of /etc/profile, but it didn't work for me.
Note: If you use the line scim -f socket -c socket -d instead, the configuration of your SCIM will be unmodifiable.
Steps for KDE with kdm
This method seems to work with KDE when logging in through kdm.
1. Install scim and input engines.
2. Create a new file called .xprofile in your home folder (~/.xprofile) and add the following lines:
export XMODIFIERS=@im=SCIM export GTK_IM_MODULE=scim export QT_IM_MODULE=scim scim -f socket -c socket -d
If you want all the users of your system to use scim, place these lines in your /etc/profile instead.
Steps after this one are optional.
3. Install skim from the AUR.
4. Start SKIM, right click on the system tray icon and click 'Configure'
5. Under Frontend > X Window, tick the checkbox for "Start skim automatically when KDE starts"
6. Logout and restart X server (ctrl+alt+del), then login again
In any application, press ctrl+space to activate the input window.