Ubuntu 8.04命令行中文显示与输入以及界面分辨率配置问题(cce,zhcon,fbterm)说明

系统字体配置、中文显示和输入法问题
回复
头像
a394474295
帖子: 33
注册时间: 2008-10-17 21:13

Ubuntu 8.04命令行中文显示与输入以及界面分辨率配置问题(cce,zhcon,fbterm)说明

#1

帖子 a394474295 » 2009-11-03 17:02

Ubuntu 8.04命令行中文显示与输入以及界面分辨率配置问题(cce,zhcon)说明

弄了下ubuntu的命令行模式,主要问题是分辨率,默认的基础分辨率看者实在是不好,研究下修改过程整理如下:

中文环境的支持需要cce或者zhcon或者jfbterm或者配置locale(内核直接支持中文显示),看个人爱好,我习惯用cce因为它集成窗口管理功能与输入法,其输入法效果还可以,不需要再用screen。进来有些开始用fbterm,界面字体美化方面可以,但是其与jfbterm一样不带输入法,需要自己安装输入法。

cce:
1:安装cce,手动编译的,gcc编译器版本问题,需要打补丁
2:运行cce之前,由于cce的快捷键编码模式是ASCII 模式,而我的终端是UTF-8模式的键盘编码,更改键盘编码方式:

代码: 全选

kbd_mode -a
3:运行cce,我的ubuntu文件名编码方式是utf8,命令如下

代码: 全选

cce -fitler utf8
4:但是进入以后分辨虑是640*480,看的非常不习惯,修改分辨率。
VGA显示模式的分辨率不高,用framebuffer
5:设置启动framebuffer 设置方法参考网页:http://wiki.ubuntu.org.cn/UbuntuWiki:FrameBuffer
Linux2.0之后的内核,可以通过在内核启动参数(一般在grub或lilo的配置文件中内核镜像文件名之后)中加一条vga=< linux内核模式号>让linux在启动时进入帧缓冲控制台模式,linux内核模式号如下:
Colour depth 640x480 800x600 1024x768 1280x1024 1400x1050 1600x1200
8 (256) 769 771 773 775
15 (32K) 784 787 790 793
16 (65K) 785 788 791 794 834 884
24 (16M) 786 789 792 795
具体设置在 /boot/grub/menu.lst里面kernel 那行结尾加上 vga=791 即是 1024x768*16depth,如下:

kernel /boot/vmlinuz-2.6.15-20-386 root=/dev/hda5 ro vga=791

6:重新启动电脑,分辨率 1024x768 ,然后进入cce,结果分辨率还是640*320,怀疑是cce的配置文件问题

7:修改配置文件cce.cfg
具体位置查找:

代码: 全选

find /usr -name cce.cfg  
找到文件中:
FreeBSDFrameBuffer:
#800 600 8
#1024 768 8
1024 768 24
修改如上图


8:重新运行cce还是不行,研究配置文件
下面又看到如下介绍:
# For Linux framebuffer, CCE will use the resolution and color depth
# of current frame buffer, so this option is for FreeBSD ONLY.
# For FreeBSD, system console only supports 640x480x4 and 800x600x4,
# but you can use other VESA resolutions supported by your video card.
# Try 'kldload vesa' to load VESA module, then 'vidcontrol -i mode'
# to list, the format is 'width height depth'. For example, 800 600 8.
# If you put 0 0 0 here, CCE will try to use 800x600x4, then 640x480x4.
FreeBSDFrameBuffer:
#800 600 8
#1024 768 8
1024 768 24
# If you are using a S3 Video Card, please set this option to 'S3'
# CCE will automatically detect the frame buffer and use it if it's
# available. Otherwise CCE will use 640x480x16 colors VGA mode.
#Display:
# S3
Display:
VGA
怀疑是没有调用framebuffer而调用的VGA显示模式,导致的问题。
查看帮助文件

代码: 全选

man cce
其中显示如下:
In Linux, CCE will try to open /dev/fb(and /dev/fb/0) first(and use
current frame buffer's resolution), if that fails, it will use the VGA
mode. For VESA frame buffer driver, you need to add 'vga=MODE' to your
lilo.conf, so video mode can be changed during booting, you can't
change the mode later. Please read /usr/src/linux/Documenta-
tion/fb/vesafb.txt for more information. You can use fbset to display
or change your frame buffer settings. For example: fbset
"1024x768-60", fbset -depth 8. You can check /etc/fb.modes for more
modes. Don't change your frame buffer resolution while CCE is running.
然后查看 /dev 下面硬件
没有找到 /dev/fb,所以调用frame buffer失败
9:做连接如下:

代码: 全选

sudo ln -s /dev/fb0 /dev/fb  
10:重新运行cce效果非常好,截图如下:
cce.png
cce1.png
m.png

zhcon:
对于zhcon安装
1. 安装代码

代码: 全选

sudo apt-get install zhcon
2.同样配置开机framebuffer支持,方法一样。
3.启动zhcon,我的文件名编码是utf8,命令如下

代码: 全选

zhcon --utf8
没有看到窗口管理器,用screen
4.效果图片
zhcon.png
fbterm
1.源代码:fbterm code
2.输入法ucimf:ucimf
3.输入法ibuf-fbterm:ibuf-fbterm
其它的方法没有研究,大家相互交流。
上次由 a394474295 在 2009-11-04 13:22,总共编辑 3 次。
onelynx
帖子: 817
注册时间: 2008-11-13 16:03

Re: Ubuntu 8.04命令行中文显示与输入以及界面分辨率配置问题(cce,zhcon)说明

#2

帖子 onelynx » 2009-11-03 17:27

楼主,你老了,现在都是开framebuffer,用fbterm,
头像
a394474295
帖子: 33
注册时间: 2008-10-17 21:13

Re: Ubuntu 8.04命令行中文显示与输入以及界面分辨率配置问题(cce,zhcon)说明

#3

帖子 a394474295 » 2009-11-03 21:47

fbterm试验效果如下L:
fbterm.png
头像
a394474295
帖子: 33
注册时间: 2008-10-17 21:13

Re: Ubuntu 8.04命令行中文显示与输入以及界面分辨率配置问题(cce,zhcon,fbterm)说明

#4

帖子 a394474295 » 2009-11-05 10:36

fbterm + ucimf + w3m上网效果如下:

w3m1.png
回复