Subsections

2 中文环境设定

2.1 我现在要安装 Debian,我想使用中文,需要怎么做呢?

Contributed by: mailto:ygh@debian.orgYu Guanghui 2000/11/19



和正常安装 Debian 一样没有什么特别,在安装过程中选择 task-chinese-s(简体) 或 task-chinese-t (繁体)。有一点要注意, potato 安装时, 有可能出现有些包选了,但是没有安装上,这时需要您手工运行 dselect, 直接进入 Install 菜单就可以了。

2.2 我已经有了 Debian 系统,我怎样添加中文支持?

Contributed by: mailto:ygh@debian.orgYu Guanghui 2000/11/19



确认您的 /etc/apt/sources.list 设置正确,运行命令apt-get install task-chinese-s (简体) 或 apt-get install task-chinese-t (繁体)。

2.3 如何为 libc6 2.2 生成 locale 文件?

Contributed by: mailto:ygh@debian.orgYu Guanghui 2000/11/19



从 libc6 2.2 开始 locale 文件需要您自己来生成。编辑 /etc/locale.gen, 去掉您需要的 locale 的注释,然后以 root 身份来运行 locale-gen

2.4 我已经安装了中文支持,还需要作什么才能正常使用中文?

Contributed by: mailto:ygh@debian.orgYu Guanghui 2000/11/19



确认您设定了以下参数 (bash) :

$(HOME)/.bashrc
alias ls=``ls -show-control-chars''
export LC_ALL=zh_CN.GB23122
export LC_CTYPE=zh_CN.GB2312
export LANG=zh_CN.GB2312
export XMODIFIERS=``@im=Chinput''3
stty cs8 -istrip
stty pass8

$(HOME)/.inputrc
set meta-flag on
set convert-meta off
set output-meta on

2.5 炎黄中文平台下为什么总出现任何输入都没有反应的情况?

Contributed by: mailto:ygh@debian.orgYu Guanghui 2000/11/19



炎黄中文平台目前只支持 vt100 终端类型,所以在启动炎黄平台前先运行 export TERM=vt100,也可以把这条命令放到 $(HOME)/.bashrc 里。

2.6 我怎么能让 XFree86 3.3.6 使用 TrueType 字体呢?

Contributed by: mailto:ygh@debian.orgYu Guanghui 2000/11/19



确认已经安装并启动 xfs-xtt 字体服务器,然后在 /etc/X11/XF86Config 的 Section ``Files'' 小节中加入 FontPath ``unix/localhost:7100''

2.7 我怎么能让 XFree86 4.0 使用 TrueType 字体呢?

Contributed by: mailto:ygh@debian.orgYu Guanghui 2000/11/19



XF4.0.2 使用 xtt 的 module 来支持 GB/Big5 的 TrueType 字体,已经不再需要 xfs-xtt 了。 在 /etc/X11/XF86Config-4 的 Section ``Files'' 小节中加入 FontPath ``/usr/lib/X11/fonts/TrueType'', 然后将 Load ``freetype'' 替换成 Load ``xtt'' 就可以了。 可以将 FontPath ``unix/:7100'' 注释掉。

Contributed by: mailto:foka@debian.orgAnthony Fok 2001/08/23



如果你用的是 woody/sid ,并且 x-ttcidfont-conf 版本是3.5以上,请在 /etc/X11/XF86Config-4的 Section ``Files'' 加上:

FontPath ``/usr/lib/X11/fonts/defoma/TrueType/''
FontPath ``/usr/lib/X11/fonts/defoma/CID/''

Contributed by: mailto:ygh@debian.orgYu Guanghui 2002/01/04



如果您用的是 x-ttcidfont-conf 版本 8 以上,请做如下修改 /etc/X11/XF86Config-4的 Section ``Files'' 加上:

FontPath ``/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType/''
FontPath ``/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID/''

Contributed by: mailto:ygh@debian.orgYu Guanghui 2001/10/20



请注意升级 x-ttcidfont-conf 到版本 7 以上。这个版本修正了在使用 xtt 字体服务器 的时候只有黑体和斜体字的问题。

2.8 我用 xfs-xtt 缩放字体后,为什么 X 变的特别慢?

Contributed by: mailto:ygh@debian.orgYu Guanghui 2000/11/19



这是因为您启动 X 时没有加入 -deferglyphs 16 的参数。这样话 xfs-xtt 就 会试图产生全部的字体。因此要用 startx -- -deferglyphs 16 来启动 X。 如果使用 xdm 的话,就要在 /etc/X11/xdm/Xserver 里加入 -deferglyphs 16

2.9 怎样才能使用 XCIN 输入中文呢?

Contributed by: mailto:ygh@debian.orgYu Guanghui 2000/11/19



XCIN 使用的是 XIM 协议,只有支持 XIM 的程序才能接受 XCIN 输入。 在运行应用程序前,要先运行 XCIN,并且设定 XMODIFIERS=``@im=xcin-zh_CN.GB2312''。可以在 $(HOME)/.bashrc 里加入 export XMODIFIERS=``@im=xcin-zh_CN.GB2312''。 然后就可以用 ctrl+space 来激活输入法。如果是在 Big5 模式,请设定 XMODIFIERS=``@im=xcin'';后面如果加上 ``-zh_TW.Big5'' 就反而不行了。 Xcin uses the XIM protocol, so only applications that support XIM will accept xcin input. Before running the application, you should start xcin, and set:

export XMODIFIERS=``@im=xcin-zh_CN.GB2312''
at the command line or in your $(HOME)/.bashrc to select simplified Chinese support. After starting the application, you can use ctrl-space to toggle input methods.
To use traditional Chinese, set XMODIFIERS to ``@im=xcin''. Adding ``-zh_TW.Big5'' will not work.


Contributed by: mailto:foka@debian.orgAnthony Fok 2000/12/10



更简单的办法,是先升级至 Debian 2.2r2 里的 xcin-2.5.2 版,或 Debian unstable (woody) 里的 xcin-2.5.2.2 版,然后您就可以直接从菜单启动 XShell $\rightarrow$ XCINterm (GB2312) 或 XCINterm (Big5),或从任何 shell 的提示符运行 xcinterm-gb 或 xcinterm-big5),系统就会自动为您打开可以输入中文的 xcin 服务器和 crxvt 终端了。

2.10 怎样才能使用 Chinput 输入中文呢?

Contributed by: mailto:ygh@debian.orgYu Guanghui 2000/11/19



Chinput 目前还没有正式纳入 Debian,因为 Chinput 要使用 UNICON 的输入法, 而 UNICON 还需要做进一步的测试。您可以从:
http://master.debian.org/~ygh/unicon-im_3.0-1_i386.deb
http://master.debian.org/~ygh/chinput_3.0.1-1_i386.deb
下载和安装 unicon-im 和 chinput。
chinput 使用的也是 XIM 协议,只有支持 XIM 的程序才能接受输入。 在运行应用程序前,要先运行 chinput,并且设定 XMODIFIERS=``@im=Chinput''。可以在 $(HOME)/.bashrc 里加入 export XMODIFIERS=``im=Chinput''。 然后就可以用 ctrl+space 来激活输入法。需要注意的是默认设置的 chinput 包使用的是 TrueType 字体。

补注:chinput 和 unicon-im 已经顺利进入 Debian unstable 里面了。各位使用 unstable 的朋友,用 apt-get install chinput unicon-im 就可以了。

Contributed by: mailto:ygh@debian.orgYu Guanghui 2000/10/20



注意: chinput 只能使用16点阵的字体。

2.11 设定好中文环境后,icewm 的窗口标题怎么变的特别大?

Contributed by: mailto:ygh@debian.orgYu Guanghui 2001/01/05



你需要手工改一下 icewm 的配置文件,设定一下窗口的文字的大小。可以先将 /etc/X11/icewm/preferences 复制为 $(HOME)/.icewm/preferences, 然后修改 $(HOME)/.icewm/preferences。 找到 #TitleFontName="-adobe-helvetica-bold-r-*-*-*-120-*-*-*-*-*-*", 修改 TitleFontName="-default-song-bold-r-normal--16-160-72-72-c-160-gb2312.1980-0" 或 TitleFontName="-default-ming-bold-r-normal--16-160-72-72-c-160-big5-0"

2.12 cce, crxvt

Debian 中文计划