FOR C++/G++ yum -y install gcc-c++ compat-gcc-32 compat-gcc-32-c++
一、解壓縮、打補丁:
[root@fish installing]# tar zxvf zhcon-0.2.5.tar.gz [root@fish installing]# gunzip zhcon-0.2.5-to-0.2.6.diff.gz [root@fish installing]# cd zhcon-0.2.5/ [root@fish zhcon-0.2.5]# patch -p1 < ../zhcon-0.2.5-to-0.2.6.diff
二、編譯、安裝:
[root@fish zhcon-0.2.5]# ./configure [root@fish zhcon-0.2.5]# make && make install [root@fish zhcon-0.2.5]# whereis zhcon zhcon: /usr/local/bin/zhcon /usr/local/etc/zhcon.conf /usr/local/lib/zhcon
三、查看幫助:
[root@fish zhcon-0.2.5]# zhcon --help zhcon
A Fast CJK Console Environment
Usage: zhcon [OPTIONS]... [FILES]...
-h, --help Print help and exit -V, --version Print version and exit --utf8 use iconv filter to convert UTF-8 stream from/to system encoding (default=off) --drv=STRING specify video driver (auto, fb, ggi, vga) (default=`auto')
#this is config file for zhcon #it can be named as ~/.zhconrc or /etc/zhcon.conf #you can edit it manually
#zhconpath = /usr/local/lib/zhcon/
#unicon(3.x) path uniconpath = /usr/lib/unicon/
#defaultencode: default encoding can be :gb2312,gbk,big5,jis,ksc defaultencode = gb2312
#autoencode: auto detect current Chinese encoding(GB2312 or BIG5) #when autoencode is set zhcon will try to detect current Chinese encoding #after idle 1 second and change current Chinese encoding to #GB2312 or BIG5.This function is useful if you are viewing many text files #with different encoding type. #auto,auto-gb,auto-big5,manual autoencode = manual
#screen resolution #NOTE: # 1) These only works on FreeBSD. On Linux these options will be IGNORED! # 2) If your FreeBSD kernel has VESA support compiled in(with # "options VESA") and your display adapter support VESA(most cards will # do), you can set color_depth to 8 or higher. This means you can use # 640x480x256 colors, 640x480x65536 colors, 800x600x256 colors...etc # BUT you will not able to use 640x480x16 colors! (Of course I don't # think you will want to run 16 colors mode at all :)) # 3) If your FreeBSD kernel has not VESA support(or you even don't know # what's kernel or what's VESA), you can only set color_depth to 4. # That is, you can only run 16 colors mode(VERY slowly). # 4) Ok, if you don't understand me at all, it's OK. Just go and find a # FreeBSD wizard and ask him to compile a new kernel with VESA support # for you and ... emmmm ... explain all these stuff to you ... # x_resolution = 640 y_resolution = 480 # 4 bits = 16 colors, 8 bits = 256 colors, 16 bits = 64K colors, and so on.. # By defalut, 640X480X16 color is used to support as many video cards as # possible. zhcon works very SLOWLY under this mode. You should try setting # color_depth=8 to use 256 color (VESA mode) after recompiling your kernel # with VESA support to gain most out of your hardware. color_depth = 4
#inputstyle: overspot or nativebar inputstyle = overspot
# color scheme format # text's fore, back, color1, color2, frame's light, dark color # change push style to pop by swap frame's light/dark color # red style = 15,4,11,14,12,0 # blue style = 15,1,11,14,9,0 # white style = 0,7,1,1,15,8 overspotcolor = 0,7,1,1,15,8 nativebarcolor = 15,4,11,14,0,12
showtips = on
#change input method here #the first ime is the default ime when press CTRL_SPACE #only the first nine imes are avaiable to zhcon #you can add more ime from Chinput's config file #format: ime = imename,module,table,encode,type #imename := #module := #table :=
#encode := gb2312 | gbk | big5 #type := native | unicon ime = 全拼,,input/winpy.mb,gb2312,native ime = 五筆,,input/wb.mb,gb2312,native ime = 雙拼,,input/winsp.mb,gb2312,native ime = ︽?30,,input/big5-ary30.mb,big5,native ime = ??,,input/big5-cj.mb,big5,native ime = ??,,input/big5-phone.mb,big5,native ime = ?郊μ,,input/big5-liu5.mb,big5,native ime = 智能拼音,cce_pinyin.so,cce,gb2312,unicon ime = GBK拼音,TL_hzinput.so,gbk/gbkpy_mb.tab,gbk,unicon ime = 自然碼,TL_hzinput.so,gb/zrm-2.tab,gb2312,unicon ime = ?懼塊な,TL_hzinput.so,big5/pinyin.tab,big5,unicon ime = ??塊?,TL_hzinput.so,big5/cj.tab,big5,unicon ime = 虜?塊?,TL_hzinput.so,big5/simplex.tab,big5,unicon ime = 全拼2,,input/py.mb,gb2312,native ime = 雙拼2,,input/py.mb,gb2312,native ime = 大眾,,input/dzm.mb,gb2312,native ime = 英中,,input/ed.mb,gb2312,native ime = 簡拼,,input/jp.mb,gb2312,native ime = 普通,,input/pt.mb,gb2312,native ime = 五筆二維,,input/wbew.mb,gb2312,native ime = 五筆劃,,input/wbh.mb,gb2312,native ime = 繁體倉頡,,input/cjf.mb,gb2312,native ime = 簡體倉頡,,input/cjj.mb,gb2312,native
五、修改配置:
[root@fish zhcon-0.2.5]# cp /usr/local/etc/zhcon.conf /usr/local/etc/zhcon.conf.myBak [root@fish zhcon-0.2.5]# vim /usr/local/etc/zhcon.conf