alias gbgt='LANG=zh_CN.GB18030 XMODIFIERS=@im=Chinput gnome-terminal &'
Start from anywhere (be it gnome-terminal or xterm)
gbgt
When system language is set to English, start Chinese gnome like this:
LANG=zh_CN.GB2312 GDM_LANG=zh_CN.GB2312 XMODIFIERS=@im=Chinput startx -- :1
as myself:
LANG=zh_CN.GB2312 GDM_LANG=zh_CN.GB2312 XMODIFIERS=@im=Chinput WMSTYLE=gnome startx -- :1
to start gnome, or use next command to start my default fluxbox
LANG=zh_CN.GB2312 GDM_LANG=zh_CN.GB2312 XMODIFIERS=@im=Chinput startx -- :1
Note, in both gnome & fluxbox, chinput is automatically started. Chenqiao Chinese works fine.
Start English Xwin, then manually start chinput, then gbgt, will show and input AOK.
NB,
miniChinput should be started with LANG=zh, as:
$ LANG=zh_CN.GB2312 minichinput & [6] 2876
Chinput Version 3.0.2 -- XIM Server Distributed under the terms of the GNU General Public License (GPL) Following charsets: 0: -Sony-Fixed-Medium-R-Normal--16-120-100-100-C-80-ISO8859-1 1: -misc-zysong18030-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0 Chinput ................................................[OK]
[6]+ Done LANG=zh_CN.GB2312 minichinput
If no LANG=zh is specified, minichinput will 'segmentation fault':
$ minichinput & [6] 2873
Chinput Version 3.0.2 -- XIM Server Distributed under the terms of the GNU General Public License (GPL) Following charsets:
[6]+ Segmentation fault minichinput
At least this is true under my fluxbox.
documented on: 2003.10.27 Mon
$ env | grep LAN LANGUAGE=zh_CN.GB18030:zh_CN.GB2312:zh_CN LANG=zh_CN.GB2312 GDM_LANG=zh_CN.GB2312
$ env | grep zh_ LANGUAGE=zh_CN.GB18030:zh_CN.GB2312:zh_CN LANG=zh_CN.GB2312 GDM_LANG=zh_CN.GB2312
ps -eaf | grep -Ev '/tong/|bash|gnome-terminal|emacs|(xterm|aspell|ps|cut) ' | cut -c1-9,49- | sort
There is no magic behind invocation chinput.
chinput &
then
LANG=zh_CN.GB18030 XMODIFIERS=@im=Chinput gnome-terminal &
That's it. It can also be killed and started again, like above.
$ gbinputm [1] 2844 Chinput Version 3.0.2 -- XIM Server Distributed under the terms of the GNU General Public License (GPL)
Basic: Cannot open font -misc-zysong18030-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0
[1]+ Exit 255 LANG=zh_CN minichinput
$ aliasf gbinputm alias gbinputm='LANG=zh_CN minichinput &'
Specify GB18030!
$ LANG=zh_CN.GB18030 minichinput &
Chinput Version 3.0.2 -- XIM Server Distributed under the terms of the GNU General Public License (GPL) Following charsets: 0: -Sony-Fixed-Medium-R-Normal--16-120-100-100-C-80-ISO8859-1 1: -Sony-Fixed-Medium-R-Normal--16-120-100-100-C-80-ISO8859-1 2: -misc-zysong18030-medium-r-normal--0-0-0-0-c-0-iso10646-1 Chinput ................................................[OK]
[6]+ Done LANG=zh_CN.GB18030 minichinput
system language set to Chinese
LANG, GDM_LANG are all default as Chinese Ok, chinput started:
WMSTYLE=gnome startx -- :1
Ok to launch, but whole system is still Chinese, no surprise chinput started:
LANG=C WMSTYLE=gnome startx -- :1
NOk, chinput not started:
GDM_LANG=C WMSTYLE=gnome startx -- :1
NOk, chinput not started:
echo export GDM_LANG=C >> /root/.bash_profile
# exec bash --login is not good. all previous set envar are still there. su - WMSTYLE=gnome startx -- :1
No log entries in tty. gnome does not even attempt to start chinput
Retry and confirm the above results at least twise.
Conclusion.
root & crewbase are able to input Chinese.
From my account, chinput report some font problems, because of my .chinput.
Chinput Version 3.0.2 -- XIM Server Distributed under the terms of the GNU General Public License (GPL) Following charsets: 0: -Sony-Fixed-Medium-R-Normal--16-120-100-100-C-80-ISO8859-1 1: -Sony-Fixed-Medium-R-Normal--16-120-100-100-C-80-ISO8859-1 2: -misc-zysong18030-medium-r-normal--0-0-0-0-c-0-iso10646-1 Chinput ................................................[OK]
cat: /home/tong/.Xauthority: Permission denied Chinput Version 3.0.2 -- XIM Server Distributed under the terms of the GNU General Public License (GPL) Basic: Cannot open font ccs16_1 SESSION_MANAGER=local/xpt:/tmp/.ICE-unix/13514
Ahh! because of my left over .chinput file!
Remove it and everything works fine!!!
set
GDM_LANG=C
in ~/.profile
and restart Gnome w/ Language = Chinese.
Have to
export GDM_LANG=C
For the following to work. Otherwise, Gnome started in Chinese.
$ LANG=zh_CN.GB18030 XMODIFIERS=@im=Chinput gnome-terminal & font "-misc-fixed-medium-r-normal--14-*-*-*-*-*-*-1" does not support all the required character sets for the current locale "zh_CN.GB18030" (Missing character set "GB2312.1980-0") The font "-misc-fixed-bold-r-normal--14-*-*-*-*-*-*-1" does not support all the required character sets for the current locale "zh_CN.GB18030" (Missing character set "GB2312.1980-0")
Good! gnome-terminal started in Chinese menu
$ env | grep LAN LANGUAGE=zh_CN.GB18030:zh_CN.GB2312:zh_CN LANG=C GDM_LANG=C
— LANG presetting doesn't work. Have to set again in newly launched gnome-terminal in order for date to show Chinese.
LANG=zh_CN.GB18030; GDM_LANG=zh_CN.GB18030
date
— Yes! Chinese
^-Space
YES! chinput input bar!!!