This article described the usage of miniChinput.

1. Running environment and environment variables:

    The miniChinput provide a XIM server program, chinput, which should 
run under/for a X server with XIM support. Two environment variables need to 
be set before chinput is executed. 

Firstly, a supported locale should be specified, for example:
	export LANG=zh_CN.GB2312
	export LC_CTYPE=zh_CN.GB2312
You can check your locale setting by the shell command, locale.
The same thing can be done by some initial script: for some Linux distribution,
a file ~/.i18n defines the locale environment.

Secondly, the XIM clients should know how to connect to the server, so the IM 
identifier of chinput should be given to the system environment.
	export XMODIFIERS=@im=Chinput

2. Configuration file and Chinese fonts

    Assume we are using zh_CN.GB2312 locale. Before run the server, you need 
to modifies the Chinput.ad file for your system. The global configuration 
Chinput.ad is generally localed in $prefix/lib/Chinput directory, the file 
for current user is in the user home directory and named .chinput.
    Basically, there are only two things need to be modified: default locale 
and the fonts used by chinput.
    The entry "chinput.gblocale" should be same as your environment setting, 
say zh_CN.GB2312. 
    There are several lines in the file for font setting:

	chinput.font		=	8x16	//Font for ASCII
	chinput.gbfont		=	*	//GB2312 fontset
	chinput.gbkfont		=	*	//GBK fontset
	chinput.gb18030font	=	*	//GB18030 fontset
	chinput.big5font	=	*	//Big5 fontset

It is not necessary to have all those encoding on your system, for example, 
if we only need gb2312, the GBK, GB18030, and BIG5 fonts could be set to
	-*-*-*-*-*--*-*-*-*-*-*-*-*      .
To find what GB fonts installed on your X system, use the following command.
	xlsfonts |grep -i gb

3. Ready? Go!
   Simply, the command, chinput, will turn on the server. It can be executed 
under X. It has better been executed before any other X clients' running, so 
those X clients can use the XIM server. The best way to run chinput before 
X clients and after X server, is add several lines to your xinit script. 
Before digging into those xinit script, you'd better test the XIM server in 
the following way.
    	- Turn on X server by using the command xinit, a simple xterm will be 
	provided.
	- Set the environment variables: LANG, LC_CTYPE, and XMODIFIERS
	- run chinput
	- run your window management software, example: gnome-session
	- try some XIM clients, example: rxvt, gnome-terminal......
	- Ctrl-space, to enable chinput, and try it.

    If the above testing works, try to add those steps to your X start 
scripts.

4. HotKeys:
	Control-space: Enable/disable the connection between the XIM 
		client and the XIM server, chinput.
	Alt-space: Circularly switch the input styles: ROOT, OVERTHESPOT, 
		ONTHESPOT, OFFTHESPOT.
	Control-Shift: Circularly switch the input modes.
	Shift-space: Switch between ASCII and Wide ASCII modes.
	Control-period: Switch between Chinese and English punctuation sets.

5. XIM clients:
	Almost all KDE and Gnome stuffs are good XIM clients, which can 
be supported by the Chinput server. However, you may be challenged by 
font setting of the applications. Check the manuals of those applications 
for "fontset" support, which is used for display ASCII and Chinese fonts 
simultaneously.
	If you really don't like those "fat" applications, I suggest 
'rxvt' - a terminal emulator, and 'mozilla' - a browser.  

6. BUGs:

-----------------------------------
miniChinput project: <http://sourceforge.net/projects/minichinput>
Bo Zhang             <http://scf.usc.edu/~bozhang>
                     <bozhang@usc.edu>
