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 [ 31.86 KiB | 被浏览 2290 次 ]
附件:
cce1.png [ 29.24 KiB | 被浏览 2290 次 ]
附件:
m.png [ 176.76 KiB | 被浏览 2290 次 ]
zhcon:
对于zhcon安装
1. 安装代码
代码:
sudo apt-get install zhcon
2.同样配置开机framebuffer支持,方法一样。
3.启动zhcon,我的文件名编码是utf8,命令如下
代码:
zhcon --utf8
没有看到窗口管理器,用screen
4.效果图片
附件:
zhcon.png [ 12.09 KiB | 被浏览 2290 次 ]
fbterm1.源代码:
fbterm code2.输入法ucimf:
ucimf3.输入法ibuf-fbterm:
ibuf-fbterm其它的方法没有研究,大家相互交流。