<?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>i&#039;m Chao-吼吼在这</title>
	<atom:link href="http://www.imchao.net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.imchao.net</link>
	<description>简，是一种境界</description>
	<lastBuildDate>Fri, 03 Sep 2010 11:15:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>入手yubikey</title>
		<link>http://www.imchao.net/digital/start-yubikey.html</link>
		<comments>http://www.imchao.net/digital/start-yubikey.html#comments</comments>
		<pubDate>Wed, 10 Mar 2010 14:30:31 +0000</pubDate>
		<dc:creator>吼吼</dc:creator>
				<category><![CDATA[Digital]]></category>
		<category><![CDATA[lastpass]]></category>
		<category><![CDATA[mashedlife]]></category>
		<category><![CDATA[umikey]]></category>
		<category><![CDATA[yubikey]]></category>

		<guid isPermaLink="false">http://www.imchao.net/?p=290</guid>
		<description><![CDATA[yubikey是我在春节前买了，大约1周就到了。25$一个，买了两个，一个是帮同学带的，运费20$。因为一直在复习GRE，没时间写文章。接下来让我们来看看yubikey真面目吧。（不知道yubikey？参见http://... ]]></description>
			<content:encoded><![CDATA[ <p style="text-align: left;">yubikey是我在春节前买了，大约1周就到了。25$一个，买了两个，一个是帮同学带的，运费20$。因为一直在复习GRE，没时间写文章。接下来让我们来看看yubikey真面目吧。（不知道yubikey？参见<a href="http://www.imchao.net/life/yubikey-nerver-remember-the-password.html" target="_blank">http://www.imchao.net/life/yubikey-nerver-remember-the-password.html</a>）</p>
<p>首先是拿到手的国际邮件：</p>
<p style="text-align: center;"><a href="http://www.imchao.net/wp-content/uploads/2010/03/2010-09-03-16.08.26.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="aligncenter size-medium wp-image-299" title="yubico发来的EMS" src="http://www.imchao.net/wp-content/uploads/2010/03/2010-09-03-16.08.26-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><span id="more-290"></span></p>
<p>拆封后还有一个小信封：</p>
<p style="text-align: center;"><a href="http://www.imchao.net/wp-content/uploads/2010/03/4421768071_41d619200d_b.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="aligncenter size-medium wp-image-301" title="EMS拆开后的小信封" src="http://www.imchao.net/wp-content/uploads/2010/03/4421768071_41d619200d_b-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>揭开庐山真面目：</p>
<p style="text-align: center;"><a href="http://www.imchao.net/wp-content/uploads/2010/03/4421768417_8ea393a414_b.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="aligncenter size-medium wp-image-302" title="yubikey的真面目" src="http://www.imchao.net/wp-content/uploads/2010/03/4421768417_8ea393a414_b-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>接入电脑后，会发出绿光，光环中心区域是静电感应区域，轻触就有反应：</p>
<p style="text-align: center;"><a href="http://www.imchao.net/wp-content/uploads/2010/03/4421797595_04cccb5486_b.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="aligncenter size-medium wp-image-303" title="开始yubikey" src="http://www.imchao.net/wp-content/uploads/2010/03/4421797595_04cccb5486_b-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>接下来我演示一下如何使用yubikey：</p>
<p>1.打开浏览器，lastpass处于未登录状态，点击图标：</p>
<p style="text-align: center;"><a href="http://www.imchao.net/wp-content/uploads/2010/03/4421844237_502fcacf7e_m.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="aligncenter size-full wp-image-304" title="点击lastpass" src="http://www.imchao.net/wp-content/uploads/2010/03/4421844237_502fcacf7e_m.jpg" alt="" width="233" height="116" /></a></p>
<p>2.输入邮件地址（可保存），短触yubikey，自动输入密码（可保存）：</p>
<p style="text-align: center;"><a href="http://www.imchao.net/wp-content/uploads/2010/03/4422609546_81c009bdd3.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="aligncenter size-medium wp-image-305" title="登陆lastpass" src="http://www.imchao.net/wp-content/uploads/2010/03/4422609546_81c009bdd3-300x222.jpg" alt="" width="300" height="222" /></a></p>
<p>3.提示二次验证（此步骤可选），长触yubikey，自动填入OTP密码：</p>
<p style="text-align: center;"><a href="http://www.imchao.net/wp-content/uploads/2010/03/4421844351_5d0a8c1c57.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="aligncenter size-medium wp-image-306" title="lastpass使用yubikey二次认证" src="http://www.imchao.net/wp-content/uploads/2010/03/4421844351_5d0a8c1c57-300x117.jpg" alt="" width="300" height="117" /></a></p>
<p>4.最后登录成功，上网畅通无阻：</p>
<p style="text-align: center;"><a href="http://www.imchao.net/wp-content/uploads/2010/03/4422609696_fc31b10387_m.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="aligncenter size-full wp-image-307" title="lastpass登陆成功" src="http://www.imchao.net/wp-content/uploads/2010/03/4422609696_fc31b10387_m.jpg" alt="" width="238" height="113" /></a></p>
 <p><map name='google_ad_map_290_b72cec5cd1c1c856'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/290?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_290_b72cec5cd1c1c856' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=290&amp;url= http%3A%2F%2Fwww.imchao.net%2Fdigital%2Fstart-yubikey.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.imchao.net/digital/start-yubikey.html/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Yubikey不再记忆密码</title>
		<link>http://www.imchao.net/life/yubikey-nerver-remember-the-password.html</link>
		<comments>http://www.imchao.net/life/yubikey-nerver-remember-the-password.html#comments</comments>
		<pubDate>Wed, 10 Mar 2010 13:23:30 +0000</pubDate>
		<dc:creator>吼吼</dc:creator>
				<category><![CDATA[Digital]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[lastpass]]></category>
		<category><![CDATA[mashedlife]]></category>
		<category><![CDATA[umikey]]></category>
		<category><![CDATA[yubikey]]></category>

		<guid isPermaLink="false">http://www.imchao.net/?p=284</guid>
		<description><![CDATA[我的密码管理历史 相信的大家一定有很多帐号。上网这么多年下来，东注册一个帐号，西注册一个帐号。时间长了，觉得老用一套帐号不安全。于是换了一套又一套，久而久之密码堆积了一堆... ]]></description>
			<content:encoded><![CDATA[ <div>
<div>
<h2>我的密码管理历史</h2>
<p>相信的大家一定有很多帐号。上网这么多年下来，东注册一个帐号，西注册一个帐号。时间长了，觉得老用一套帐号不安全。于是换了一套又一套，久而久之密码堆积了一堆，连自己也搞不清哪个对应哪个了。就在两年前，我找到了keepass这个软件。它很好的帮我把所有密码管理起来，而且还是跨平台的，我只要记住主密码(master key)就可以取得所有帐号密码。不过我经常要在不同的系统、电脑使用同一个密码库，keepass没有我想要的同步功能。后来找到了Dropbox这个强大的同步工具，帮keepass弥补了这个缺点。尽管同步问题解决了，可是keepass还是有个致命的弱点&#8211;操作效率太低。每登录一个网站，先要找到这个帐号记录，再复制粘贴帐号，然后还要复制粘贴密码。来来回回折腾太麻烦了，如果keepass能和浏览器结合，自动帮我填入帐号密码就好了。就像浏览器在带的密码管理器一样，不过浏览器自带的不安全，也不方便，不能同步，而且重装系统帐号就丢失了。</p>
<p>后来我找到了Lastpass这个强大的工具，它是浏览器的扩展，支持ie、firefox、chrome，而且跨平台，甚至在<a href="http://www.holaba.com.cn/apple/mobile-phones/iphone" target="_blank">iphone</a>、黑莓、android上都有客户端。lastpass是把我的帐号密码存在云端的。每当我在一个网站登录的时候，它会检测这个站点的帐号是否记录过，如果没有，它会提示我记录。当我确定记录帐号后，下次再访问这个站点的时候，lastpass会自动帮我填入帐号密码，我只要按登录即可。有了lastpass，我再也不需要同步密码库了，这些信息本生就存储在lastpass公司的服务器上。也许有人会担心。密码存在云端安不安全？lastpass是否可信任？lastpass被黑客攻击了怎么办？对于这些质疑，我只能说没有绝对安全的东西，我们只能相信它。即便存在自己的电脑上，也会遭受病毒、黑客的威胁。一个公司的技术实力总比一个人强吧。<span id="more-284"></span></p>
<p>lastpass解决了大部分问题，大大地提高了用户体验。剩下还有一个问题，如何让master key足够的安全呢？</p>
<h2>yubikey，廉价的OTP方案</h2>
<p>对于这个产品相信大家从没听过。这是一款强大又廉价的产品，要把它所有功能都讲清楚是不容易的。所以我就先简单介绍两个功能，以后再扩展。</p>
<p>一、OTP(One-Time-Password)</p>
<p>yubikey是个可以根据一定算法随机产生密码的输入设备。yubikey产生的OTP密码分为两部分，左边部分是设备识别码，右边部分是随机码。每个设备的识别码是全球唯一的。</p>
<p>接下来解释一下过程。A网站支持使用yubikey登录，于是我把自己的yubikey和A网站绑定。当访问A网站时，A网站提示输入yubikey密码。我轻触一下yubikey，OTP密码就马上输入好了。这时候A网站会去访问yubikey开发公司的服务器yubico，并提交收到的OTP密码请求认证。yubico得到密码后，把它拆分，根据自己的私有算法进行校验。如果这个密码确实是绑定A网站的密码的那个yubikey设备产生的，yubico就会告诉A网站验证成功。</p>
<p>每个yubikey都根据自己的识别码，以不同方式产生不同的随机密码。每个时刻产生的密码都不同。所以yubikey之间不可以相互冒充。而这种随机验证方式，对于黑客来说更难破解。</p>
<p>二、Static Password静态密码</p>
<p>这是yubikey的附加功能。可以记忆一个复杂的、较长的、个人难以记忆的密码。比如：</p>
<p>某B，把sdadasdefkjgbhoijt34tdfKJSW%^$%^&amp;hasdqal942nlsdnfalsz这段作为自己lastpass的master key。某B不需要记忆这么恐怖的密码。某B只要把它设置到yubikey上。轻触一下yubikey，就可以把密码输入。</p>
<p>很好理解吧，这个功能就是为master key设计的。从此不再需要记忆任何密码。yubikey在密码就在。yubikey丢了，那也就惨了。所以最好在电脑以外的地方备份一下这段密码。</p>
<h2>其他</h2>
<p>yubikey2.1版本支持OTP和StaticPassword同时存在。可以通过轻触时间的长短来区分。用户可以使用官方的工具的来自己定义yubikey的功能，包括密码长短，复杂程度等等。</p>
<p>另外于yubikey的开源项目非常多，比如wordpress上的yubikey验证插件，drapal上的验证插件。大家可以找到很多其他相关的项目。在开发方面，公司开放了很多资料：<a href="http://www.yubico.com/developers/intro/" target="_blank">http://www.yubico.com/developers/intro/</a></p>
<p>最后再提一下，尽管yubikey在诸多OTP方案中，是比较廉价的，25美元一个，不过对于大多数中国草根来说还是挺贵的，而且国内没的卖。幸好yubikey有个竞争对手叫umikey，它们的思路差不多的。umikey在中国有生产，也有卖，100RMB以内，不是很贵。可惜umikey的应用还不是很广泛，我们只能祝福它快速发展。lastpass有个竞争对手叫mashedlife，mashedlife是umikey的最佳搭档。当然据说也可以和yubikey结合（我没试过）。另外听小道消息，unikey正在和lastpass接触。</p>
<p>听我讲了这么多，还是自己去看看吧，相关网址：</p>
<p><a href="https://lastpass.com/" target="_blank">https://lastpass.com/</a></p>
<p><a href="http://www.yubico.com/" target="_blank">http://www.yubico.com/</a></p>
<p><a href="http://www.umikey.com/" target="_blank">http://www.umikey.com/</a></p>
<p><a href="http://www.umikey.cn/" target="_blank">http://www.umikey.cn/</a></p>
<p><a href="https://mashedlife.com/" target="_blank">https://mashedlife.com/</a></p>
</div>
</div>
 <p><map name='google_ad_map_284_b72cec5cd1c1c856'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/284?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_284_b72cec5cd1c1c856' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=284&amp;url= http%3A%2F%2Fwww.imchao.net%2Flife%2Fyubikey-nerver-remember-the-password.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.imchao.net/life/yubikey-nerver-remember-the-password.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>用笨办法实现电驴和迅雷直接的互导</title>
		<link>http://www.imchao.net/tips/the-realization-of-edonkey-and-thunder-direct-transconductance.html</link>
		<comments>http://www.imchao.net/tips/the-realization-of-edonkey-and-thunder-direct-transconductance.html#comments</comments>
		<pubDate>Fri, 05 Mar 2010 04:03:38 +0000</pubDate>
		<dc:creator>吼吼</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[edonley]]></category>
		<category><![CDATA[eMule]]></category>
		<category><![CDATA[下载]]></category>
		<category><![CDATA[迅雷]]></category>

		<guid isPermaLink="false">http://www.imchao.net/?p=278</guid>
		<description><![CDATA[之前在用电驴下一部比较老的片子，结果挂到95%最后发现已经没人共享了，这很是让人郁闷。然后我拿迅雷离线下载下同样的文件，结果发现迅雷居然下好了，我估计这文件一直存在迅雷的服... ]]></description>
			<content:encoded><![CDATA[ <p>之前在用电驴下一部比较老的片子，结果挂到95%最后发现已经没人共享了，这很是让人郁闷。然后我拿迅雷离线下载下同样的文件，结果发现迅雷居然下好了，我估计这文件一直存在迅雷的服务器上。如果这时候我用迅雷下载，当然可以下完，但我又不想让那个95%的电驴白下，怎么办呢？</p>
<p>曾经我有一个同学号称下载杀手(什么download breaker，完全盗版imagine breaker嘛)。flashget、迅雷、bitcomet、emule之类的文件他都可以实现互导，不能直接导的，还可以通过修改文件来导入。不过我没这么厉害，我只会把店里的文件后缀改成迅雷的后缀，然后让迅雷导入。这方法以前可行，可是现在好像不行了，不知道为什么。</p>
<p>后来我突发奇想。虽然他们两的文件格式一样，可是他们都遵循ed2k协议。于是我想到了通过ed2k互导。我抱着试一试的心态，把电驴和迅雷都连上同一台ed2k服务器，结果迅雷发现了我的电驴，然后以2m/s的速度下好了95%。最后我用迅雷离线下载把文件下好了，稍微等了一会，电驴也下好了。出于对别人分享的尊敬，我继续把电驴开着给他人分享。</p>
<p>这种方法果然可行，不过有一定成功率。有一次，我的迅雷怎么也连不上自己的电驴。可能是因为下载的人还是比较多的，有干扰。为了解决这个问题，我找到了利器，edonkey server。对，就是在本地搭建私人的电驴服务器，导完后，再关掉。可惜的是edonkey的网站已经关掉了，找不到正宗的官方下载地址。没办法，只能从国内某些下载站下载了。下下来后，发现这个软件很小，而且不需要安装，直接运行即可，非常方便。</p>
<p>用法也很简单。首先启动ed2k服务器，然后在迅雷和电驴里面加入本地地址，我用的是localhost。然后让迅雷电驴都连上去，接着就开始飞快导入咯。很简单吧？</p>
<p>附上ed2k服务器软件（共享一个月）：</p>
<p>Linux版：<a href="https://dl.dropbox.com/u/1284503/ed2k/ed2kserver.gz">https://dl.dropbox.com/u/1284503/ed2k/ed2kserver.gz</a></p>
<p>Windows版：<a href="https://dl.dropbox.com/u/1284503/ed2k/ed2kserver.zip">https://dl.dropbox.com/u/1284503/ed2k/ed2kserver.zip</a></p>
<p>最后提醒大家：</p>
<p>下完后一定要分享！！</p>
 <p><map name='google_ad_map_278_b72cec5cd1c1c856'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/278?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_278_b72cec5cd1c1c856' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=278&amp;url= http%3A%2F%2Fwww.imchao.net%2Ftips%2Fthe-realization-of-edonkey-and-thunder-direct-transconductance.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.imchao.net/tips/the-realization-of-edonkey-and-thunder-direct-transconductance.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>说说Python包管理</title>
		<link>http://www.imchao.net/linux/talk-about-python-package-management.html</link>
		<comments>http://www.imchao.net/linux/talk-about-python-package-management.html#comments</comments>
		<pubDate>Fri, 05 Feb 2010 08:29:40 +0000</pubDate>
		<dc:creator>吼吼</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[easy_install]]></category>
		<category><![CDATA[pypi_install]]></category>
		<category><![CDATA[setuptools]]></category>
		<category><![CDATA[stdeb]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.imchao.net/?p=273</guid>
		<description><![CDATA[虽然我的Python学习才起步，不过有时候也需要装一些额外的软件包。一般Python教程上都推荐使用easy_install。这个工具很酷，有了它，我不需要去找软件包。我可以直接easy_install 包名，它会帮我... ]]></description>
			<content:encoded><![CDATA[ <p>虽然我的Python学习才起步，不过有时候也需要装一些额外的软件包。一般Python教程上都推荐使用easy_install。这个工具很酷，有了它，我不需要去找软件包。我可以直接easy_install 包名，它会帮我去pypi查找下载最新的软件包，然后自动安装。这个和Linux上的apt、yum之类的包管理器很类似。但是问题来，作为Linux用户，我不希望我在系统上有两套包管理器。有一天我在安装Mako(一个很快的模板引擎)，我就在想我是使用apt来安装呢，还是使用easy_install来安装。于是我用apt-cache showpkg python-mako检查一下，apt源中的mako是2.4版本的。然后我又用easy_install检查了一下，是2.5版本的。当然，听说easy_install所使用的pypi库的包往往都是最新的。像我这样的更新狂肯定想装2.5版本的，那我应该使用easy_install安装吗？</p>
<p>经我研究发现，easy_install有以下问题：</p>
<p style="padding-left: 30px;">1.卸载能力低下，easy_install -m 包名，可以卸载软件包，但是卸载后还要手动删除遗留文件。</p>
<p style="padding-left: 30px;">2.可能会和apt冲突。比如某天我用easy_install安装了软件包A，后来我在用apt安装软件包B的时候依赖软件包A，而apt并不知道A的存在。<span id="more-273"></span></p>
<p>这样的工具我还敢用吗？所以我在想有没有什么东西，可以用pypi下载最新的软件包，然后自动打成deb包，再使用dpkg来安装，纳入apt的管理。在寻觅中我找到了<a href="http://pypi.python.org/pypi/stdeb/0.5.1" target="_blank">stdeb</a>这个工具很强大，提供pypi_install的指令，我只需要执行pypi_install Mako，它就会去pypi找最新的mako，然后打成deb包，再安装。很强大吧？让我们看看它还有哪些功能。</p>
<h2>stdeb</h2>
<pre class="brush: bash;">pypi-install mypackage</pre>
<p>从pypi下载最新软件包，构建deb包，再安装</p>
<pre><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">
<pre class="brush: bash;">py2dsc mypackage-0.1.tar.gz</pre>
<p></span></pre>
<p>使用源码包构建deb src包</p>
<pre class="brush: bash;">python setup.py --command-packages=stdeb.command sdist_dsc</pre>
<p>在使用setuptools的python源码包中，构建deb src包</p>
<pre class="brush: bash;">python setup.py --command-packages=stdeb.command bdist_deb</pre>
<p>在使用setuptools的python源码包中，构建deb包</p>
<p>stdeb很强大，不过也有一些问题，比如有时候生成的deb包名与apt源中的不一样。比如我安装web.py的时候，生成的deb包是python-web-py，而apt源中的是python-webpy。这方面stdeb还有待改进那。</p>
<h2>获得stdeb</h2>
<p>如何获得stdeb呢，似乎ubuntu9.10的源中并没有stdeb。不过你可以在这里找到它<a href="http://packages.ubuntu.com/zh-cn/lucid/python-stdeb">http://packages.ubuntu.com/zh-cn/lucid/python-stdeb</a>。</p>
<p>这个版本是给10.04使用的，不过9.10也能用，先用着吧。</p>
 <p><map name='google_ad_map_273_b72cec5cd1c1c856'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/273?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_273_b72cec5cd1c1c856' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=273&amp;url= http%3A%2F%2Fwww.imchao.net%2Flinux%2Ftalk-about-python-package-management.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.imchao.net/linux/talk-about-python-package-management.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DIY了家用NAS</title>
		<link>http://www.imchao.net/digital/diy-for-home-nas.html</link>
		<comments>http://www.imchao.net/digital/diy-for-home-nas.html#comments</comments>
		<pubDate>Wed, 27 Jan 2010 07:21:04 +0000</pubDate>
		<dc:creator>吼吼</dc:creator>
				<category><![CDATA[Digital]]></category>
		<category><![CDATA[nas]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.imchao.net/?p=267</guid>
		<description><![CDATA[随着我收藏的电影、动画不断增多，小小的移动硬盘已经不能满足我对容量的需求。而且家里有两台笔记本、一台上网本、一台高清播放机，等我毕业后，还要从学校搬回一台台式机，就算买... ]]></description>
			<content:encoded><![CDATA[ <p>随着我收藏的电影、动画不断增多，小小的移动硬盘已经不能满足我对容量的需求。而且家里有两台笔记本、一台上网本、一台高清播放机，等我毕业后，还要从学校搬回一台台式机，就算买了移动硬盘，也不能解决所有设备的存储问题。假期，表弟表妹们经常会来我家玩，看看电影是必然的，这也就面临着数据共享的问题。于是我打算搞一台nas。目前市面上有一些现成的家用nas，比如qnap、buffalo。虽然他们都是基于Linux的，可以自己定制，但是价格比较昂贵，而且性能一般。最终我还是决定自己组一台低功耗计算机当nas使用。</p>
<p>配置如下：</p>
<p>主板：Intel D945GCLF(板载N230、显卡、两个sata接口)</p>
<p>内存：金士顿 1G DDR2</p>
<p>机箱：技展 高清3号机箱（两个3.5寸的仓位）</p>
<p>电源：航嘉冷静王标准版电源 最大300W</p>
<p>（本来想搞DC-ATX这类五风扇电源的，又静音又省电，但是好像都只有一个sata电源接口）</p>
<p>硬盘：西数 WD10EARS 1TB 64M缓存</p>
<p>总价：1500</p>
<p>所有配件都在淘宝上搞定，1天后全部到货。</p>
<p><span id="more-267"></span></p>
<p>这是Atom主板：</p>
<p><a href="http://www.imchao.net/wp-content/uploads/2010/01/4307943125_5b1483d2e5_b.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="aligncenter size-medium wp-image-314" title="装好后的nas主板" src="http://www.imchao.net/wp-content/uploads/2010/01/4307943125_5b1483d2e5_b-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>装好后的裸机：</p>
<p><a href="http://www.imchao.net/wp-content/uploads/2010/01/4307943127_8cdd05f895_b.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="aligncenter size-medium wp-image-315" title="nas的组件全部拼接好了" src="http://www.imchao.net/wp-content/uploads/2010/01/4307943127_8cdd05f895_b-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>装好后的样子：</p>
<p><a href="http://www.imchao.net/wp-content/uploads/2010/01/4307943137_65bff76b1c_z.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="aligncenter size-medium wp-image-317" title="装好后的样子" src="http://www.imchao.net/wp-content/uploads/2010/01/4307943137_65bff76b1c_z-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>机箱大小与上网本对比：</p>
<p><a href="http://www.imchao.net/wp-content/uploads/2010/01/4307943139_c023400cf6_z.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="size-medium wp-image-316 alignnone" title="nas机箱与上网本对比" src="http://www.imchao.net/wp-content/uploads/2010/01/4307943139_c023400cf6_z-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.imchao.net/wp-content/uploads/2010/01/4308686298_574395b739_z.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="size-medium wp-image-318 alignnone" title="nas机箱与上网本对比2" src="http://www.imchao.net/wp-content/uploads/2010/01/4308686298_574395b739_z-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>花了一下午算是装好了，系统本来是想选用freenas、openfiler，不过我还想有更多的定制性，于是装了ubuntu server，没有装xserver，不需要图形界面。</p>
<p><a href="http://www.imchao.net/wp-content/uploads/2010/01/4307943143_5cf4aeabf2_z.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="aligncenter size-medium wp-image-319" title="nas安装ubuntu server" src="http://www.imchao.net/wp-content/uploads/2010/01/4307943143_5cf4aeabf2_z-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>然后装了以下服务：</p>
<p>Samba：Windows 文件共享</p>
<p>Apache：http服务器</p>
<p>Mysql：数据库服务器</p>
<p>SSH：远程管理</p>
<p>uShare：多媒体upnp服务器、DLNA</p>
<p>transmission：bt下载</p>
<p>webmin：web端管理</p>
<p>acpid：有了这个直接按电源钮就能关机了。</p>
<p>目前nas正式投入使用了，可以拖动多台电脑同时看电影，当然，1080p的还不行，毕竟家里没有千兆网卡和千兆路由。半夜还能bt下载。</p>
<p>最后给transmission web端来了张照片，很mac啊。</p>
<p><a href="http://www.imchao.net/wp-content/uploads/2010/01/4307968795_ae339894f3.jpg" class="highslide-image" onclick="return hs.expand(this);"><img class="aligncenter size-full wp-image-320" title="nas上的transmission web" src="http://www.imchao.net/wp-content/uploads/2010/01/4307968795_ae339894f3.jpg" alt="" width="500" height="360" /></a></p>
 <p><map name='google_ad_map_267_b72cec5cd1c1c856'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/267?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_267_b72cec5cd1c1c856' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=267&amp;url= http%3A%2F%2Fwww.imchao.net%2Fdigital%2Fdiy-for-home-nas.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.imchao.net/digital/diy-for-home-nas.html/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Netbook OS分享会</title>
		<link>http://www.imchao.net/linux/netbook-os-sharing.html</link>
		<comments>http://www.imchao.net/linux/netbook-os-sharing.html#comments</comments>
		<pubDate>Sun, 27 Dec 2009 13:57:38 +0000</pubDate>
		<dc:creator>吼吼</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.imchao.net/?p=262</guid>
		<description><![CDATA[酝酿了很久的分享会，作为杭州GTUG成立后的首次活动，《Netbook OS大比拼》圆满结束咯。这得要感谢与会的每一位朋友，虽然外面下着大雪，但是还是有很多朋友来了，而且还有三位上海朋友；... ]]></description>
			<content:encoded><![CDATA[ <p>酝酿了很久的分享会，作为杭州<a href="http://groups.google.com/group/hangzhou-gtug">GTUG</a>成立后的首次活动，《Netbook OS大比拼》圆满结束咯。这得要感谢与会的每一位朋友，虽然外面下着大雪，但是还是有很多朋友来了，而且还有三位上海朋友；另外还要特别感谢杭州图书馆，他们为我们提供了一个非常棒的会场，书香气为我们的技术交流更是增添了别样的气氛。</p>
<p>以下是流水帐。这次分享会是由<a href="http://imtx.cn" target="_blank">Tualatrix</a>（以下简称TX）和我共同主持的。会议主题是《Netbook OS大比拼》。<span id="more-262"></span></p>
<p>分享会开始，TX同学首先给大家带来了Chromium OS的介绍。正如TX同学所介绍的，在WebGL、WebSocket、HTML5这类新技术陆续推出后，Chromium OS可以算是互联网发展的必然产物。确实如此，没有这些技术的支撑，Chromium OS是很难把桌面应用搬到浏览器上的（如:3D网游）；没有V8引擎的强劲保障，工程师也不敢把桌面应用迁移到浏览器上。</p>
<p>秀完很酷的Chromium OS，接下来是我给大家带来的可爱的Moblin。虽然Moblin的很多特效都很酷，但是我还是觉得可爱这个此更适合它。我这次给大家演示的是Intel最新的Moblin V2.1。给大家炫完Moblin的界面后，我又简单的介绍了一下Clutter技术，并且还演示了几个用Python写的Clutter Demo。我接触Moblin近两个月，其实了解的还不是很深，所以不能给大家深入讲解Clutter开发，不过我以后肯定会研究Clutter开发。最后我简单展示了一下我近期的研究成果，一个是完成度70%的gstreamer-plugins的rpm包，一个是ndiswrapper的rpm包，还有就是openvpn的rpm包。Intel的Moblin自带软件包比较少，很多还不能和fedora通用，所以我只能自己动手了。目前我的Moblin已经解决了ath9k的驱动问题，能播放Mp3、Rmvb（无声）了。算是已经基本满足我对OS的需求了。近段时间，我还会在这方面花时间，为了打造我完美可爱的Moblin！</p>
<p>在我们专题展示结束后，我们又给大家展示了一下Gnome3中的组件，gnome-shell，同样采用了clutter技术。最后我还发现这些采用Clutter技术的软件有很多共同点，包括交互的理念，对3d技术的态度。</p>
<p>分享会顺利结束了，我想这是一个好的开始。TX和我只是抛砖引玉，希望以后GTUG每个月的分享会，朋友们都能有所分享，有所收获，我们的分享会越开越精彩。</p>
<p>最后是我们会上的幻灯片，还有python demo包。</p>
<p><a href="http://code-of-tualatrix.googlecode.com/files/chrome-os.pdf">Chromium OS大探秘</a></p>
<p><a href="http://imchao.googlecode.com/files/moblin.pdf" target="_blank">可爱的Moblin</a></p>
<p><a href="http://imchao.googlecode.com/files/pyclutter-demo.tar.gz" target="_blank">pyclutter-demo</a></p>
 <p><map name='google_ad_map_262_b72cec5cd1c1c856'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/262?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_262_b72cec5cd1c1c856' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=262&amp;url= http%3A%2F%2Fwww.imchao.net%2Flinux%2Fnetbook-os-sharing.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.imchao.net/linux/netbook-os-sharing.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>解决1005ha/1008ha在ubuntu 9.10下糟糕的表现</title>
		<link>http://www.imchao.net/linux/solve-1005ha1008ha-the-poor-performance-under-ubuntu-9-10.html</link>
		<comments>http://www.imchao.net/linux/solve-1005ha1008ha-the-poor-performance-under-ubuntu-9-10.html#comments</comments>
		<pubDate>Sun, 06 Dec 2009 08:29:25 +0000</pubDate>
		<dc:creator>吼吼</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[1005ha-h]]></category>
		<category><![CDATA[2.6.31]]></category>
		<category><![CDATA[ar9285]]></category>
		<category><![CDATA[ath9k]]></category>
		<category><![CDATA[atheros]]></category>
		<category><![CDATA[EeePC]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[华硕]]></category>

		<guid isPermaLink="false">http://www.imchao.net/?p=252</guid>
		<description><![CDATA[自从我的Eee pc 1005ha-h升级到ubuntu 9.10后，无线网络开始不断抽风。 先是信号非常弱，频繁掉线。我在launchpad.net查到1005ha的无线网卡是atheros的ar9285，对应的驱动是ath9k。而ath9k在2.6.31下有兼容性... ]]></description>
			<content:encoded><![CDATA[ <p>自从我的Eee pc 1005ha-h升级到ubuntu 9.10后，无线网络开始不断抽风。</p>
<p>先是信号非常弱，频繁掉线。我在launchpad.net查到1005ha的无线网卡是atheros的ar9285，对应的驱动是ath9k。而ath9k在2.6.31下有兼容性问题，ubuntu的backport驱动解决了这些问题。于是我给2.6.31.14内核安装了backport驱动。</p>
<pre class="brush: bash;">sudo apt-get install linux-backports-modules-2.6.31-14-generic</pre>
<p>重启后，信号变强了，线也不掉了，但是网络僵尸了。主要表现在chrome打开一个站点往往需要15-30秒时间，其中至少有10秒时间在解析dns。开始我以为是ipv6导致解析缓慢的，所以我就把ipv6禁用了。</p>
<p>打开配置文件：</p>
<pre class="brush: bash;">gksu gedit /etc/sysctl.conf </pre>
<p>在文件最后加入：</p>
<pre class="brush: bash;">net.ipv6.conf.wlan0.disable_ipv6 = 1</pre>
<p>重启后发现速度确实快了，但是解析还是需要很长时间。<span id="more-252"></span></p>
<p>后来在lauchpad.net上看到<a href="https://bugs.launchpad.net/ubuntu/+source/linux-backports-modules-2.6.31/+bug/414560" target="_blank">类似的bug</a>，只要安装backport-wireless的驱动就可以了。</p>
<pre class="brush: bash;">sudo apt-get install linux-backports-modules-wireless-karmic-generic</pre>
<p>这个软件包会自动安装2.6.31-15以上的内核，装完后发现，速度更慢了，而且所有加密的无线网络都连不上了。我看了一下日志。</p>
<pre class="brush: bash;">tail /var/log/syslog</pre>
<p>发现下面的错误几乎总是日志的最后一行。</p>
<pre class="brush: bash;">wpa_supplicant[922]: CTRL-EVENT-SCAN-RESULTS</pre>
<p>接着我又在launchpad.net找到了<a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/460886" target="_blank">对应的bug</a>，但是至今还没有解决。此时我已经1周不能正常上网了，每天下班回来就开始折腾ath9k驱动，弄得快崩溃了。甚至后来还考虑给1005ha换个无线模块或者买个usb的无线网卡。我装了个windows 7，打算逛逛淘宝。在装驱动的时候突然想到，好像有个什么软件可以让linux使用windows的驱动。这就是ndiswrapper。于是我赶忙去asus官网下了个<a href="http://dlsvr04.asus.com/pub/ASUS/EeePC/1005HAB/WLAN_NE785.zip " target="_blank">xp版的驱动</a>。下好后解压，里面有个ndis5x文件夹，这是我要用的，先放一边，装个ndiswrapper再说：</p>
<pre class="brush: bash;">sudo apt-get install ndiswrapper-utils-1.9</pre>
<p>装好后我进入ndis5x目录，安装驱动，这会需要一小会时间。</p>
<pre class="brush: bash;">sudo ndiswrapper -i netathw.inf</pre>
<p>装好后，我们为modprobe生成一个配置文件。</p>
<pre class="brush: bash;">sudo ndiswrapper -m</pre>
<p>再打开module的配置文件</p>
<pre class="brush: bash;">gksu gedit /etc/modules </pre>
<p>在尾行加入以下内容</p>
<pre class="brush: bash;">ndiswrapper</pre>
<p>检查一下驱动是否正确安装。</p>
<pre class="brush: bash;">ndiswrapper -l</pre>
<p>如果有下面内容就表示已经正确安装了。</p>
<pre class="brush: bash;">netathw : driver installed
	device (168C:002B) present (alternate driver: ath9k)</pre>
<p>好了，我们把ath9k卸了再加载ndiswrapper看看</p>
<pre class="brush: bash;">sudo rmmod ath9k
sudo modprobe ndiswrapper</pre>
<p>此时无线应该已经可用，速度飞快。最后收个尾，把ath9k禁用。</p>
<p>打开modprobe的blacklist</p>
<pre class="brush: bash;">gksu gedit /etc/modprobe.d/blacklist.conf</pre>
<p>在尾行加入</p>
<pre class="brush: bash;">ath9k</pre>
<p>弄好ndiswrapper后，我的网络非常稳定，至今还没有异常断过。</p>
<p>如果你的在用linux 2.6.31的内核，如果你的网卡也是悲剧的atheros生产的，如果你也正在饱受ath9k的折磨，那么不妨尝试一下我的方案吧。</p>
 <p><map name='google_ad_map_252_b72cec5cd1c1c856'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/252?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_252_b72cec5cd1c1c856' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=252&amp;url= http%3A%2F%2Fwww.imchao.net%2Flinux%2Fsolve-1005ha1008ha-the-poor-performance-under-ubuntu-9-10.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.imchao.net/linux/solve-1005ha1008ha-the-poor-performance-under-ubuntu-9-10.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>在Moblin2.1-preview上编译安装ibus</title>
		<link>http://www.imchao.net/linux/compiled-in-the-moblin2-1-preview-install-ibus.html</link>
		<comments>http://www.imchao.net/linux/compiled-in-the-moblin2-1-preview-install-ibus.html#comments</comments>
		<pubDate>Sat, 07 Nov 2009 17:22:58 +0000</pubDate>
		<dc:creator>吼吼</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[1005ha-h]]></category>
		<category><![CDATA[clutter]]></category>
		<category><![CDATA[EeePC]]></category>
		<category><![CDATA[ibus]]></category>
		<category><![CDATA[moblin]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[上网本]]></category>

		<guid isPermaLink="false">http://www.imchao.net/?p=217</guid>
		<description><![CDATA[前段时间安装了Moblin2.1-preview版，一直没玩。今天突然有兴致跑进去玩玩。先是改了一下源，升级了一把，大概250MB。然后发现浏览器变成firefox3.5了，支持书签和插件，clutter下的ff就是漂亮，上... ]]></description>
			<content:encoded><![CDATA[ <p>前段时间安装了Moblin2.1-preview版，一直没玩。今天突然有兴致跑进去玩玩。先是改了一下源，升级了一把，大概250MB。然后发现浏览器变成firefox3.5了，支持书签和插件，clutter下的ff就是漂亮，上网一定很爽！可是为什么不给我装好输入法呢？找了半天也没有找到安装的入口，所以我进shell安装了scim。</p>
<pre class="brush: bash;">
yum install scim scim-pinyin scim-bridge scim-bridge-gtk scim-bridge-clutter
</pre>
<p>装好后发现很多地方用不了scim。我只好抛弃了scim，转投ibus。</p>
<p>ibus没有现成的包，必须手动编译。于是我开始手动编译，接下来的过程消耗了我一个晚上，弄得我头昏脑胀，可算是凄惨啊。</p>
<h2>编译ibus</h2>
<p>参考地址：http://code.google.com/p/ibus/wiki/Install</p>
<p>先把依赖包装好:</p>
<pre class="brush: bash;">
yum install git gnome-common autoconf automake libtool glib2-devel intltool gtk-doc GConf-dbus-devel make gcc clutter-devel dbus-python-devel iso-codes-devel
</pre>
<p>然后把源代码下下来：</p>
<pre class="brush: bash;">
git clone git://github.com/phuang/ibus.git ibus
cd ibus
</pre>
<p>开始编译</p>
<pre class="brush: bash;">
./autogen.sh --prefix='/usr' --sysconfdir='/etc' --libdir='/usr/lib' --enable-gtk-doc
make
sudo make install
</pre>
<p>我在运行autogen.sh的时候出现了以下错误：</p>
<p>Makefile.am: required file `./ChangeLog&#8217; not found</p>
<p>直接输入下面指令后，重新运行autogen.sh</p>
<pre class="brush: bash;">
touch ChangeLog
</pre>
<h2>编译ibus-pinyin</h2>
<p>先安装依赖包：</p>
<pre class="brush: bash;">
yum install sqlite-devel gcc-c++ libuuid-devel
</pre>
<p>下载源代码：</p>
<pre class="brush: bash;">
git clone git://github.com/phuang/ibus-pinyin.git ibus-pinyin
cd ibus-pinyin
</pre>
<p>开始编译：</p>
<pre class="brush: bash;">
./autogen.sh --prefix=/usr
make
sudo make install
</pre>
<p><span id="more-217"></span></p>
<h2>编译ibus-client-clutter</h2>
<p>参考地址：http://moblin.org/documentation/input-method-framework/guide-ibus-moblin2</p>
<p>先解决依赖问题：</p>
<pre class="brush: bash;">
yum install clutter-imcontext-devel
</pre>
<p>下载源代码</p>
<pre class="brush: bash;">
git clone git://git.moblin.org/ibus-client-clutter
cd ibus-client-clutter
</pre>
<p>开始编译：</p>
<pre class="brush: bash;">
./autogen.sh --prefix=/usr --sysconfdir=/etc
</pre>
<p>这时候会出错，它要求clutter的版本一定要是0.9的。我们修改一下配置文件：</p>
<pre class="brush: bash;">
vi configure.ac
</pre>
<p>找到clutter-0.9 &gt;= 0.9.7</p>
<p>改成clutter-1.0 &gt;= 0.9.7</p>
<p>重新运行autogen.sh，问题解决</p>
<pre class="brush: bash;">
make
sudo make install
</pre>
<p>刷新Clutter IMContext Framework的配置文件</p>
<pre class="brush: bash;">
clutter-scan-immodules &gt; /tmp/clutter.immodules
sudo cp /tmp/clutter.immodules /etc/clutter-imcontext/clutter.immodules
clutter-scan-immodules &gt; /tmp/clutter.immodules
sudo cp /tmp/clutter.immodules /etc/clutter-imcontext/clutter.immodules
</pre>
<p>最后在环境变量中加入：</p>
<pre class="brush: bash;">
export CLUTTER_IM_MODULE=ibus
export GTK_IM_MODULE=ibus
</pre>
<p>大功告成，重启一下，就可以使用ibus了。</p>
<p>什么？重启后ibus还没有启动？</p>
<p>原因是缺少pydxg。我们去http://www.freedesktop.org/wiki/Software/pyxdg下载最新源码</p>
<p>下载好后先安装需要的安装环境：</p>
<pre class="brush: bash;">
yum install python-devel
</pre>
<p>然后安装</p>
<pre class="brush: bash;">
tar zxvf pyxdg-0.18.tar.gz
cd pyxdg-0.18
python setup.py install
</pre>
<p>OK了，这下就可以使用ibus了。</p>
 <p><map name='google_ad_map_217_b72cec5cd1c1c856'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/217?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_217_b72cec5cd1c1c856' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=217&amp;url= http%3A%2F%2Fwww.imchao.net%2Flinux%2Fcompiled-in-the-moblin2-1-preview-install-ibus.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.imchao.net/linux/compiled-in-the-moblin2-1-preview-install-ibus.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>在Eee PC 1005ha上为Ubuntu打开多点触控</title>
		<link>http://www.imchao.net/linux/setting-up-multi-touch-scrolling-for-ubuntu-9-10-karmic-koala-linux-on-asus-eee-1005ha-netbook.html</link>
		<comments>http://www.imchao.net/linux/setting-up-multi-touch-scrolling-for-ubuntu-9-10-karmic-koala-linux-on-asus-eee-1005ha-netbook.html#comments</comments>
		<pubDate>Fri, 06 Nov 2009 12:57:07 +0000</pubDate>
		<dc:creator>吼吼</dc:creator>
				<category><![CDATA[Digital]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[1005ha-h]]></category>
		<category><![CDATA[EeePC]]></category>
		<category><![CDATA[上网本]]></category>
		<category><![CDATA[华硕]]></category>
		<category><![CDATA[多点触控]]></category>

		<guid isPermaLink="false">http://www.imchao.net/?p=210</guid>
		<description><![CDATA[原文：Setting up multi-touch scrolling for Ubuntu 9.10 Karmic Koala Linux on Asus Eee 1005HA netbook 虽然本文是基于Asus EeePC 1005ha的，但是本文阐述的方法也适用于其他采用Synaptics的笔记本。 多点触控允许用户使用... ]]></description>
			<content:encoded><![CDATA[ <p>原文：<a href="http://blog.twinapex.fi/2009/10/11/setting-up-multi-touch-scrolling-for-ubuntu-9-10-karmic-koala-linux-on-asus-eee-1005ha-netbook/">Setting up multi-touch scrolling for Ubuntu 9.10 Karmic Koala Linux on Asus Eee 1005HA netbook</a></p>
<p>虽然本文是基于Asus EeePC 1005ha的，但是本文阐述的方法也适用于其他采用Synaptics的笔记本。</p>
<p>多点触控允许用户使用双指手势在触摸板上进行UI操作。苹果率先在Macbook引入了此技术，大大提高了在上网本上浏览网页的用户体验。最重要的手势是双指滚动文本。</p>
<p>苹果还有很多相关的手势专利，所以他们不会被默认启用。</p>
<p>真正的多点触控需要多点感知(电容)的触摸板支持。但是大多数笔记本都没有配备这种触摸板。不过很幸运，我们可以在压力敏感的触摸板上通过计算和技巧模拟出一些类似双指滚动的简单手势。</p>
<p>注意：<a href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/355071" target="_blank">Ubuntu HAL对Synaptics的支持有问题</a>。只有最后那段shell脚本是有用的。在FDI文件中的HAL设定被忽略了。</p>
<h2>设定Synaptics驱动</h2>
<p>在终端中输入：</p>
<pre class="brush: bash;">
gksudo gedit /etc/hal/fdi/policy/11-x11-synaptics.fdi
</pre>
<p>把下面内容粘贴进去：<span id="more-210"></span></p>
<pre class="brush: xml;">
&lt;?xml version=”1.0″ encoding=”ISO-8859-1″?&gt;
&lt;deviceinfo version=”0.2″&gt;
    &lt;device&gt;
        &lt;match key=”info.capabilities” contains=”input.touchpad”&gt;
            &lt;merge key=”input.x11_driver” type=”string”&gt;synaptics&lt;/merge&gt;
            &lt;merge key=”input.x11_options.SHMConfig” type=”string”&gt;On&lt;/merge&gt;
            &lt;merge key=”input.x11_options.EmulateTwoFingerMinZ” type=”string”&gt;40&lt;/merge&gt;
            &lt;merge key=”input.x11_options.VertTwoFingerScroll” type=”string”&gt;1&lt;/merge&gt;
            &lt;merge key=”input.x11_options.HorizTwoFingerScroll” type=”string”&gt;1&lt;/merge&gt;
            &lt;merge key=”input.x11_options.TapButton1″ type=”string”&gt;1&lt;/merge&gt;
            &lt;merge key=”input.x11_options.TapButton2″ type=”string”&gt;3&lt;/merge&gt;
            &lt;!–two finger tap -&gt; middle clieck(3) –&gt;
            &lt;merge key=”input.x11_options.TapButton3″ type=”string”&gt;2&lt;/merge&gt;
            &lt;!–three finger tap -&gt; right click(2). almost impossible to click –&gt;
        &lt;/match&gt;
    &lt;/device&gt;
&lt;/deviceinfo&gt;
</pre>
<p>这个设定将允许我们使用synclient在终端观察触摸板的实时数据。</p>
<p>现在重启X：</p>
<pre class="brush: bash;">
sudo /etc/init.d/gdm restart
</pre>
<p>然后在终端中输入：</p>
<pre class="brush: bash;">
synclient -m 100
</pre>
<p>接着你将在终端看到这样的数据：</p>
<pre class="brush: bash;">
129.355  2912 3469  59 1  4  0 0 0 0 0  00000000   0  0  0   0   0
129.455  2952 3529  59 1  4  1 0 0 0 0  00000000   0  0  0   0   0
time     x    y   z f  w  l r u d m     multi  gl gm gr gdx gdy
129.555  3283 3516  60 1  4  1 0 0 0 0  00000000   0  0  0   0   0
129.656  3928 3517  60 1  4  1 0 0 0 0  00000000   0  0  0   0   0
129.756  4364 3637  60 1  4  1 0 0 0 0  00000000   0  0  0   0   0
129.856  4020 3329  49 1  4  0 0 0 0 0  00000000   0  0  0   0   0
129.956  3634 3122  58 1  4  0 0 0 0 0  00000000   0  0  0   0   0
130.057  3320 2957  60 1  4  0 0 0 0 0  00000000   0  0  0   0   0
130.157  2779 3312  61 1  4  0 0 0 0 0  00000000   0  0  0   0   0
130.257  2557 3739  61 1  4  0 0 0 0 0  00000000   0  0  0   0   0
130.358  2636 3485  39 1  4  0 0 0 0 0  00000000   0  0  0   0   0
130.458  2659 3104  60 1  4  0 0 0 0 0  00000000   0  0  0   0   0
130.558  2671 2988  60 1  4  0 0 0 0 0  00000000   0  0  0   0   0
</pre>
<p>f表示触摸板上的手指数，w表示触摸区域的宽度，z表示触摸的压力。</p>
<p>如果你用两只手指按在触摸板上，f值等于2，这代表你的触摸板支持多点感应。不过很不幸运，看样子华硕EeePC 1005ha支持1个点。</p>
<h2>模拟方法</h2>
<p>Synaptics的驱动可以在以下环境模拟双指触摸：</p>
<ul>
<li>触摸区域的宽度超过一定阈值（最小宽度）</li>
<li>触摸压力超过一定阈值</li>
</ul>
<p>当出现以上情况，驱动会认为也许用户正在使用两个手指。注意，每种触摸板都有特定的值，不能互用。</p>
<p><a href="http://manpages.ubuntu.com/manpages/karmic/man4/synaptics.4.html" target="_blank">Synaptics驱动设定的介绍在这里</a>。我们可以在允许时使用xinput指令来修改Synaptics的驱动设置。开一个窗口，用synclient -m 100监控。再在另一个窗口修改阈值，直到你找到笔记本触摸板的模拟参数。下面是我的xinput测试,在firefox中滚动任意长的网页。</p>
<pre class="brush: bash;">
moo@huiskuttaja:~$ xinput set-int-prop &quot;SynPS/2 Synaptics TouchPad&quot; &quot;Synaptics Two-Finger Width&quot; 32 7
moo@huiskuttaja:~$ xinput set-int-prop &quot;SynPS/2 Synaptics TouchPad&quot; &quot;Synaptics Two-Finger Pressure&quot; 32 280
moo@huiskuttaja:~$ xinput set-int-prop &quot;SynPS/2 Synaptics TouchPad&quot; &quot;Synaptics Two-Finger Width&quot; 32 11
moo@huiskuttaja:~$ xinput set-int-prop &quot;SynPS/2 Synaptics TouchPad&quot; &quot;Synaptics Two-Finger Pressure&quot; 32 50
moo@huiskuttaja:~$
</pre>
<p>以下参数比较适合华硕EeePC 1005ha:</p>
<pre class="brush: bash;">
width(W):8
pressure(Z):10
</pre>
<p>你可以用synclient -l来dump现在的设置。</p>
<p>以下是最终在登录时运行的脚本（参见<a href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/355071" target="_blank">Ubuntu HAL对Synaptics的支持有问题</a>）：</p>
<pre class="brush: bash;">
#!/bin/sh
#
# Use xinput --list-props &quot;SynPS/2 Synaptics TouchPad&quot; to extract data
#
# Set multi-touch emulation parameters
xinput set-int-prop &quot;SynPS/2 Synaptics TouchPad&quot; &quot;Synaptics Two-Finger Pressure&quot; 32 10
xinput set-int-prop &quot;SynPS/2 Synaptics TouchPad&quot; &quot;Synaptics Two-Finger Width&quot; 32 8
xinput set-int-prop &quot;SynPS/2 Synaptics TouchPad&quot; &quot;Two-Finger Scrolling&quot; 8 1
xinput set-int-prop &quot;SynPS/2 Synaptics TouchPad&quot; &quot;Synaptics Two-Finger Scrolling&quot; 8 1 1
# Disable edge scrolling
xinput set-int-prop &quot;SynPS/2 Synaptics TouchPad&quot; &quot;Synaptics Edge Scrolling&quot; 8 0 0 0
# This will make cursor not to jump if you have two fingers on the touchpad and you list one
# (which you usually do after two-finger scrolling)
xinput set-int-prop &quot;SynPS/2 Synaptics TouchPad&quot; &quot;Synaptics Jumpy Cursor Threshold&quot; 32 110
</pre>
<p>当你在双指滚动时，如果一只手指提前提出来，鼠标箭头会跳动。Synaptics的驱动好像没有相关设置可以用来过滤这样的问题事件。如果有朋友有解决方案，请务必留言。谢谢！</p>
<h2>其他资源</h2>
<ul>
<li><span style="background-color: #ffffff;"><a href="http://randomtruth.110mb.com/blog/index.php/2009/03/30/v10-of-linux-multi-touch-released/" target="_blank">Linux 多点触控</a>项目是一个收集Perl脚本的工程。这些脚本与多点事件有关。如果你想定制你的多点触控经验并且你有一些开发经验，这个地方可以帮助入门。</span></li>
<li><span style="background-color: #ffffff;"><a href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/422224" target="_blank">关于模拟多点触控的注意事项</a>（看最后的留言）</span></li>
<li><span style="background-color: #ffffff;"><a href="http://ubuntu-snippets.blogspot.com/2009/03/multi-touch-for-anyall-synaptics.html" target="_blank">诊断多点支持和HAL文件编辑</a></span></li>
<li><span style="background-color: #ffffff;"><a href="http://brainstorm.ubuntu.com/idea/3077/" target="_blank">在Ubuntu 头脑风暴上的有关idea</a> </span></li>
<li><span style="background-color: #ffffff;"><a href="http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/" target="_blank">Synaptics X11 驱动源代码</a>. <a href="http://web.telia.com/~u89404340/touchpad/index.html" target="_blank">Synaptics 驱动项目主页</a>. 看起来它背后没有一个核心人物，除了维护和来自分销商的大量补丁。</span></li>
</ul>
 <p><map name='google_ad_map_210_b72cec5cd1c1c856'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/210?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_210_b72cec5cd1c1c856' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=210&amp;url= http%3A%2F%2Fwww.imchao.net%2Flinux%2Fsetting-up-multi-touch-scrolling-for-ubuntu-9-10-karmic-koala-linux-on-asus-eee-1005ha-netbook.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.imchao.net/linux/setting-up-multi-touch-scrolling-for-ubuntu-9-10-karmic-koala-linux-on-asus-eee-1005ha-netbook.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>imchao在feedsky上的feed出问题了</title>
		<link>http://www.imchao.net/life/imchao-in-the-feed-on-the-problem-of-feedsky.html</link>
		<comments>http://www.imchao.net/life/imchao-in-the-feed-on-the-problem-of-feedsky.html#comments</comments>
		<pubDate>Thu, 27 Aug 2009 02:45:43 +0000</pubDate>
		<dc:creator>吼吼</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.imchao.net/?p=204</guid>
		<description><![CDATA[在@棒槌男同学的提醒下，吼吼发现本站托管在feedsky的feed很久没有更新了。不知何故，吼吼强制提交更新了几次，可是还是没有解决问题。 于是吼吼决定放弃feedsky了。feedsky上的feed30天后删除... ]]></description>
			<content:encoded><![CDATA[ <p>在<a href="https://twitter.com/bangchuinan" target="_blank">@棒槌男</a>同学的提醒下，吼吼发现本站托管在feedsky的feed很久没有更新了。不知何故，吼吼强制提交更新了几次，可是还是没有解决问题。</p>
<p>于是吼吼决定放弃feedsky了。feedsky上的feed30天后删除。请想继续关注本站的朋友们，把订阅器中的feed更新为http://www.imchao.net/feed</p>
<p>感谢大家的支持，再次感谢一下<a href="https://twitter.com/bangchuinan" target="_blank">@棒槌男</a>同学。</p>
 <p><map name='google_ad_map_204_b72cec5cd1c1c856'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/204?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_204_b72cec5cd1c1c856' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=204&amp;url= http%3A%2F%2Fwww.imchao.net%2Flife%2Fimchao-in-the-feed-on-the-problem-of-feedsky.html' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.imchao.net/life/imchao-in-the-feed-on-the-problem-of-feedsky.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
