Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
让你的终端同时支持中文和 PP 的背景:)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese)
View previous topic :: View next topic  
Author Message
sunmoon1997
n00b
n00b


Joined: 22 Nov 2004
Posts: 33

PostPosted: Mon Dec 20, 2004 9:11 am    Post subject: 让你的终端同时支持中文和 PP 的背景:) Reply with quote

在控制台使用一些中文终端时(如 zhcon, cce 等等), 这些终端都将背景设为黑色, 把 gensplash
PP 的背景都挡住了, 十分难看。 有没有两全的办法了, 既可以使用中文, 又可以有漂亮的背景
了?前几天 jackey 告诉我 unicon 补丁可以用在 2.6.9-nitro4 的内核上, 使我感觉有希望了,
通过对比 gensplash 和 unicon 的补丁, 找出了 2.6.9 内核上实现这个“小梦想”的方法。具体该
怎么做了, 且听我慢慢说来。
首先 unicon 和 gensplash 都需要给内核打补丁。这里只以打上 nitro 补丁 2.6.9 内核为例。
1.内核解压到 /usr/src/。
Quote:
#tar jvxf linux-2.6.9.tar.bz2

2.下载所需补丁并给内核打补丁。
http://gentoo.linuxsir.org/download/gentoo/distfiles/patch-2.6.9-nitro4.bz2
http://gentoo.linuxsir.org/download/gentoo/distfiles/linux-2.6.9-nitro4-unicon.patch.bz2
Quote:

#cd /usr/src/linux-2.6.9
#bzcat ~/patch-2.6.9-nitro4.bz2 | patch -p1
#bzcat ~/linux-2.6.9-nitro4-unicon.patch.bz2 | patch -p1

3. 配置和编译内核。
这里不多说, 假设您已经会配置编译和内核。只是注意以下几个选项。
Quote:

│ │ [*] UNICON console support (EXPERIMENTAL) │ │
│ │ <M> UNICON GB Font support │ │
│ │ <M> UNICON GBK Font support │ │
│ │ <M> UNICON Big5 Font support │ │
│ │ <M> UNICON EUC-JP Font support │ │
│ │ <M> UNICON JIS Font support │ │
│ │ <M> UNICON Shift-JIS Font support │ │
│ │ <M> UNICON KSCM Font support │ │

gensplash 的安装方法见:
http://www.linuxsir.org/bbs/showthread.php?t=132656&highlight=fbsplash
4。编译和安装 unicon 用户态工具。
下面 unicon 源码和补丁。
http://gentoo.gg3.net/distfiles/unicon-3.0.4.tar.bz2
http://www.magiclinux.org/cgi-bin/viewcvs.cgi/*checkout*/gentoo/portage/app-i18n/unicon/files/vd_unicon-userland-20031122vd.patch?rev=1.1
http://www.magiclinux.org/cgi-bin/viewcvs.cgi/*checkout*/gentoo/portage/app-i18n/unicon/files/unicon-3.0.4-gcc34.patch?rev=1.1
编译安装:
Quote:

#tar jvxf unicon-3.0.4.tar.bz2
#cd unicon-3.0.4
#patch -p1 < vd_unicon-userland-20031122vd.patch
#patch -p1 < unicon-3.0.4-gcc34.patch
#./configure --prefix=/usr
#make && make install
#make data && make data-install


5。配置 unicon, 实现在 gensplash 的打开的情况下显示中文。
使用新的内核重新启动机器。
假设你使用 gbk 作为中文编码。
加载内核模块:
Quote:

#modprobe unikey
#modprobe encode-gbk

配置并打开 unicon
Quote:

#setfont -u /usr/lib/unicon/direct.uni
或者
#loadunimap /usr/lib/unicon/direct.uni
#uniconctrl --gbk

然后退出会话,再重新登录即可。

对于使用中文 portage 的 gentooer,会相当来说简单一点。
只要下载最新的中文 portage。
Quote:

#emerge =nitro-sources-2.6.9-r4
#emerge unicon
#rc-update del keymaps
#rc-update del consolefont
#rc-update add unicon default
另外还需要把 /etc/rc.conf 中的
UNICODE 设为 no

编译内核使用新内核重新启动即可, 不过有个小毛病。
重新启动,直接登录之后并不能显示中文, 要退出再登录一次就可以了。

gensplash & unicon get to work together.
http://sunmoon.512j.com/fbsplash-unicon-1.png

另外还可以参考一下 jackey 的方法。
http://euler.acadiau.ca/~043936y/index.php?job=art&articleid=a_20041209_221844
Back to top
View user's profile Send private message
qing
Tux's lil' helper
Tux's lil' helper


Joined: 04 Nov 2002
Posts: 95

PostPosted: Mon Dec 20, 2004 12:15 pm    Post subject: Reply with quote

很棒啊。。
Back to top
View user's profile Send private message
timeout
Tux's lil' helper
Tux's lil' helper


Joined: 09 Aug 2003
Posts: 75

PostPosted: Mon Dec 20, 2004 2:45 pm    Post subject: hey man Reply with quote

I added an english HOWTO in our cvs repository and also fixed a little problem of your ebuild.

Jackey
Back to top
View user's profile Send private message
liuspider
Apprentice
Apprentice


Joined: 03 Feb 2003
Posts: 237

PostPosted: Mon Dec 20, 2004 5:38 pm    Post subject: Re: hey man Reply with quote

timeout wrote:
I added an english HOWTO in our cvs repository and also fixed a little problem of your ebuild.

Jackey

where is your "cvs repository" please?
Back to top
View user's profile Send private message
Hauser
l33t
l33t


Joined: 27 Dec 2003
Posts: 650
Location: 4-dimensional hyperplane

PostPosted: Mon Dec 20, 2004 6:09 pm    Post subject: Reply with quote

liuspider wrote:

where is your "cvs repository" please?

http://www.magiclinux.org/cgi-bin/viewcvs.cgi/gentoo/portage/app-i18n/unicon/
_________________
AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl

Do I like to compile everything?
Positive definite!
Back to top
View user's profile Send private message
akar
Moderator
Moderator


Joined: 03 Dec 2004
Posts: 348
Location: HKSAR,China

PostPosted: Wed Dec 22, 2004 8:15 am    Post subject: Reply with quote

sunmoon1997 8)
讚!

我採有了 glc emerge,整正過程都很流暢,安裝好了。

好漂亮,真有點拾不得進來 gnome。 :lol:

其中有一點,就是 /dev/unikey 的權限,本來是組別是 root的,我把它轉成 tty組
Code:
#chgrp tty /dev/unikey



另外,現在好像還不能在unicon下輸入中文, 我在網上找到這份資源,但好像過時了。 :(
http://www.chinalinuxpub.com/doc/tlc61/node147.html

真奇怪,我看 /usr/lib/unicon/modules內安裝了好多中文輸入法!!
_________________
AKar
Back to top
View user's profile Send private message
sunmoon1997
n00b
n00b


Joined: 22 Nov 2004
Posts: 33

PostPosted: Wed Dec 22, 2004 8:32 am    Post subject: Reply with quote

akar wrote:
sunmoon1997 8)
讚!

我採有了 glc emerge,整正過程都很流暢,安裝好了。

好漂亮,真有點拾不得進來 gnome。 :lol:

其中有一點,就是 /dev/unikey 的權限,本來是組別是 root的,我把它轉成 tty組
Code:
#chgrp tty /dev/unikey



另外,現在好像還不能在unicon下輸入中文, 我在網上找到這份資源,但好像過時了。 :(
http://www.chinalinuxpub.com/doc/tlc61/node147.html

真奇怪,我看 /usr/lib/unicon/modules內安裝了好多中文輸入法!!

中文输入法,我也没有搞定。。:(
主要不知道是什么原因导致输入法不能用的, 否则就还有希望~
Back to top
View user's profile Send private message
akar
Moderator
Moderator


Joined: 03 Dec 2004
Posts: 348
Location: HKSAR,China

PostPosted: Thu Dec 23, 2004 1:17 am    Post subject: Reply with quote

的確輸入法直接影響了 unicon 的可用性。

其實我是被unicon“騙”了才安裝它的。:)

看它的名字,還以為它是支援 UTF-8的,誰知就只有
Code:

ac@glc ac $ find /lib/modules/2.6.9-nitro4/ -iname "*.ko" |grep unicon
/lib/modules/2.6.9-nitro4/kernel/drivers/video/unicon/encode-big5.ko
/lib/modules/2.6.9-nitro4/kernel/drivers/video/unicon/encode-eucjp.ko
/lib/modules/2.6.9-nitro4/kernel/drivers/video/unicon/encode-gb.ko
/lib/modules/2.6.9-nitro4/kernel/drivers/video/unicon/encode-gbk.ko
/lib/modules/2.6.9-nitro4/kernel/drivers/video/unicon/encode-jis.ko
/lib/modules/2.6.9-nitro4/kernel/drivers/video/unicon/encode-kscm.ko
/lib/modules/2.6.9-nitro4/kernel/drivers/video/unicon/encode-sjis.ko
/lib/modules/2.6.9-nitro4/kernel/drivers/video/unicon/unikey.ko



不過看了這篇的有關 公佈unicon的源代碼消息:拓林思率先公布“内核汉化”核心技术,真的有點感慨!! :arrow: :?:
_________________
AKar
Back to top
View user's profile Send private message
sunmoon1997
n00b
n00b


Joined: 22 Nov 2004
Posts: 33

PostPosted: Sun Dec 26, 2004 10:47 am    Post subject: Reply with quote

又完善了一下补丁, 修正了鼠标经过中文时, 中文会变乱码的 bug, 也部分解决了半个汉字的问题。另外还发现了 gensplash 有个小 bug, 不过一般情况下对系统没有影响(fbsplash_putc 将字体的前景和背景色反调了)。
Back to top
View user's profile Send private message
akar
Moderator
Moderator


Joined: 03 Dec 2004
Posts: 348
Location: HKSAR,China

PostPosted: Thu Dec 30, 2004 4:00 pm    Post subject: Reply with quote

sunmoon1997 好勤快!! 這裏給你打打氣。 :o


正在找一個好的方法更新glc portage 樹。 :roll:
_________________
AKar
Back to top
View user's profile Send private message
chrisyu
Apprentice
Apprentice


Joined: 10 Apr 2003
Posts: 197
Location: China

PostPosted: Fri Dec 31, 2004 2:24 am    Post subject: Reply with quote

sunmoon1997 wrote:
又完善了一下补丁, 修正了鼠标经过中文时, 中文会变乱码的 bug, 也部分解决了半个汉字的问题。另外还发现了 gensplash 有个小 bug, 不过一般情况下对系统没有影响(fbsplash_putc 将字体的前景和背景色反调了)。


我重新下载了一下补丁,重新编译内核发现鼠标经过的时候还是乱码.
文件大小是 1552298 linux-2.6.9-nitro4-unicon.patch.bz2
从http://gentoo.linuxsir.org/download/gentoo/distfiles/linux-2.6.9-nitro4-unicon.patch.bz2下载的
我用的是radeonfb
--
不过我的unicon没有重新编译过,我等回家再重新编译一下看看.

最后试了,编译后还是有这个问题
Back to top
View user's profile Send private message
vyouzhi
n00b
n00b


Joined: 26 Jul 2005
Posts: 5

PostPosted: Tue Jul 26, 2005 5:13 am    Post subject: Reply with quote

收藏了
过些日子有用
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum