<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>yhlfh 沧海一蜉蝣</title>
	<atom:link href="http://gnuyhlfh.blog.ubuntu.org.cn/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://gnuyhlfh.blog.ubuntu.org.cn</link>
	<description>We are what we write down. &#124; Life's like a box of chocolates, u never know what ur goin' to get.</description>
	<lastBuildDate>Tue, 09 Feb 2010 15:08:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>该博客已迁移</title>
		<link>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2010/02/this-blog-become-a-history/</link>
		<comments>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2010/02/this-blog-become-a-history/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 15:07:55 +0000</pubDate>
		<dc:creator>yhlfh</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://gnuyhlfh.blog.ubuntu.org.cn/?p=304</guid>
		<description><![CDATA[blog.ubuntu.org.cn的WordPress MU比较与时俱进的。不过我也好像有一年没有更新了。
汗，一年啊。最近那篇日志，Feb 2009的，仿佛就在昨天。
不过，现在想重新开博，买了空间和域名，算是正式在网上安个家。现在这个新家也装修差不多了，这个旧窝点也就正式宣布死亡，从此不更新了。
新家地址是http://neverblog.org。就说到这。
]]></description>
			<content:encoded><![CDATA[<p>blog.ubuntu.org.cn的WordPress MU比较与时俱进的。不过我也好像有一年没有更新了。</p>
<p>汗，一年啊。最近那篇日志，Feb 2009的，仿佛就在昨天。</p>
<p>不过，现在想重新开博，买了空间和域名，算是正式在网上安个家。现在这个新家也装修差不多了，这个旧窝点也就正式宣布死亡，从此不更新了。</p>
<p>新家地址是http://neverblog.org。就说到这。</p>
]]></content:encoded>
			<wfw:commentRss>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2010/02/this-blog-become-a-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>deb包简易制作：以gmlive为例</title>
		<link>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/02/easy-make-deb-package/</link>
		<comments>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/02/easy-make-deb-package/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 07:17:26 +0000</pubDate>
		<dc:creator>yhlfh</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[gmlive]]></category>

		<guid isPermaLink="false">http://gnuyhlfh.blog.ubuntu.org.cn/?p=140</guid>
		<description><![CDATA[这篇早该和大家见面的文章今天终于在笔者的努力下和大家见面了。正如大家看到的题目一样，本文讲的是有关于deb包的制作。当然，笔者并不是一个debian开发者，也不是一个ubuntu开发者。本文的目的是给新手一个简单的，关于如何将一般安装步骤为configure, make, make install的软件打成一个deb包，以方便管理的一个指南。当然有的朋友会说，用checkinstall就可以了。不过关于checkinstall，我听过好多人说这种方法过于dirty，到底如何笔者没有试过，也不好评价。您可以选择使用checkinstall，但我可以保证，看完本文，您将会发现其实用常规的方法制作一个deb包也是很简单的。

所需软件
要成功编译软件并打包，您需要build-essential, dh-make, debhelper, devscripts以及其他成功编译所需的开发包。
获取源码包
这个不用多说了。首先笔者需要从gmlive主页上下载gmlive的源码包。这里笔者下载的是0.21.1版本。
debian化
简单地理解，debian化就是将源代码解包后，在其下建立一个名为debian的目录，该目录里面包含一些特定的描述文件，以指导程序正确生成deb包。
在本文的例子里，解压后笔者得到一个名为gmlive-0.21.1的目录，那么它下面需要有一个debian目录。这里我们不会手工创建它，而是使用dh_make命令。这里笔者进入gmlive-0.21.1目录，然后在该目录下执行：

$ dh_make -e mail@dot.com -f ../gmlive-0.21.1.tar.gz

mail@dot.com为笔者的email，您得用自己的email替换。命令执行后您会被问及一系列问题，比如问您是不是打一个单一的包，还是其他什么类型的。这里笔者选择单一的包。然后检查屏幕上的信息，一切ok输入回车。
编辑debian目录里的内容
如果您已经看过debian目录里的内容，那么您可能会被吓到，哇！这么多文件。其实不用怕，因为好多文件都不是必需的。在这个例子中，笔者只留下这6个文件：changelog, control, compat, copyright, rules, docs，甚至，连docs也可以不要，不过这里笔者还是将它保留了。下面需要做的是逐一打开查看并编辑这些文件。
changelog
这是更新日志，当然是指deb包的更新日志，而非软件本身的更新日志。笔者将它改成了这样：

gmlive (0.21.1-1) unstable; urgency=low
&#160;
* Initial release
&#160;
-- my name &#38;lt;mail@dot.com&#38;gt;  Fri, 02 Jan 2009 15:55:19 +0800

因为不需要提交到官方软件仓库，所以不需要close什么bug，笔者直接将后面的close字样去掉了。
control
这个文件记录软件的相关信息，例如其主页的软件包描述（就是apt-cache show时看到的东西）。需要改的地方是Homepage和Description。比如笔者将它改成：

Source: gmlive
Section: unknown
Priority: extra
Maintainer: my name &#38;lt;mail@dot.com&#38;gt;
Build-Depends: debhelper (&#38;gt;= 7), autotools-dev
Standards-Version: 3.8.0
Homepage: http://code.google.com/p/gmlive/
&#160;
Package: gmlive
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: live video for linux
live video for linux,
maybe [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://upload.wikimedia.org/wikipedia/commons/0/00/Gnome-package-x-generic.svg" alt="gnome icon for deb files" />这篇早该和大家见面的文章今天终于在笔者的努力下和大家见面了。正如大家看到的题目一样，本文讲的是有关于deb包的制作。当然，笔者并不是一个debian开发者，也不是一个ubuntu开发者。本文的目的是给新手一个简单的，关于如何将一般安装步骤为configure, make, make install的软件打成一个deb包，以方便管理的一个指南。当然有的朋友会说，用checkinstall就可以了。不过关于checkinstall，我听过好多人说这种方法过于dirty，到底如何笔者没有试过，也不好评价。您可以选择使用checkinstall，但我可以保证，看完本文，您将会发现其实用常规的方法制作一个deb包也是很简单的。<br />
<span id="more-140"></span></p>
<h2>所需软件</h2>
<p>要成功编译软件并打包，您需要build-essential, dh-make, debhelper, devscripts以及其他成功编译所需的开发包。</p>
<h2>获取源码包</h2>
<p>这个不用多说了。首先笔者需要从gmlive主页上下载gmlive的源码包。这里笔者下载的是0.21.1版本。</p>
<h2>debian化</h2>
<p>简单地理解，debian化就是将源代码解包后，在其下建立一个名为debian的目录，该目录里面包含一些特定的描述文件，以指导程序正确生成deb包。</p>
<p>在本文的例子里，解压后笔者得到一个名为gmlive-0.21.1的目录，那么它下面需要有一个debian目录。这里我们不会手工创建它，而是使用dh_make命令。这里笔者进入gmlive-0.21.1目录，然后在该目录下执行：</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ dh_make -e mail@dot.com -f ../gmlive-0.21.1.tar.gz</pre></div></div>

<p>mail@dot.com为笔者的email，您得用自己的email替换。命令执行后您会被问及一系列问题，比如问您是不是打一个单一的包，还是其他什么类型的。这里笔者选择单一的包。然后检查屏幕上的信息，一切ok输入回车。</p>
<h2>编辑debian目录里的内容</h2>
<p>如果您已经看过debian目录里的内容，那么您可能会被吓到，哇！这么多文件。其实不用怕，因为好多文件都不是必需的。在这个例子中，笔者只留下这6个文件：changelog, control, compat, copyright, rules, docs，甚至，连docs也可以不要，不过这里笔者还是将它保留了。下面需要做的是逐一打开查看并编辑这些文件。</p>
<h3>changelog</h3>
<p>这是更新日志，当然是指deb包的更新日志，而非软件本身的更新日志。笔者将它改成了这样：</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">gmlive (0.21.1-1) unstable; urgency=low
&nbsp;
* Initial release
&nbsp;
-- my name &amp;lt;mail@dot.com&amp;gt;  Fri, 02 Jan 2009 15:55:19 +0800</pre></div></div>

<p>因为不需要提交到官方软件仓库，所以不需要close什么bug，笔者直接将后面的close字样去掉了。</p>
<h3>control</h3>
<p>这个文件记录软件的相关信息，例如其主页的软件包描述（就是apt-cache show时看到的东西）。需要改的地方是Homepage和Description。比如笔者将它改成：</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Source: gmlive
Section: unknown
Priority: extra
Maintainer: my name &amp;lt;mail@dot.com&amp;gt;
Build-Depends: debhelper (&amp;gt;= 7), autotools-dev
Standards-Version: 3.8.0
Homepage: http://code.google.com/p/gmlive/
&nbsp;
Package: gmlive
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: live video for linux
live video for linux,
maybe it is a UI for mplayer by playing live video.</pre></div></div>

<p>注意哦，最后两行描述前面是要空一格的。</p>
<h3>copyright</h3>
<p>这个顾名思义，是版权声明文件，声明软件以及deb包的版权。我们需要用gmlive的真实作者名字和以及邮件地址来替换里面的相应字段，如果不只一个作者，那就每个作者写一行。笔者将其改成这样：</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">This package was debianized by:
&nbsp;
my name &amp;lt;mail@dot.com&amp;gt; on Fri, 02 Jan 2009 15:55:19 +0800
&nbsp;
It was downloaded from:
&nbsp;
http://code.google.com/p/gmlive/
&nbsp;
Upstream Author(s):
&nbsp;
lerosua &amp;lt;lerosua@gmail.com&amp;gt;
wind &amp;lt;xihels@gmail.com&amp;gt;
yetist &amp;lt;yetist@gmail.com&amp;gt;
&nbsp;
Copyright:
&nbsp;
Copyright (C) 2008 Cyclone Team
&nbsp;
License:
&nbsp;
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
&nbsp;
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
&nbsp;
You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
&nbsp;
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.
&nbsp;
The Debian packaging is:
&nbsp;
Copyright C) 2009, my name &amp;lt;mail@dot.com&amp;gt;
&nbsp;
and is licensed under the GPL, see above.</pre></div></div>

<h3>rules</h3>
<p>这个文件是关键，能不能打包成功就看这个文件了。可以看到这个文件上面的注释说我们应该勇敢地按需修改这个文件。这里笔者作了很多修改，让这个文件尽量简短：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/make -f</span>
<span style="color: #666666; font-style: italic;"># -*- makefile -*-</span>
&nbsp;
config.status: configure
dh_testdir
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr
&nbsp;
build: build-stamp
&nbsp;
build-stamp:  config.status
dh_testdir
&nbsp;
$<span style="color: #7a0874; font-weight: bold;">&#40;</span>MAKE<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">touch</span> $<span style="color: #000000; font-weight: bold;">@</span>
&nbsp;
clean:
dh_testdir
dh_testroot
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> build-stamp
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-f</span> Makefile <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">||</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span>MAKE<span style="color: #7a0874; font-weight: bold;">&#41;</span> distclean
&nbsp;
dh_clean
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">install</span>: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
&nbsp;
$<span style="color: #7a0874; font-weight: bold;">&#40;</span>MAKE<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">DESTDIR</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span>CURDIR<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/</span>gmlive <span style="color: #c20cb9; font-weight: bold;">install</span>
&nbsp;
binary-indep: <span style="color: #c20cb9; font-weight: bold;">install</span>
&nbsp;
binary-arch: <span style="color: #c20cb9; font-weight: bold;">install</span>
dh_testdir
dh_testroot
dh_installchangelogs ChangeLog
dh_installdocs
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_builddeb
&nbsp;
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>大家应该已经发现了，这里其实就是编译软件所需执行的一系列命令。首先，dh_testdir检查当前的工作目录是不是源代码目录，然后再执行./configure &#8211;prefix=/usr。再往下看，它执行了make，然后下面的一系列命令将之打成一个deb包。想了解下面的一系列dh开头的命令是什么意思，可以看看他们的man手册。</p>
<h3>docs</h3>
<p>顾名思义，是文档，如果希望源代码目录下的某个文档出现在/usr/share/doc/gmlive/下，那就把它写进去。比如笔者希望源代码目录下的AUTHORS, NEWS, README文件能出现在/usr/share/doc/gmlive下，那docs文件就是这样：</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">AUTHORS
NEWS
README</pre></div></div>

<h2>制作deb包</h2>
<p>好了，一切完毕，下面就可以生成deb包了。</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ dpkg-buildpackage</pre></div></div>

<p>如果一切顺利，该命令执行完毕后您就会得到一个deb包。对了，这个命令要在源代码目录下执行的，而不是debian目录下。如果之中出现什么依赖问题，那就该装什么装什么，多半是因为少了什么开发包的缘故。</p>
<h2>有新版本了怎么办？</h2>
<p>本来是没有这一节的，因为在一开始笔者也说了，这篇文章本该很早就和大家见面的，但是笔者一直拖到gmlive 0.21.2发布了才写出来，所以就加了这一节。</p>
<p>下载新的源代码包，并将其与旧的源代码放于同一目录下。然后在旧的源代码目录下执行.：</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ uupdate ../gmlive-0.21.2.tar.bz2</pre></div></div>

<p>一切ok后，cd到新的源代码目录，再按上一节的方法生成新的deb包。</p>
<p>好了，本文到此为止，希望您已经打出自己第一个deb包了。您可以把您的成果和别人分享，如果您希望您打的包能进入官方软件仓库，那么您还有许多工作需要做，你会发现这样的包还远没有达到合格的标准。关于打包更详尽的细节，请您参考debian新维护员指南，那里可以给你全面的指导。你可以通过</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># apt-get install maint-guide-zh</pre></div></div>

<p>命令来安装这个指南。如您所料，您将会在/usr/share/doc/目录下找到它。祝您打包愉快！</p>
]]></content:encoded>
			<wfw:commentRss>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/02/easy-make-deb-package/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>系统优化小技巧三则</title>
		<link>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/system-optimization-tips/</link>
		<comments>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/system-optimization-tips/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 12:27:00 +0000</pubDate>
		<dc:creator>yhlfh</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[tmpfs]]></category>
		<category><![CDATA[优化]]></category>

		<guid isPermaLink="false">http://gnuyhlfh.blog.ubuntu.org.cn/?p=133</guid>
		<description><![CDATA[其实很简单的三招就可以让你的系统性能提升许多。
第一招：为分区添加noatime挂载选项
具体做法是修改/etc/fstab，在分区的default选项后面添加noatime挂载选项，用逗号和default隔开。就像这样：

/dev/hda1   /   jfs   defaults,noatime   0   1

第二招：使用deadline调度器
具体的做法是在启动时加上内核选项&#8221;elevator=deadline&#8221;.(是elevat后面加or。不知道为什么or会变成x？)
通常情况下默认的调度器是cfq。gentoo wiki上有关于cfq的这样一段描述：
CFQ: Only use it on ext3, this scheduler&#8217;s goal is not performance, but about balancing IO among all resources.
我看了后有点无语，怎么ext3那套都不是优先考虑性能的。所以，如果你是桌面应用的话，使用deadline调度器吧。
要查看当前系统所使用的调度器可以cat一下/sys/block/sda/queue/scheduler文件，sda换成你自己对应的硬盘。用中括号括起来的就是正在使用的调度器。
还有一个说法是jfs配合deadline调度器使用性能超好。arch wiki上关于jfs的文章说：
Indeed, JFS&#8217;s performance seems to exceed that of other GNU/Linux file systems with this particular scheduler being employed.
关于此话题可以参考linuxfans上的这篇帖子。
第三招：使用tmpfs
可以把/tmp挂载成tmpfs来获得性能提升。做法是在/etc/fstab中添加：

tmpfs   [...]]]></description>
			<content:encoded><![CDATA[<p>其实很简单的三招就可以让你的系统性能提升许多。</p>
<p><strong>第一招：为分区添加noatime挂载选项</strong><br />
具体做法是修改/etc/fstab，在分区的default选项后面添加noatime挂载选项，用逗号和default隔开。就像这样：</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">/dev/hda1   /   jfs   defaults,noatime   0   1</pre></div></div>

<p><strong>第二招：使用deadline调度器</strong><br />
具体的做法是在启动时加上内核选项&#8221;elevator=deadline&#8221;.(是elevat后面加or。不知道为什么or会变成x？)<br />
通常情况下默认的调度器是cfq。gentoo wiki上有关于cfq的这样一段描述：</p>
<blockquote><p>CFQ: Only use it on ext3, this scheduler&#8217;s goal is not performance, but about balancing IO among all resources.</p></blockquote>
<p>我看了后有点无语，怎么ext3那套都不是优先考虑性能的。所以，如果你是桌面应用的话，使用deadline调度器吧。<br />
要查看当前系统所使用的调度器可以cat一下/sys/block/sda/queue/scheduler文件，sda换成你自己对应的硬盘。用中括号括起来的就是正在使用的调度器。<br />
还有一个说法是jfs配合deadline调度器使用性能超好。arch wiki上关于<a href="http://wiki.archlinux.org/index.php/JFS">jfs</a>的文章说：</p>
<blockquote><p>Indeed, JFS&#8217;s performance seems to exceed that of other GNU/Linux file systems with this particular scheduler being employed.</p></blockquote>
<p>关于此话题可以参考linuxfans上的<a href="http://www.linuxfans.org/bbs/viewthread.php?tid=39703&amp;highlight=">这篇帖子</a>。</p>
<p><strong>第三招：使用tmpfs</strong><br />
可以把/tmp挂载成tmpfs来获得性能提升。做法是在/etc/fstab中添加：</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">tmpfs   /tmp   tmpfs   defaults   0   0</pre></div></div>

<p>这招对于提高mplayer的播放性能有很大帮助，因为mplayer是把影片cache在/tmp目录下的。这个我是深有体会，以前看720p的片子那个卡啊。用了上面说的第二招后有所改观。当用了这招后，720p的影片播放起来相当流畅！<br />
你还可以让更多的目录使用tmpfs。比如在/etc/default/rcS文件中设定</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RAMRUN=yes
RAMLOCK=yes</pre></div></div>

<p>这样/var/run和/var/lock目录也会使用tmpfs。<br />
debian默认将/dev/shm挂载成tmpfs，你可以把些编译的活放到这下面进行，当然你的内存要够用哦。</p>
]]></content:encoded>
			<wfw:commentRss>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/system-optimization-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何翻译Debian的Package description</title>
		<link>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/howto-translate-debian-package-description/</link>
		<comments>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/howto-translate-debian-package-description/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 14:26:35 +0000</pubDate>
		<dc:creator>yhlfh</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[翻译]]></category>

		<guid isPermaLink="false">http://gnuyhlfh.blog.ubuntu.org.cn/?p=130</guid>
		<description><![CDATA[Debian package description，即软件包描述，就是您执行apt-cache show pkgname时所看到的关于软件包功能的介绍。Debian或Ubuntu用户可能都有发现，有些软件包描述是中文的，但大部分是英文的。中文软件包描述可以极大方便新用户选择软件包，所以翻译它绝对是个好主意。想想吧，能够看到中文的软件包描述是件多好的事。
其实Debian早已准备好了，此项目叫做DDTP (The Debian Description Translation Project)。它有个Web翻译平台，叫DDTSS，这个平台的操作方式有点类似于wiki，你可以匿名进行翻译，也可以注册一个帐号。如果14天未使用帐号，那么帐号将被自动取消。一旦某个软件包的描述被翻译成中文后，就会进入review (复查)状态，要成为translated状态，review数必须达到3，也即有三个不同的人review后都觉得没问题，才会变为translated。当然你不可以自己review自己的翻译，DDTSS会记录你的IP的。如果某人在review时，觉得哪里翻译得不妥当，于是更改了，那么这个软件包就会重新进入review过程，review数重新从0开始。听起来要想进入translated状态还真难，稍有异意就又要从头开始review。不过这也有助于保证翻译的质量，一定要有个大家都认可的翻译才行。
知道怎么操作了，那就开始释放你的翻译激情吧。也可以做做复查工作，看看别人的翻译有没有蹩脚的地方，哪里还需要改进。无需注册，无需担心重复劳动，也无需任何经验，一切只要通过浏览器即可。那么还等什么呢？赶快贡献自己的一份力吧！
]]></description>
			<content:encoded><![CDATA[<p>Debian package description，即软件包描述，就是您执行apt-cache show <em>pkgname</em>时所看到的关于软件包功能的介绍。Debian或Ubuntu用户可能都有发现，有些软件包描述是中文的，但大部分是英文的。中文软件包描述可以极大方便新用户选择软件包，所以翻译它绝对是个好主意。想想吧，能够看到中文的软件包描述是件多好的事。</p>
<p>其实Debian早已准备好了，此项目叫做<a href="http://www.debian.org/international/l10n/ddtp">DDTP (The Debian Description Translation Project)</a>。它有个Web翻译平台，叫<a href="https://ddtp.debian.net/ddtss/index.cgi/zh_CN">DDTSS</a>，这个平台的操作方式有点类似于wiki，你可以匿名进行翻译，也可以注册一个帐号。如果14天未使用帐号，那么帐号将被自动取消。一旦某个软件包的描述被翻译成中文后，就会进入review (复查)状态，要成为translated状态，review数必须达到3，也即有三个不同的人review后都觉得没问题，才会变为translated。当然你不可以自己review自己的翻译，DDTSS会记录你的IP的。如果某人在review时，觉得哪里翻译得不妥当，于是更改了，那么这个软件包就会重新进入review过程，review数重新从0开始。听起来要想进入translated状态还真难，稍有异意就又要从头开始review。不过这也有助于保证翻译的质量，一定要有个大家都认可的翻译才行。</p>
<p>知道怎么操作了，那就开始释放你的翻译激情吧。也可以做做复查工作，看看别人的翻译有没有蹩脚的地方，哪里还需要改进。无需注册，无需担心重复劳动，也无需任何经验，一切只要通过浏览器即可。那么还等什么呢？赶快贡献自己的一份力吧！</p>
]]></content:encoded>
			<wfw:commentRss>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/howto-translate-debian-package-description/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mlocate──不狂读硬盘的locate</title>
		<link>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/mlocate/</link>
		<comments>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/mlocate/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 13:53:30 +0000</pubDate>
		<dc:creator>yhlfh</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[locate]]></category>

		<guid isPermaLink="false">http://gnuyhlfh.blog.ubuntu.org.cn/?p=127</guid>
		<description><![CDATA[mlocate是GNU locate的一个变种。相比原始的locate，它具有一个很好优点：
  * 每次更新数据库时并不需要重新读取全部目录的内容。mlocate 在数据库中保存了
 时间戳信息，无需重新读取，就能判断目录内容是否改变。所以更新的速度更快，对硬盘
 的占用也更少。这是 mlocate 特有的功能。
上面这段是已经翻译过来的mlocate的deb包描述，向译者致敬！这个功能非常好，以前用locate时，每次更新数据库时硬盘吱吱作响，搞得我不得不将它改为每周更新一次数据库。而mlocate几乎让我感觉不到它的存在。
似乎mlocate已成了Debian的标配了，因为我并没有安装过，它就已经在那了。本来想装locate的，发现已有locate命令，后来才发现是mlocate提供的。
有了mlocate，就可以把locate给删了，要不然你的系统会更新两套不同的数据库。
]]></description>
			<content:encoded><![CDATA[<p>mlocate是GNU locate的一个变种。相比原始的locate，它具有一个很好优点：</p>
<blockquote><p>  * 每次更新数据库时并不需要重新读取全部目录的内容。mlocate 在数据库中保存了<br />
 时间戳信息，无需重新读取，就能判断目录内容是否改变。所以更新的速度更快，对硬盘<br />
 的占用也更少。这是 mlocate 特有的功能。</p></blockquote>
<p>上面这段是已经翻译过来的mlocate的deb包描述，向译者致敬！这个功能非常好，以前用locate时，每次更新数据库时硬盘吱吱作响，搞得我不得不将它改为每周更新一次数据库。而mlocate几乎让我感觉不到它的存在。</p>
<p>似乎mlocate已成了Debian的标配了，因为我并没有安装过，它就已经在那了。本来想装locate的，发现已有locate命令，后来才发现是mlocate提供的。</p>
<p>有了mlocate，就可以把locate给删了，要不然你的系统会更新两套不同的数据库。</p>
]]></content:encoded>
			<wfw:commentRss>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/mlocate/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>让Iceweasel在kde4下更顺眼</title>
		<link>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/make-iceweasel-look-better-under-kde4/</link>
		<comments>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/make-iceweasel-look-better-under-kde4/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 13:14:29 +0000</pubDate>
		<dc:creator>yhlfh</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[Iceweasel]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[oxygen]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://gnuyhlfh.blog.ubuntu.org.cn/?p=125</guid>
		<description><![CDATA[即使是让gtk程序使用kde的外观，gtk程序在kde4下的显示还是不完美的。尤其是Iceweasel，网页中的控件都渲染不完全，很难看。
我想，既然kde的oxygen主题对gtk程序渲染不好，那有没有为gtk准备的oxygen主题？于是就到gnome-look.org上找，果然被我找到了。http://kims-area.com/?q=node/63
首先，适合于gtk的oxygen主题叫KDE4 Oxygenstyle，可以从这里下载，居然还提供deb包的  。装好后在kde系统设置里把gtk程序设成使用那个主题就好了。
不过这样会有个问题，图标不再是oxygen的了。不过幸好，已经有人为我们准备好了oxygen图标了。可以从这里下载。装好后修改.gtkrc-2.0-kde4，在最后加一行：

gtk-icon-theme-name=&#34;OxygenRefit2&#34;

这样gtk程序就会使用OxygenRefit2图标主题了。个人感觉这样比让gtk使用kde的oxygen来得漂亮。
好了，下面开始给Iceweasel整容，让它更oxygen。其实也就是装个皮肤了，呵呵。用这个叫KFirefox的皮肤。这个皮肤很强大，是我见过的最强大的皮肤！
OpenOffice.org也变得好看了，如果是用OOo的gtk界面的话，那就是oxygen感觉的，用kde的oxygen渲染OOo的gtk界面试过的都知道，那是根本不能用的。当然为什么不用OOo的kde界面？因为那是qt3的，更不协调了。
现在就留下qt3程序没办法了，没有为qt3准备的oxygen。
参考网址：
http://gnome-look.org/content/show.php/Oxygen+Refit+2?content=79756
http://kims-area.com/?q=node/63
http://ramonantonio.net/kde-firefox/
http://www.leninlee.cn/?p=315
]]></description>
			<content:encoded><![CDATA[<p>即使是让gtk程序使用kde的外观，gtk程序在kde4下的显示还是不完美的。尤其是Iceweasel，网页中的控件都渲染不完全，很难看。</p>
<p>我想，既然kde的oxygen主题对gtk程序渲染不好，那有没有为gtk准备的oxygen主题？于是就到gnome-look.org上找，果然被我找到了。http://kims-area.com/?q=node/63</p>
<p>首先，适合于gtk的oxygen主题叫KDE4 Oxygenstyle，可以从<a href="http://kims-area.com/?q=node/63">这里</a>下载，居然还提供deb包的 <img src='http://gnuyhlfh.blog.ubuntu.org.cn/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> 。装好后在kde系统设置里把gtk程序设成使用那个主题就好了。</p>
<p>不过这样会有个问题，图标不再是oxygen的了。不过幸好，已经有人为我们准备好了oxygen图标了。可以从<a href="http://gnome-look.org/content/show.php/Oxygen+Refit+2?content=79756">这里</a>下载。装好后修改.gtkrc-2.0-kde4，在最后加一行：</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">gtk-icon-theme-name=&quot;OxygenRefit2&quot;</pre></div></div>

<p>这样gtk程序就会使用OxygenRefit2图标主题了。个人感觉这样比让gtk使用kde的oxygen来得漂亮。</p>
<p>好了，下面开始给Iceweasel整容，让它更oxygen。其实也就是装个皮肤了，呵呵。用这个叫<a href="http://ramonantonio.net/kde-firefox/">KFirefox</a>的皮肤。这个皮肤很强大，是我见过的最强大的皮肤！</p>
<p>OpenOffice.org也变得好看了，如果是用OOo的gtk界面的话，那就是oxygen感觉的，用kde的oxygen渲染OOo的gtk界面试过的都知道，那是根本不能用的。当然为什么不用OOo的kde界面？因为那是qt3的，更不协调了。</p>
<p>现在就留下qt3程序没办法了，没有为qt3准备的oxygen。</p>
<p>参考网址：<br />
<a href="http://gnome-look.org/content/show.php/Oxygen+Refit+2?content=79756">http://gnome-look.org/content/show.php/Oxygen+Refit+2?content=79756</a><br />
<a href="http://kims-area.com/?q=node/63">http://kims-area.com/?q=node/63</a><br />
<a href="http://ramonantonio.net/kde-firefox/">http://ramonantonio.net/kde-firefox/</a><br />
<a href="http://www.leninlee.cn/?p=315">http://www.leninlee.cn/?p=315</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/make-iceweasel-look-better-under-kde4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>让永中office 2009个人版在awesome下正常显示</title>
		<link>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/make-eio-show-widgets/</link>
		<comments>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/make-eio-show-widgets/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 12:57:54 +0000</pubDate>
		<dc:creator>yhlfh</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[office]]></category>
		<category><![CDATA[WM]]></category>

		<guid isPermaLink="false">http://gnuyhlfh.blog.ubuntu.org.cn/?p=123</guid>
		<description><![CDATA[在awesome中永中office 2009个人版显示不出来。到永中论坛上求助，有人说是java toolkit的问题。于是我export了变量，但问题依旧。
仔细查看/usr/bin/eio文件发现，其实命令开始就已经指定好了环境变量。这样问题就变得简单了。直接编辑/usr/bin/eio文件，把没用的行都注释掉，变成下面这样：

#!/bin/bash
#if test -n &#34;$(grep  &#34;Ubuntu&#34;  /proc/version)&#34;; then
   export AWT_TOOLKIT=MToolkit
#else
#   export AWT_TOOLKIT=XToolkit
#fi
exec 4&#38;lt;&#38;amp;0 0&#38;lt;/etc/Evermore/EIOffice/installinfo.cfg
read line1
exec 0/dev/null

再在awesome下运行永中，界面就正常了。
永中论坛上的帖子见这里：http://forum.evermoresw.com/thread-14597-1-1.html
]]></description>
			<content:encoded><![CDATA[<p>在awesome中永中office 2009个人版显示不出来。到永中论坛上求助，有人说是java toolkit的问题。于是我export了变量，但问题依旧。</p>
<p>仔细查看/usr/bin/eio文件发现，其实命令开始就已经指定好了环境变量。这样问题就变得简单了。直接编辑/usr/bin/eio文件，把没用的行都注释掉，变成下面这样：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;">#if test -n &quot;$(grep  &quot;Ubuntu&quot;  /proc/version)&quot;; then</span>
   <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">AWT_TOOLKIT</span>=MToolkit
<span style="color: #666666; font-style: italic;">#else</span>
<span style="color: #666666; font-style: italic;">#   export AWT_TOOLKIT=XToolkit</span>
<span style="color: #666666; font-style: italic;">#fi</span>
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">4</span><span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000;">0</span> <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>Evermore<span style="color: #000000; font-weight: bold;">/</span>EIOffice<span style="color: #000000; font-weight: bold;">/</span>installinfo.cfg
<span style="color: #c20cb9; font-weight: bold;">read</span> line1
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null</pre></div></div>

<p>再在awesome下运行永中，界面就正常了。</p>
<p>永中论坛上的帖子见这里：<a href="http://forum.evermoresw.com/thread-14597-1-1.html">http://forum.evermoresw.com/thread-14597-1-1.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2009/01/make-eio-show-widgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fcitx第二三候选词选择键的设置</title>
		<link>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2008/12/fcitx-choose-2nd-3rd/</link>
		<comments>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2008/12/fcitx-choose-2nd-3rd/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 09:19:50 +0000</pubDate>
		<dc:creator>yhlfh</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[FCITX]]></category>
		<category><![CDATA[五笔]]></category>
		<category><![CDATA[输入法]]></category>

		<guid isPermaLink="false">http://gnuyhlfh.blog.ubuntu.org.cn/?p=121</guid>
		<description><![CDATA[因为学了五笔之后，跑到公共的Windows电脑上当然也想打五笔了。不过windows自带的那个太烂，再加上久仰极点五笔的大名，就下了个放在U盘里随身带。极点五笔有个功能很称心，就是可以用“；”选择第二候选词，“，”选择第三候选词。因为五笔重码少，范不着为那么几个为数不多的重码去够数字键。在fcitx里我一直不知道怎么设置，说实话那些中文选项好多我看着都不知道到底是什么意思，可能是我太笨了。不过今天去fcitx的google group上发现有人说有这功能。经过多次尝试还是被我试出来了，其实就是那个“第二三候选词选择键”选项。设两个值，两个之间不要有空格，这样就ok了。
]]></description>
			<content:encoded><![CDATA[<p>因为学了五笔之后，跑到公共的Windows电脑上当然也想打五笔了。不过windows自带的那个太烂，再加上久仰极点五笔的大名，就下了个放在U盘里随身带。极点五笔有个功能很称心，就是可以用“；”选择第二候选词，“，”选择第三候选词。因为五笔重码少，范不着为那么几个为数不多的重码去够数字键。在fcitx里我一直不知道怎么设置，说实话那些中文选项好多我看着都不知道到底是什么意思，可能是我太笨了。不过今天去fcitx的google group上发现有人说有这功能。经过多次尝试还是被我试出来了，其实就是那个“第二三候选词选择键”选项。设两个值，两个之间不要有空格，这样就ok了。</p>
]]></content:encoded>
			<wfw:commentRss>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2008/12/fcitx-choose-2nd-3rd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opera更新了</title>
		<link>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2008/12/opera-update/</link>
		<comments>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2008/12/opera-update/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 13:39:00 +0000</pubDate>
		<dc:creator>yhlfh</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[字体]]></category>

		<guid isPermaLink="false">http://gnuyhlfh.blog.ubuntu.org.cn/?p=112</guid>
		<description><![CDATA[到9.63了。看了下Opera的changelog：

User Interface
Added opera:config &#62; UserPrefs &#62; DoubleclicktoCloseTab to close tabs by double-clicking on them

双击关闭标签，这个出现在Opera中国版中的功能被引入了。
装完之后发现字体变回原先的丑陋样式了。原来之前改字体时改的是全局文件，被新版的Opera覆盖回去了。这次使用用户设置吧，方法和之前一样，不同的就是把font.ini复制到~/.opera再改，这样就不会因为Opera更新而被覆盖了。
]]></description>
			<content:encoded><![CDATA[<p>到9.63了。看了下Opera的<a href="http://www.opera.com/docs/changelogs/linux/963/">changelog</a>：</p>
<blockquote><p>
<strong>User Interface</strong></p>
<li>Added opera:config &gt; UserPrefs &gt; DoubleclicktoCloseTab to close tabs by double-clicking on them</li>
</blockquote>
<p>双击关闭标签，这个出现在Opera中国版中的功能被引入了。</p>
<p>装完之后发现字体变回原先的丑陋样式了。原来之前改字体时改的是全局文件，被新版的Opera覆盖回去了。这次使用用户设置吧，方法和<a href="http://gnuyhlfh.blog.ubuntu.org.cn/archives/68">之前</a>一样，不同的就是把font.ini复制到~/.opera再改，这样就不会因为Opera更新而被覆盖了。</p>
]]></content:encoded>
			<wfw:commentRss>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2008/12/opera-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SliTaz──地球上最小的GNU/Linux</title>
		<link>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2008/12/slitaz-smallest-gnu-linux-distribution-on-earth/</link>
		<comments>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2008/12/slitaz-smallest-gnu-linux-distribution-on-earth/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 04:11:21 +0000</pubDate>
		<dc:creator>yhlfh</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[LiveUSB]]></category>
		<category><![CDATA[SliTaz]]></category>

		<guid isPermaLink="false">http://gnuyhlfh.blog.ubuntu.org.cn/?p=110</guid>
		<description><![CDATA[因为发现我的电脑可以从U盘启动，所以打算为U盘装个小型系统，于是就开始选择。呵呵，又是选择。当然要支持中文，即使界面没有中文，最起码要能显示中文。
起先试了fanx，界面是舒服，kde的，大小对于我1G的盘来说还是过得去的。不过速度是有点慢，比Kubuntu 7.10 64-bit PC版的LiveCD要慢，至少在我的电脑上是这样的。而且添加新软件也不是很方便，要去下载，而且可选的也不多。
看到toy上的文章：多合一小型 Linux 光盘，逐一看下，CDlinux，Puppy有点搞头。再往下看有个SliTaz，介绍说比DSL还小，启动速度极快，还有Firefox、Mplayer，还软件包仓库。“软件包仓库”？！一个仅28M大小的东西还搞软件包仓库？于是我记住了SliTaz。
CDlinux和Puppy都还不错，尤其是Puppy，有一群中文开发者，还有中文Puppy Linux开发者之家呢，所以Puppy的中文支持是绝对不用担心的。不过它的界面风格不是很喜欢。
呃，还能做什么呢，一个软件包管理的特性就足够说服我去尝试SliTaz。通常我会事先通过Google来了解一下感兴趣的东西。Google最大的收获就是中文Puppy开发者之家上有篇“比Puppy还要袖珍的中文SliTaz”。看来中文Puppy开发者也惊叹于SliTaz的小巧。而且有提供单独的中文包下载。能显示中文，能输入中文，30M不到，有什么理由不去尝试？
我不是直接下载中文Puppy上提供的家酿版中文SliTaz，而是去SliTaz主站上下载了cooking版，然后再安装中文Puppy上提供的中文包。在此说下我的SliTaz LiveUSB安装过程吧。
首先用UNetbootin把SliTaz LiveCD的ISO到USB里，然后启动。这样就相当于有了一个LiveCD了。完后要重新使用SliTaz提供的tazusb程序将SliTaz安装进U盘，成为真正的LiveUSB。当然也可以就这样用用就好了，但tazusb制作的LiveUSB有很多好处。比如启动时的欢迎画面，以U盘作为/home，这样用户存储的数据不会丢失。所以强烈推荐重新装一遍。把UNetbootin生成的东西都删除。在SliTaz菜单里找到Mount devices，把SliTaz iso所在的分区挂载上。然后执行

# tazusb gen-iso2usb /path/to/iso

接下来的事情都不用操心，装完后就可以选择重启了。如果当前运行的SliTaz是从中文Puppy上直接下载来的，那tazusb是没有gen-iso2usb选项的，需要先进行升级，很简单的，打开右下角的Packages manager (GUI)就知道怎么做了。
现在启动真正的LiveUSB，U盘已经自动挂载为/home了。然后安装中文包

# tazpkg install /path/to/chinese-pack

然后再执行tazlocale，选zh_CN UTF-8，再修改/etc/profile，把G_FILENAME_ENCODING改成这样：

G_FILENAME_ENCODING=UTF-8

然后需要把/etc/chinese-pack/.config/下的一些配置文件copy到主目录下。注销重新登录后，显示输入中文应该都没有问题了。中文包还提供了一个终端模拟器叫sakura。
完成这一切后，还需要执行

# tazusb writefs lzma

以便生成新的rootfs.gz。每次安装新的软件后都要这样，要不然下次启动还是原来的样子。更多关于tazusb的用法可以看这里。
之后我还装了Xorg，按这篇文章安装了显卡驱动，不过使用Xorg后产生了xauth的问题，irc上求助也没解决。后来想想算了吧，能听歌就不错了，电影就免了。顺便说下，SliTaz的官方irc是irc.alterinet.org上的#slitaz。
本文就是在SliTaz LiveUSB下写的。
]]></description>
			<content:encoded><![CDATA[<p>因为发现我的电脑可以从U盘启动，所以打算为U盘装个小型系统，于是就开始选择。呵呵，又是选择。当然要支持中文，即使界面没有中文，最起码要能显示中文。</p>
<p>起先试了fanx，界面是舒服，kde的，大小对于我1G的盘来说还是过得去的。不过速度是有点慢，比Kubuntu 7.10 64-bit PC版的LiveCD要慢，至少在我的电脑上是这样的。而且添加新软件也不是很方便，要去下载，而且可选的也不多。</p>
<p>看到toy上的文章：<a href="http://linuxtoy.org/archives/nin1linuxcd.html">多合一小型 Linux 光盘</a>，逐一看下，CDlinux，Puppy有点搞头。再往下看有个SliTaz，介绍说比DSL还小，启动速度极快，还有Firefox、Mplayer，还软件包仓库。“软件包仓库”？！一个仅28M大小的东西还搞软件包仓库？于是我记住了SliTaz。</p>
<p>CDlinux和Puppy都还不错，尤其是Puppy，有一群中文开发者，还有中文Puppy Linux开发者之家呢，所以Puppy的中文支持是绝对不用担心的。不过它的界面风格不是很喜欢。</p>
<p>呃，还能做什么呢，一个软件包管理的特性就足够说服我去尝试SliTaz。通常我会事先通过Google来了解一下感兴趣的东西。Google最大的收获就是中文Puppy开发者之家上有篇“<a href="http://puppy.cnbits.com/node/231">比Puppy还要袖珍的中文SliTaz</a>”。看来中文Puppy开发者也惊叹于SliTaz的小巧。而且有提供单独的中文包下载。能显示中文，能输入中文，30M不到，有什么理由不去尝试？</p>
<p>我不是直接下载中文Puppy上提供的家酿版中文SliTaz，而是去SliTaz主站上下载了cooking版，然后再安装中文Puppy上提供的中文包。在此说下我的SliTaz LiveUSB安装过程吧。</p>
<p>首先用UNetbootin把SliTaz LiveCD的ISO到USB里，然后启动。这样就相当于有了一个LiveCD了。完后要重新使用SliTaz提供的tazusb程序将SliTaz安装进U盘，成为真正的LiveUSB。当然也可以就这样用用就好了，但tazusb制作的LiveUSB有很多好处。比如启动时的欢迎画面，以U盘作为/home，这样用户存储的数据不会丢失。所以强烈推荐重新装一遍。把UNetbootin生成的东西都删除。在SliTaz菜单里找到Mount devices，把SliTaz iso所在的分区挂载上。然后执行</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># tazusb gen-iso2usb /path/to/iso</pre></div></div>

<p>接下来的事情都不用操心，装完后就可以选择重启了。如果当前运行的SliTaz是从中文Puppy上直接下载来的，那tazusb是没有gen-iso2usb选项的，需要先进行升级，很简单的，打开右下角的Packages manager (GUI)就知道怎么做了。</p>
<p>现在启动真正的LiveUSB，U盘已经自动挂载为/home了。然后安装中文包</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># tazpkg install /path/to/chinese-pack</pre></div></div>

<p>然后再执行tazlocale，选zh_CN UTF-8，再修改/etc/profile，把G_FILENAME_ENCODING改成这样：</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">G_FILENAME_ENCODING=UTF-8</pre></div></div>

<p>然后需要把/etc/chinese-pack/.config/下的一些配置文件copy到主目录下。注销重新登录后，显示输入中文应该都没有问题了。中文包还提供了一个终端模拟器叫sakura。</p>
<p>完成这一切后，还需要执行</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># tazusb writefs lzma</pre></div></div>

<p>以便生成新的rootfs.gz。每次安装新的软件后都要这样，要不然下次启动还是原来的样子。更多关于tazusb的用法可以看<a href="http://www.slitaz.org/en/doc/manuals/tazusb.en.html">这里</a>。</p>
<p>之后我还装了Xorg，按<a href="http://hi.baidu.com/%CC%EC%CA%B9%BD%E7%D6%F7/blog/item/c8b1ee33d4bdc644ad4b5f21.html">这篇文章</a>安装了显卡驱动，不过使用Xorg后产生了xauth的问题，irc上求助也没解决。后来想想算了吧，能听歌就不错了，电影就免了。顺便说下，SliTaz的官方irc是irc.alterinet.org上的<a href="irc://irc.alterinet.org/slitaz">#slitaz</a>。</p>
<p>本文就是在SliTaz LiveUSB下写的。</p>
]]></content:encoded>
			<wfw:commentRss>http://gnuyhlfh.blog.ubuntu.org.cn/index.php/2008/12/slitaz-smallest-gnu-linux-distribution-on-earth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
