中文 man

新手涉及到的教学或入门贴,推荐新手必看,版主维护
回复
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

中文 man

#1

帖子 gnix_oag » 2006-03-13 10:24

中文 man

初学者园地
附件
Screenshot.png
linnet9999
帖子: 7
注册时间: 2006-03-10 9:40

#2

帖子 linnet9999 » 2006-03-13 12:05

怎么弄的啊?
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

#3

帖子 gnix_oag » 2006-03-14 12:43

源里 中文man 不是 UTF 的格式
显示为乱码

下载源码 http://download.sf.linuxforum.net/cmpp/ ... 1.5.tar.gz

解压:

代码: 全选

tar -zxvf man-pages-zh_CN-1.5.tar.gz
编译

代码: 全选

cd man-pages-zh_CN-1.5
make
复制到系统

代码: 全选

sudo mkdir /usr/share/man/zh_CN 
sudo cp -r UTF-8/* /usr/share/man/zh_CN/
修改配置文件

代码: 全选

sudo gedit /etc/manpath.config
把里面的所有的 /usr/share/man 改成 /usr/share/man/zh_CN

为了使用中文 man 里没有的 e文 man ,建义:

把里面的所有的 /usr/share/man 的行改成 /usr/share/man/zh_CN 后,加再前面。

再试试:
man mount
man grub



.
上次由 gnix_oag 在 2006-04-09 23:52,总共编辑 3 次。
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

#4

帖子 gnix_oag » 2006-03-14 12:44

# manpath.config
#
# This file is used by the man-db package to configure the man and cat paths.
# It is also used to provide a manpath for those without one by examining
# their PATH environment variable. For details see the manpath(5) man page.
#
# Lines beginning with `#' are comments and are ignored. Any combination of
# tabs or spaces may be used as `whitespace' separators.
#
# There are three mappings allowed in this file:
# --------------------------------------------------------
# MANDATORY_MANPATH manpath_element
# MANPATH_MAP path_element manpath_element
# MANDB_MAP global_manpath [relative_catpath]
#---------------------------------------------------------
# every automatically generated MANPATH includes these fields
#
#MANDATORY_MANPATH /usr/src/pvm3/man
#
MANDATORY_MANPATH /usr/man
MANDATORY_MANPATH /usr/share/man/zh_CN
MANDATORY_MANPATH /usr/share/man
MANDATORY_MANPATH /usr/X11R6/man
MANDATORY_MANPATH /usr/local/man
#---------------------------------------------------------
# set up PATH to MANPATH mapping
# ie. what man tree holds man pages for what binary directory.
#
# *PATH* -> *MANPATH*
#
MANPATH_MAP /bin /usr/share/man/zh_CN
MANPATH_MAP /bin /usr/share/man
MANPATH_MAP /usr/bin /usr/share/man/zh_CN
MANPATH_MAP /usr/bin /usr/share/man
MANPATH_MAP /sbin /usr/share/man/zh_CN
MANPATH_MAP /sbin /usr/share/man
MANPATH_MAP /usr/sbin /usr/share/man/zh_CN
MANPATH_MAP /usr/sbin /usr/share/man

MANPATH_MAP /usr/local/bin /usr/local/man
MANPATH_MAP /usr/local/bin /usr/local/share/man
MANPATH_MAP /usr/local/sbin /usr/local/man
MANPATH_MAP /usr/local/sbin /usr/local/share/man
MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man
MANPATH_MAP /usr/bin/X11 /usr/X11R6/man
MANPATH_MAP /usr/games /usr/share/man/zh_CN
MANPATH_MAP /usr/games /usr/share/man
MANPATH_MAP /opt/bin /opt/man
MANPATH_MAP /opt/sbin /opt/man
#---------------------------------------------------------
# For a manpath element to be treated as a system manpath (as most of those
# above should normally be), it must be mentioned below. Each line may have
# an optional extra string indicating the catpath associated with the
# manpath. If no catpath string is used, the catpath will default to the
# given manpath.
#
# You *must* provide all system manpaths, including manpaths for alternate
# operating systems, locale specific manpaths, and combinations of both, if
# they exist, otherwise the permissions of the user running man/mandb will
# be used to manipulate the manual pages. Also, mandb will not initialise
# the database cache for any manpaths not mentioned below unless explicitly
# requested to do so.
#
# In a per-user configuration file, this directive only controls the
# location of catpaths and the creation of database caches; it has no effect
# on privileges.
#
# Any manpaths that are subdirectories of other manpaths must be mentioned
# *before* the containing manpath. E.g. /usr/man/preformat must be listed
# before /usr/man.
#
# *MANPATH* -> *CATPATH*
#
MANDB_MAP /usr/man /var/cache/man/fsstnd
MANDB_MAP /usr/share/man/zh_CN /var/cache/man
MANDB_MAP /usr/local/man /var/cache/man/oldlocal
MANDB_MAP /usr/local/share/man /var/cache/man/local
MANDB_MAP /usr/X11R6/man /var/cache/man/X11R6
MANDB_MAP /opt/man /var/cache/man/opt
#
#---------------------------------------------------------
# Program definitions. These are commented out by default as the value
# of the definition is already the default. To change: uncomment a
# definition and modify it.
#
#DEFINE pager /usr/bin/pager -s
#DEFINE cat /bin/cat
#DEFINE tr /usr/bin/tr '\255\267\264\327' '\055\157\047\170'
#DEFINE grep /bin/grep
#DEFINE troff /usr/bin/groff -mandoc
#DEFINE nroff /usr/bin/nroff -mandoc
#DEFINE eqn /usr/bin/eqn
#DEFINE neqn /usr/bin/neqn
#DEFINE tbl /usr/bin/tbl
#DEFINE col /usr/bin/col
#DEFINE vgrind /usr/bin/vgrind
#DEFINE refer /usr/bin/refer
#DEFINE grap /usr/bin/grap
#DEFINE pic /usr/bin/pic -S
#
#DEFINE decompressor /bin/gzip -dc
#DEFINE compressor /bin/gzip -c7
#---------------------------------------------------------
# Misc definitions: same as program definitions above.
#
#DEFINE whatis_grep_flags -i
#DEFINE apropos_grep_flags -iEw
#DEFINE apropos_regex_grep_flags -iE
#---------------------------------------------------------
# Section names. Manual sections will be searched in the order listed here;
# the default is 1, n, l, 8, 3, 2, 5, 4, 9, 6, 7. Multiple SECTION
# directives may be given for clarity, and will be concatenated together in
# the expected way.
# If a particular extension is not in this list (say, 1mh), it will be
# displayed with the rest of the section it belongs to. The effect of this
# is that you only need to explicitly list extensions if you want to force a
# particular order. Sections with extensions should usually be adjacent to
# their main section (e.g. "1 1mh 8 ...").
SECTION 1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7
上次由 gnix_oag 在 2006-03-15 23:37,总共编辑 3 次。
头像
内存不足
论坛版主
帖子: 3277
注册时间: 2005-08-18 18:43
联系:

#5

帖子 内存不足 » 2006-03-14 12:45

小白来了 :P
໌→ iCookie Gtk Theme
໌→DropPlusBluetheme
กรัก กรัก`菠萝
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#6

帖子 eexpress » 2006-03-14 12:50

小白,效果如何。
● 鸣学
头像
内存不足
论坛版主
帖子: 3277
注册时间: 2005-08-18 18:43
联系:

#7

帖子 内存不足 » 2006-03-14 13:05

不错有图为证
但gnix.oag好像少写了一步
sudo mkdir /usr/share/man/zh_CN

我系统里本身没有/usr/share/man/zh_CN这个目录
附件
Screenshot.png
໌→ iCookie Gtk Theme
໌→DropPlusBluetheme
กรัก กรัก`菠萝
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

#8

帖子 gnix_oag » 2006-03-14 13:21

不好思意,我这里原来有

你是最少化安装的吧

:D :D :D
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#9

帖子 eexpress » 2006-03-14 13:38

要make。最好找到deb的。我的dapper不想乱搞,先稳定一下。
● 鸣学
头像
内存不足
论坛版主
帖子: 3277
注册时间: 2005-08-18 18:43
联系:

#10

帖子 内存不足 » 2006-03-14 13:45

最少化? 你是指系统还是man文件?
系统之标准安装的。man也是按照你上边做的
໌→ iCookie Gtk Theme
໌→DropPlusBluetheme
กรัก กรัก`菠萝
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

#11

帖子 gnix_oag » 2006-03-14 13:56

eexpress 写了:要make。最好找到deb的。我的dapper不想乱搞,先稳定一下。
make 后就在当前目录产生 UTF-8 文件夹,不影响系统的。
reinchii
帖子: 111
注册时间: 2005-12-02 0:59

#12

帖子 reinchii » 2006-03-14 14:07

hehe,挺好,等你们弄顺了我再搞
图片
C51的驱动……鄙视nVIDIA!
头像
内存不足
论坛版主
帖子: 3277
注册时间: 2005-08-18 18:43
联系:

#13

帖子 内存不足 » 2006-03-14 14:16

代码: 全选

hehe,挺好,等你们弄顺了我再搞
很简单的 照着做就OK 了
໌→ iCookie Gtk Theme
໌→DropPlusBluetheme
กรัก กรัก`菠萝
abel0450
帖子: 52
注册时间: 2006-02-13 18:40

#14

帖子 abel0450 » 2006-03-14 15:22

谢谢~~

可以做为参考资料。。
youokma
帖子: 11
注册时间: 2006-03-11 0:44

很好,通过,已经成为中文

#15

帖子 youokma » 2006-03-14 16:21

很好,我正找这个文件呢,你就贴出来了,感谢一下。
回复