[SCIM] Re: Problems starting SCIM

Zhe Su james.su at gmail.com
Wed Jun 16 19:19:57 PDT 2004


Hi,
  First of all, you may try use scim --help to get a simple
instruction about each command line options. The result is:

Usage: scim [option]...

The options are:
  -l, --list              List all of available modules.
  -f, --frontend name     Use specified FrontEnd module.
  -c, --config name       Use specified Config module.
  -e, --engines name      Load specified set of IMEngines.
  -ne,--no-engines name   Do not load those set of IMEngines.
  -d, --daemon            Run scim as a daemon.
  -v, --verbose           Enable debug info, multiple -v for more.
  -o, --output file       Output debug information into file.
  -m, --mask mask         Set debug output mask, the valid values are:
                          all,main,config,imengine,backend,frontend,module,
                          utility,iconv,lookuptable,socket.
                          multiple masks can be separated by comma.
  -h, --help              Show this help message.


  Then maybe you want to know what scim modules are available in your
system. Here is my result of "scim -l" command:

Available FrontEnd module:
    socket
    x11

Available Config module:
    gconf
    simple
    socket
    dummy

Available IMEngine module:
    m17n
    pinyin
    rawcode
    socket
    table
    uim


So I found that there are six SCIM IMEngine modules in my system. The
purpose of these six modules are:

* m17n      input method engine to use m17n lib as the backend
* pinyin    the smart pinyin Simplified Chinese input method
* rawcode   the input method which uses hex code to input chars
* socket    the proxy input method engine which uses with socket
frontend to construct a Client-Server input method environment.
So this is not a real input method engine.
* table     the engine which supports table based input method
* uim       the engine which uses uim as the backend

And there are two FrontEnd module available:
* x11       the FrontEnd module to support XIM protocol
* socket    the FrontEnd module which acts as a socket server and can
forward input method services to a socket IMEngine instance.

So using SCIM is very flexible. There are two primary usage:

1. Use SCIM as a XIM input method server directly.
  In this case, you just want to load all real IMEngines along with
x11 FrontEnd. The command is:

$ scim -f x11 -c simple -ne socket -d
$ export XMODIFIERS=@im=SCIM

The option "-f x11" tells scim to use x11 FrontEnd. "-c simple" tells
scim to use the simple Config module, it's just enough for most users.
"-ne socket" tells scim to not load socket IMEngine. So all other
IMEngines will be loaded automatically. "-d" tells scim to run as a
daemon.

2. Use SCIM IMEngines within a gtk2 application directly.
  In this case, you want to load one or more real IMEngines into a
gtk2 application with SCIM's gtk2 immodule. First of all, be sure the
SCIM's gtk2 immodule has been installed. It's normally installed into
/usr/lib/gtk-2.0/immodules/, the module name is im-scim.so
  Because we can not pass an option to SCIM's gtk2 immodule with a
command line option, we must specify which modules we want to load via
environment var. For example, if you want to use pinyin IMEngine
within gedit directly, just use the command:

$ GTK_IM_SCIM_IMENGINE_MODULES=pinyin GTK_IM_SCIM_CONFIG_MODULE=simple gedit

3. Setup a SCIM service daemon and let all clients get input method
services via this daemon.
  In this case, you should start a SCIM process with Socket FrontEnd
first, with the IMEngines you want to use. For example:

$ scim -f socket -ne socket -c simple -d

This command starts a scim process with Socket FrontEnd and load all
IMEngines except the socket IMEngine (because this is not a real one),
and uses simple Config module. This process will run as a daemon.

Then you can starts a SCIM process with x11 FrontEnd to provide input
method services via XIM protocol. In this case, you can let this SCIM
process just get services from the previous SCIM process. The command
is:

$ scim -f x11 -e socket -c socket -d
$ export XMODIFIERS=@im=SCIM

Option "-f x11" tells scim to use x11 FrontEnd (this is same as the
first case). "-e socket" tells scim to only load the socket IMEngine.
Then the socket IMEngine module will establish a socket connection
with the socket FrontEnd started by the previous command, and forward
the input method services to x11 FrontEnd. "-c socket" tells scim to
use the Socket Config module, which can get and set configurations via
the Socket FrontEnd process.

In this case, the SCIM XIM server (this process) does not hold any
real input method engine, all input method services are just  get from
the SCIM Socket FrontEnd process.
Check the memory usage of these two SCIM processes, you can find that
the second SCIM process only takes very little memory.

Besides the SCIM XIM server, you also can let gtk2 applications use
the input method services provided by the SCIM SocketFrontEnd process.
For example:

$ unset GTK_IM_SCIM_IMENGINE_MODULES
$ unset GTK_IM_SCIM_CONFIG_MODULE
$ GTK_IM_MODULE=scim gedit

SCIM's gtk2 immodule will only load socket IMEngine and socket Config
module by default.

Conclusion:
If you just want to use XIM input method protocol in all applications.
just start a single scim process with x11 FrontEnd:

$ scim -f x11 -ne socket -c simple -d
$ export XMODIFIERS=@im=SCIM
$ export GTK_IM_MODULE=xim

If you want to use gtk2 immodule in gtk2 apps, but XIM in other apps.
The best way is:

$ scim -f socket -ne socket -c simple -d
$ scim -f x11 -e socket -c socket -d
$ export XMODIFIERS=@im=SCIM
$ export GTK_IM_MODULE=scim


Do you clear enough?

SCIM lacks documentation very much right now. I'll very appreciate, if
anyone can help me write some documents, in English and Japanese.

Regards
James Su

On Thu, 17 Jun 2004 03:26:53 +0200, David Oftedal <david at start.no> wrote:
> 
> > So my question is, have you installed scim 0.9 before?  And if yes, did
> > you clean up you scim 0.9 stuff before installing scim 0.99?
> >
> > Ming
> > 2004.06.16
> 
> Ah, I see! You're absolutely right. After uninstalling and then
> reinstalling SCIM in the "C" locale and then reinstalling scim-uim and
> scim-m17n, I was able to get it running. Thanks a lot, that really
> helped me out! :)
> 
> I guess it's on to the next problem then: The command lines. I can't
> find a single one that does what I need it to do, namely start SCIM with
> all the input methods. I know about three so far:
> 
> =======================================
> scim -f socket -e uim,m17n -c simple -d
> =======================================
> 
> This one should never be used, because it enables UIM support in GTK+,
> but disables everything else. Since UIM already has support under GTK+,
> this means you now have two ways of using UIM and no way of using SCIM.
> 
> =======================================
> scim -f socket -ne socket -c simple -d
> =======================================
> 
> This one disables UIM and enables everything else. Surprisingly, it
> seems to enable the UIM methods that use m17n, but not the most useful
> methods.
> 
> =======================================
> scim -f x11 -e socket -c socket -d
> =======================================
> 
> This one seems to be doing the same thing, only for XIM. It enables all
> the available methods except for the regular UIM methods. Too bad,
> because those are the methods I wanted to use the most.
> 
> In short, I don't know what to say except for "I don't get it". I can
> get bits of it working, but I can't get everything working at the same
> time. Perhaps you could add an -e all option that just autodetected
> everything? Or actually, just remove it? :) I can't bring myself to
> understand what the -ne and -c options do either.
> 
> -David Oftedal
> 
> 
> 
> _______________________________________________
> scim mailing list
> scim at freedesktop.org
> http://freedesktop.org/mailman/listinfo/scim
>



More information about the scim mailing list