在CentOS4.4配置zhcon-0.2.6(支持UTF-8)

简介: FOR GCC:   yum -y install gccFOR C++/G++   yum -y install gcc-c++ compat-gcc-32 compat-gcc-32-c+...

FOR GCC:
   yum -y install gcc

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')


四、查看配置:

[root@fish zhcon-0.2.5]# gedit /usr/local/etc/zhcon.conf

#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

#blanklineheight must >= 0
blanklineheight = 1

#0, default(block); 1, none; 2, underline
#3, 1/3 block; 4, 1/2 block; 5, 2/3 block; 6, block
cursortype = 6

beep = on

#whether to display startup message
startupmsg = on

#whether to enter prompt mode when start
#you can enter prompt mode by press CTRL-ALT-0
promptmode = off

# set font name, all font must be placed in PREFIX/lib/zhcon/
# for use with 24 pixel font
# ascfont = font/asc24.bpsf
# gbfont = font/gb-24-kai.bpsf

ascfont = font/asc16.bpsf
gbfont = font/gb-16.bpsf
gbkfont = font/gbk-16.bpsf
big5font = font/big5-16.bpsf
jisfont = font/jis-16.bpsf
kscfont = font/ksc-16.bpsf

#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 := <input method's name>
#module := <module file name>
#table := <table file name>
#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

修改如下部分:
#x_resolution = 640
#y_resolution = 480
x_resolution = 800
y_resolution = 600

#color_depth = 4
color_depth = 8


六、使用UTF-8编码:
在字符终端模式下:
[lwg@fish ~]$ zhcon --utf8  

目录
相关文章
|
11月前
|
应用服务中间件 Linux 网络安全
Centos 8.0中Nginx配置文件和https正书添加配置
这是一份Nginx配置文件,包含HTTP与HTTPS服务设置。主要功能如下:1) 将HTTP(80端口)请求重定向至HTTPS(443端口),增强安全性;2) 配置SSL证书,支持TLSv1.1至TLSv1.3协议;3) 使用uWSGI与后端应用通信(如Django);4) 静态文件托管路径设为`/root/code/static/`;5) 定制错误页面(404、50x)。适用于Web应用部署场景。
967 87
|
9月前
|
存储 Linux Apache
在CentOS上配置SVN至Web目录的自动同步
通过上述配置,每次当SVN仓库中提交新的更改时,`post-commit`钩子将被触发,SVN仓库的内容会自动同步到指定的Web目录,从而实现代码的连续部署。
254 16
|
9月前
|
NoSQL 安全 Linux
设置Redis在CentOS7上的自启动配置
这些步骤总结了在CentOS 7系统上设置Redis服务自启动的过程。这些命令提供了一个直接且明了的方式,确保Redis作为关键组件在系统启动时能自动运行,保障了依赖于Redis服务的应用的稳定性和可用性。
679 9
|
Linux 网络安全 Apache
CentOS 7.2配置Apache服务httpd(上)
CentOS 7.2配置Apache服务httpd(上)
929 1
|
11月前
|
Linux
Centos6配置阿里云yum源报错
在CentOS 6配置阿里云Yum源时,可能出现EPEL仓库访问报错(404 Not Found)。解决方法:编辑`/etc/yum.repos.d/epel.repo`文件,将`enabled`和`gpgcheck`参数设为0 ``` 此设置可解决仓库无法访问的问题。
2195 29
|
11月前
|
Ubuntu 安全 Linux
CentOS与Ubuntu中防火墙配置命令集汇
有了这些,你就能遨游在 CentOS 和 Ubuntu 的海洋中,频繁地改变你的防火墙设置,快速地应对各种安全威胁,同时也能保证你的系统可以正常工作。出发吧,勇敢的编程者,随着这些命令集的涌动,扬帆起航,走向安全的网络世界!
363 5
|
12月前
|
关系型数据库 MySQL Linux
CentOS 7系统下详细安装MySQL 5.7的步骤:包括密码配置、字符集配置、远程连接配置
以上就是在CentOS 7系统下安装MySQL 5.7的详细步骤。希望这个指南能帮助你顺利完成安装。
2907 26
|
安全 Linux 网络安全
在Linux(CentOS和AWS)上安装更新的git2的方法并配置github-ssh
经过以上这些步骤,你现在就能在GitHub上顺利往返,如同海洋中的航海者自由驰骋。欢迎你加入码农的世界,享受这编程的乐趣吧!
499 10
|
Java
CentOS7.8配置Adoptium-Java17运行环境
本指南介绍如何设置清华镜像源并安装 Temurin-17-JRE 运行环境。首先,编辑 `/etc/yum.repos.d/adoptium.repo` 文件,配置清华镜像源。接着,使用 `yum install -y temurin-17-jre` 命令安装 Temurin-17-JRE,并通过 `java --version` 验证安装成功。相关配置和操作界面截图附后。
651 8