<?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>易水博客 &#187; thinkpad</title>
	<atom:link href="http://easwy.com/blog/archives/tag/thinkpad/feed/" rel="self" type="application/rss+xml" />
	<link>http://easwy.com/blog</link>
	<description>关注Linux, Scala, Android, Java, 开源软件和嵌入式系统</description>
	<lastBuildDate>Tue, 31 Jan 2012 02:58:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>解决Thinkpad T400在Debian Linux下不能休眠/待机的问题</title>
		<link>http://easwy.com/blog/archives/thinkpad-t400-suspend-hibernate-problem-on-linux/</link>
		<comments>http://easwy.com/blog/archives/thinkpad-t400-suspend-hibernate-problem-on-linux/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 07:54:54 +0000</pubDate>
		<dc:creator>Easwy</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[thinkpad]]></category>

		<guid isPermaLink="false">http://easwy.com/blog/?p=989</guid>
		<description><![CDATA[ 在Thinkpad T400上安装了Debian Lenny后，发现电源管理似乎有点问题，系统不能正常的进入休眠/待机状态。当笔记本长时间处于Idle状态时，并不能进入待机或休眠状态，Gnome电源管理程序出现下面的提示：

Sleep Problem
Your computer failed to suspend/hibernate.
Check the help file for common problems.  

在Google上搜索了一下，其它Thinkpad T400的用户可以在Linux下正常待机或者休眠(Suspend/Hibernate)，看来应该是自己笔记本配置问题。 <div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post">
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/' rel='bookmark' title='在debian lenny上安装thinkpad t400无线驱动'>在debian lenny上安装thinkpad t400无线驱动</a></li>
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_audio_in_debian_lenny/' rel='bookmark' title='在Debian Lenny中配置Thinkpad T400的声卡'>在Debian Lenny中配置Thinkpad T400的声卡</a></li>
<li><a href='http://easwy.com/blog/archives/thinkpad_trackpoint_on_linux/' rel='bookmark' title='在Linux中使用thinkpad的小红点+中键'>在Linux中使用thinkpad的小红点+中键</a></li>
</div><div class="fixed"></div>]]></description>
			<content:encoded><![CDATA[<p>
    在<a class="link" href="http://easwy.com/blog/archives/debian-lenny-installation-on-thinkpad-t400/">Thinkpad T400上安装了Debian Lenny</a>后，发现电源管理似乎有点问题，系统不能正常的进入休眠/待机状态。当笔记本长时间处于Idle状态时，并不能进入待机或休眠状态，Gnome电源管理程序出现下面的提示：
  </p>
<pre class="programlisting">
Sleep Problem
Your computer failed to suspend/hibernate.
Check the help file for common problems.  </pre>
<p>
    在Google上搜索了一下，其它Thinkpad T400的用户可以在Linux下正常待机或者休眠(Suspend/Hibernate)，看来应该是自己笔记本配置问题。
  </p>
<p>    Linux上的电源管理由<a class="link" href="http://pm-utils.freedesktop.org/wiki/">pm-utils</a>实现，这个工具箱里包含了几个脚本:<span class="command"><strong>pm-hibernate</strong></span>、<span class="command"><strong>pm-suspend</strong></span>和<span class="command"><strong>pm-suspend-hybrid</strong></span>。这些脚本一般由窗口管理器Gnome或KDE，通过hald守护进程来调用。当然也可以直接调用这些脚本。<a class="link" href="http://easwy.com/blog/">Easwy</a>首先使用root用户执行<span class="command"><strong>pm-hibernate</strong></span>：
  </p>
<pre class="programlisting">
sudo pm-hibernate </pre>
<p>    执行完这个命令后，笔记本就将内存镜像保存到磁盘上，然后进入休眠模式。既然root用户能切换到休眠模式，那应该是Gnome的登录用户easwy不具备相应的权限。根据参考文档一中的说明，把用户<a class="link" href="http://easwy.com/blog/">easwy</a>加入<span class="emphasis"><em>powerdev</em></span>组中，现在在Gnome Power Manager中选择<span class="emphasis"><em>hibernate</em></span>就可以使计算机中进入休眠状态，不会出现上面的提示。
  </p>
<p>
    但新的问题又出现了，T400进入待机或休眠模式后无法正常恢复回来。现象是在恢复时，图形界面显示不完整，这时鼠标键盘都没有反应，过一段时间T400就重新加电重启了。
  </p>
<p>
    在网上搜了一下，好像这是由于xf86-video-intel驱动与芯片的兼容性问题(见参考文档二)造成的，使用下面的脚本可以解决这个问题：
  </p>
<pre class="programlisting">

#!/bin/sh
# Workaround for concurrency bug in xserver-xorg-video-intel 2:2.4.1-1ubuntu10.
# Save this as /etc/pm/sleep.d/00CPU 

. "/usr/lib/pm-utils/functions"

case "$1" in
	hibernate|suspend)
		for i in /sys/devices/system/cpu/cpu*/online ; do
			echo 0 &gt;$i
		done
		;;
	thaw|resume)
		sleep 10	# run with one core for 10 secs
		for i in /sys/devices/system/cpu/cpu*/online ; do
			echo 1 &gt;$i
		done
		;;
	*)
		;;
esac </pre>
<p>    <a class="link" href="http://easwy.com/blog/">Easwy</a>把上述脚本保存到<span class="emphasis"><em>/etc/pm/sleep.d/00CPU</em></span>，现在，Thinkpad T400可以正常待机/休眠/恢复了。
  </p>
<p>
    更多关于<a class="link" href="http://easwy.com/blog/archives/tag/thinkpad/">Linux上Thinkpad T400</a>的内容，请阅读<a class="link" href="http://easwy.com/blog/">Easwy的博客</a>上的其它文章。
  </p>
<p><span class="bold"><strong>[ 参考文档 ]</strong></span></p>
<div class="itemizedlist">
<ul type="disc">
<li><a class="link" href="http://old.nabble.com/Help-with-suspend-hibernate-in-Gnome-Power-Manager-td15181122.html">Help with suspend/hibernate in Gnome Power Manager</a></li>
<li><a class="link" href="http://wiki.archlinux.org/index.php/Lenovo_ThinkPad_T400#SUSPEND-RESUME">SUSPEND-RESUME</a></li>
</ul>
</div>
<div class="posturl">
<p><span class="bold"><strong>原创文章，请阅读页脚的<a href="#license">许可方式</a>，转载请注明：</strong></span>转载自<a class="link" href="http://easwy.com/blog/" target="_top">易水博客</a> [ <a class="link" href="http://easwy.com/blog/" target="_top">http://easwy.com/blog/</a> ]</p>
<p><span class="bold"><strong>本文链接地址:</strong></span> <a class="link" href="http://easwy.com/blog/archives/thinkpad-t400-suspend-hibernate-problem-on-linux/" target="_top">http://easwy.com/blog/archives/thinkpad-t400-suspend-hibernate-problem-on-linux/</a></p>
</div>
<p style="margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%; font-style: italic">文章的脚注信息由WordPress的<a href="http://easwy.com/blog/wordpress/wp-posturl/" style="color: #8888FF; text-decoration: underline;">wp-posturl插件</a>自动生成</p>
<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post">
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/' rel='bookmark' title='在debian lenny上安装thinkpad t400无线驱动'>在debian lenny上安装thinkpad t400无线驱动</a></li>
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_audio_in_debian_lenny/' rel='bookmark' title='在Debian Lenny中配置Thinkpad T400的声卡'>在Debian Lenny中配置Thinkpad T400的声卡</a></li>
<li><a href='http://easwy.com/blog/archives/thinkpad_trackpoint_on_linux/' rel='bookmark' title='在Linux中使用thinkpad的小红点+中键'>在Linux中使用thinkpad的小红点+中键</a></li>
</div><div class="fixed"></div>]]></content:encoded>
			<wfw:commentRss>http://easwy.com/blog/archives/thinkpad-t400-suspend-hibernate-problem-on-linux/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>在Debian Lenny中配置Thinkpad T400的声卡</title>
		<link>http://easwy.com/blog/archives/thinkpad_t400_audio_in_debian_lenny/</link>
		<comments>http://easwy.com/blog/archives/thinkpad_t400_audio_in_debian_lenny/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 01:23:00 +0000</pubDate>
		<dc:creator>Easwy</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[thinkpad]]></category>

		<guid isPermaLink="false">http://easwy.com/blog/?p=747</guid>
		<description><![CDATA[上一篇文章中我介绍了在Lenny中如何配置中文，这之后，Debian Linux环境基本满足我的需求了。直到有一天，需要在Linux中和一个朋友Skype通话，这时才发现我的声卡居然没有声音。
Thinkpad T400 AA1中所使用的是Intel内置的声卡，从lspci命令的输出中可以看到，此声卡已经被发现了...<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post">
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/' rel='bookmark' title='在debian lenny上安装thinkpad t400无线驱动'>在debian lenny上安装thinkpad t400无线驱动</a></li>
<li><a href='http://easwy.com/blog/archives/install_apache_php_mysql_wordpress_on_debian_lenny/' rel='bookmark' title='在Debian Lenny上安装Apache2，PHP5，MySQL5, WordPress&#8230;'>在Debian Lenny上安装Apache2，PHP5，MySQL5, WordPress&#8230;</a></li>
<li><a href='http://easwy.com/blog/archives/chinese_in_debian_lenny/' rel='bookmark' title='在Debian Lenny中配置中文'>在Debian Lenny中配置中文</a></li>
</div><div class="fixed"></div>]]></description>
			<content:encoded><![CDATA[<p>
    上一篇文章中我介绍了在Lenny中如何<a class="ulink" href="http://easwy.com/blog/archives/chinese_in_debian_lenny/" target="_top">配置中文</a>，这之后，Debian Linux环境基本满足我的需求了。直到前几天，需要在Linux中和一个朋友Skype通话，这时才发现我的声卡居然没有声音。
  </p>
<p>
    我在工作时不喜欢听着音乐，因为会干扰思路，所以，在准备skype之前我从未检查过声卡。现在发现声卡出现问题了，才想起要配置一下。
  </p>
<p>
    Thinkpad T400 AA1中所使用的是Intel内置的声卡，从<span class="command"><strong>lspci</strong></span>命令的输出中可以看到，此声卡已经被发现了：
  </p>
<pre class="screen">
# lspci | grep Audio
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
  </pre>
<p>
    再用<span class="command"><strong>lsmod</strong></span>查看一下声卡的驱动：
  </p>
<pre class="screen">
# lsmod | grep snd
snd_hda_intel         324248  4
snd_pcm_oss            32800  0
snd_mixer_oss          12320  1 snd_pcm_oss
snd_pcm                62596  3 snd_hda_intel,snd_pcm_oss
snd_seq_dummy           2660  0
snd_seq_oss            24992  0
snd_seq_midi            5728  0
snd_rawmidi            18496  1 snd_seq_midi
snd_seq_midi_event      6432  2 snd_seq_oss,snd_seq_midi
snd_seq                41456  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer              17800  3 snd_pcm,snd_seq
snd_seq_device          6380  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
snd                    45604  15 snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore               6368  1 snd
snd_page_alloc          7816  2 snd_hda_intel,snd_pcm
  </pre>
<p>
    我们看到，该声卡的驱动<span class="emphasis"><em>snd_hda_intel</em></span>也装好了，那为什么没有声音呢？
  </p>
<p>
    在网上搜索了一下，找到这篇文章：<a class="ulink" href="http://www.klabs.be/~fpiat/linux/debian/Lenny_on_Thinkpad_T61.html" target="_top">Debian Lenny on Thinkpad T61</a>，它提出了一个解决声卡没声音的方法，我按照这种方法操作了一下：
  </p>
<p>
    首先执行下面两条命令：
  </p>
<pre class="programlisting">
apt-get remove --purge  alsa-modules-$(uname -r)
invoke-rc.d alsa-utils restart </pre>
<p>
    然后打开音量控制(volume control)，转到Switch页，我这里选择了”IEC958 Default PCM”，然后转到播放页(Playback)，确定PCM没有被静音。作者说这样设置一下就可以了，不过我的计算机还不行。
  </p>
<p>
    对这种情况，作者也给出了解决方法，先关闭掉使用声卡的程序，然后用CTRL-ALT-F1切换到终端上，运行<span class="command"><strong>alsaconf</strong></span>，重新配置一下声卡。配好后，再按照上面的步骤配置一下音量控制。我使用<span class="command"><strong>alsaconf</strong></span>重新配置后，就可以听到声音了。
  </p>
<p>
    现在无论是开机登录的声音，播放MP3还是使用skype,都没有问题。不过在用KsCD听CD时，却无论如何也没有声音。
  </p>
<p>
    再次启用google，搜到了<a class="ulink" href="http://www.linuxforums.org/forum/debian-linux-help/75894-sound-problems-kde-3-5-5-a.html" target="_top">这个贴子</a>，按照帖子中的步骤：打开Extras &#8211;&gt; Configure KsCD &#8211;&gt; CD Player，勾上”Use direct digital playback”，然后在”Select audio backend”选择中”arts”，这样设置后，我的KsCD也可以正常工作了。
  </p>
<p>
    声卡好了以后，在使用rxvt时，如果出现错误，总是”滴滴”的响，很是麻烦。我在~/.bashrc中添加了<span class="command"><strong>xset b off</strong></span>，这样就不用听到恼人的声音了。另外，在/etc/inputrc文件中加上<span class="command"><strong>set bell-style none</strong></span>，关闭console下的声音。
  </p>
<p>
    在vim中的错误提示音早就在vimrc中关掉了，前几天刚好SamPeng问<a class="ulink" href="http://easwy.com/blog/about/#comment-209" target="_top">这个问题</a>，也在这篇文章回答一下。方法是在你的vimrc中，加入以下两行：
  </p>
<pre class="programlisting">
set noerrorbells
set visualbell t_vb= </pre>
<p>
    如果想关掉gvim中的”滴滴”提示音，则需要在gvimrc中加入<span class="command"><strong>set visualbell t_vb=</strong></span>，这是因为gvim在启动时，会把<span class="emphasis"><em>t_vb</em></span>的值恢复为缺省值，所以要重新设置一下。
  </p>
<div class="posturl">
<p><span class="bold"><strong>原创文章，请阅读页脚的<a href="#license">许可方式</a>，转载请注明：</strong></span>转载自<a class="link" href="http://easwy.com/blog/" target="_top">易水博客</a> [ <a class="link" href="http://easwy.com/blog/" target="_top">http://easwy.com/blog/</a> ]</p>
<p><span class="bold"><strong>本文链接地址:</strong></span> <a class="link" href="http://easwy.com/blog/archives/thinkpad_t400_audio_in_debian_lenny/" target="_top">http://easwy.com/blog/archives/thinkpad_t400_audio_in_debian_lenny/</a></p>
</div>
<p style="margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%; font-style: italic">文章的脚注信息由WordPress的<a href="http://easwy.com/blog/wordpress/wp-posturl/" style="color: #8888FF; text-decoration: underline;">wp-posturl插件</a>自动生成</p>
<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post">
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/' rel='bookmark' title='在debian lenny上安装thinkpad t400无线驱动'>在debian lenny上安装thinkpad t400无线驱动</a></li>
<li><a href='http://easwy.com/blog/archives/install_apache_php_mysql_wordpress_on_debian_lenny/' rel='bookmark' title='在Debian Lenny上安装Apache2，PHP5，MySQL5, WordPress&#8230;'>在Debian Lenny上安装Apache2，PHP5，MySQL5, WordPress&#8230;</a></li>
<li><a href='http://easwy.com/blog/archives/chinese_in_debian_lenny/' rel='bookmark' title='在Debian Lenny中配置中文'>在Debian Lenny中配置中文</a></li>
</div><div class="fixed"></div>]]></content:encoded>
			<wfw:commentRss>http://easwy.com/blog/archives/thinkpad_t400_audio_in_debian_lenny/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>在Debian Lenny中配置中文</title>
		<link>http://easwy.com/blog/archives/chinese_in_debian_lenny/</link>
		<comments>http://easwy.com/blog/archives/chinese_in_debian_lenny/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 02:04:10 +0000</pubDate>
		<dc:creator>Easwy</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[thinkpad]]></category>

		<guid isPermaLink="false">http://easwy.com/blog/?p=741</guid>
		<description><![CDATA[红点驱动装好以后，就开始对中文进行配置。我配置中文按照如下步骤：
- 产生语系 (locale)
- 配置中文字体
- 配置中文输入法
- 安装Windows字体(可选)<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post">
<li><a href='http://easwy.com/blog/archives/render_docbook_xml_to_pdf_by_apache_fop/' rel='bookmark' title='使用Apache FOP将Docbook文档转换成PDF'>使用Apache FOP将Docbook文档转换成PDF</a></li>
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/' rel='bookmark' title='在debian lenny上安装thinkpad t400无线驱动'>在debian lenny上安装thinkpad t400无线驱动</a></li>
<li><a href='http://easwy.com/blog/archives/vim_command_parameter_separator/' rel='bookmark' title='关于vi/vim中:s命令的参数分隔符'>关于vi/vim中:s命令的参数分隔符</a></li>
</div><div class="fixed"></div>]]></description>
			<content:encoded><![CDATA[<p>
    <a class="ulink" href="http://easwy.com/blog/archives/thinkpad_trackpoint_on_linux/" target="_top">Thinkpad的红点驱动</a>装好以后，就开始对中文进行配置。我配置中文按照如下步骤。
  </p>
<div class="section" lang="zh-CN">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="id3845224"></a>产生语系 (locale) </h2>
</div>
</div>
</div>
<p>
      使用英文界面安装完后，系统所使用的locale是en_US.utf8，我们需要生成中文的locale。
    </p>
<p>
      如果没有安装locales，首先需要安装locales程序，Debian现在推荐使用aptitude来安装程序，它能比apt-get更好的解决软件包之间的冲突。
    </p>
<pre class="programlisting">
# aptitude install locales </pre>
<p>
      安装完locales后，就重新选择Debian所使用的语系，命令是：
    </p>
<pre class="programlisting">
# dpkg-reconfigure locales </pre>
<p>
      我选择了下面的locale：
    </p>
<div class="itemizedlist">
<ul type="disc">
<li>en_US.ISO-8859-1</li>
<li>en_US.UTF-8</li>
<li>zh_CN.GB2312</li>
<li>zh_CN.GB18030</li>
<li>zh_CN.UTF-8</li>
<li>zh_CN.GBK</li>
<li>zh_TW.BIG5</li>
<li>zh_TW.UTF-8</li>
</ul>
</div>
<p>      不过我的缺省locale依旧设置为en_US.utf8，因为我更习惯于使用英文界面。在Linux中，即使使用英文locale，也能够很好的支持中文。
    </p>
<p>
      使用<span class="command"><strong>locale -a</strong></span>命令查看一下Lenny中的语系，在我的计算机上输出如下：
    </p>
<pre class="screen">
      # locale -a
      C
      en_US
      en_US.iso88591
      en_US.utf8
      POSIX
      zh_CN
      zh_CN.gb18030
      zh_CN.gb2312
      zh_CN.gbk
      zh_CN.utf8
      zh_TW
      zh_TW.big5
      zh_TW.utf8
    </pre>
<p>
      配置好语系(locale)后，最好重新登录一次。
    </p>
</div>
<div class="section" lang="zh-CN">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="id3845294"></a>配置中文字体</h2>
</div>
</div>
</div>
<p>
      接下来需要安装一下中文字体。在系统安装时，我已经选择了简体中文桌面(Simplified Chinese Desktop)和简体中文环境(Simplified Chinese Environment)，这里面就包含了一些中文字体和中文应用程序，比如中文输入法。
    </p>
<p>      在我的系统里安装了下面这些中英文字体包，主要参考了<a class="ulink" href="http://edyfox.codecarver.org/html/debian_testing_chinese.html" target="_top">滇狐</a>的字体配置：
    </p>
<div class="itemizedlist">
<ul type="disc">
<li>
        ttf-arphic-ukai
      </li>
<li>
        ttf-arphic-uming
      </li>
<li>
        xfonts-wqy
      </li>
<li>
        ttf-bitstream-vera
      </li>
<li>
        ttf-mscorefonts-installer
      </li>
</ul>
</div>
<p>
      上面的mscorefonts是Sourceforge上的一个项目，这是微软提供的Windows上的核心字体，允许用户下载使用。Debian Lenny提供了ttf-mscorefonts-installer这样一个包，这个包在安装时会自动到Sourceforge上下载mscorefont。因为很多Windows程序在mscorefont下显示比较美观，所以我们也安装这一字体。
    </p>
<p>
      安装了上述字体以后，再把滇狐提供的.font.conf(在上面滇狐的网页中下载)放在自己的HOME目录下。退出重新登录进来，Lenny的字体已经非常漂亮了!
    </p>
<p>
      下面贴两张图，一张是Debian Lenny刚刚安装完简体中文桌面和简体中文环境，未进行字体前的抓图，另外一张则是按上面的步骤进行了字体配置后的抓图，做一个比较。
    </p>
<div class="informalfigure">
<div class="mediaobject" align="center"><img src="http://easwy.com/blog/uploads/2009/04/iceweasel_before_cn_font-300x176.png" align="middle"></div>
<div class="caption" align="center"><a class="ulink" href="http://easwy.com/blog/uploads/2009/04/iceweasel_before_cn_font.png" target="_top">点击查看大图</a></div>
</div>
<div class="informalfigure">
<div class="mediaobject" align="center"><img src="http://easwy.com/blog/uploads/2009/04/iceweasel_after_font-300x187.png" align="middle"></div>
<div class="caption" align="center"><a class="ulink" href="http://easwy.com/blog/uploads/2009/04/iceweasel_after_font.png" target="_top">点击查看大图</a></div>
</div>
</div>
<div class="section" lang="zh-CN">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="id3845679"></a>配置中文输入法</h2>
</div>
</div>
</div>
<p>
      Linux下中文输入法目前最常用的有两种，一个是scim，另外一个是fcitx。我更习惯于使用fcitx，所以这里以fcitx为例进行介绍。
    </p>
<p>      在安装简体中文桌面时，其实已经安装了fcitx输入法，接下来配置一下就可以了。从理论上讲，使用im-switch应该可以很方便的在各个中文输入法间进行切换，可是我尝试了几次，即使使用<span class="command"><strong>im-switch -c</strong></span>把输入法切换到fcitx，还是不能启动fcitx，不知道是不是和我把LANG环境变量设置成en_US.UTF-8有关。没办法，还是按照网上流传的方法，编辑一个名为95xinput的文件，内容如下：
    </p>
<pre class="programlisting">
# easwy, 2009/03/15
export LANG="en_US.UTF-8"
export LC_CTYPE="zh_CN.UTF-8"
export XMODIFIERS="@im=fcitx"
fcitx &amp; </pre>
<p>
    在这个文件里，我把我的LANG设置为en_US.UTF-8，但把LC_CTYPE设置成zh_CN.UTF-8，这样在英文环境中也可以输入中文。接下来就是设置输入法，并启动fcitx。
  </p>
<p>
    把这个文件放到/etc/X11/Xsession.d/目录即可，在X启动时/etcX11/Xsession脚本会自动执行此文件，启动fcitx输入法。
  </p>
</div>
<div class="section" lang="zh-CN">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="id3845720"></a>安装Windows字体(可选)</h2>
</div>
</div>
</div>
<p>
      如果想在Linux里使用windows的字体,可以以root身份按如下步骤操作:
    </p>
<pre class="programlisting">

mount -t ntfs /dev/sda1 /mnt
mkdir -p /usr/local/share/fonts/msfonts
cp /mnt/WINDOWS/Fonts/sim* /usr/local/share/fonts/msfonts/
chmod a+r /usr/local/share/fonts/msfonts/*
fc-cache /usr/local/share/fonts/msfonts/ </pre>
<p>
    上面的/dev/sda1是我的windows分区，你可以用<span class="command"><strong>fdisk -l</strong></span>查看一下你的windows分区是哪一个。因为windows分区一般都使用NTFS格式，所以在mount时要加上<span class="emphasis"><em>-t ntfs</em></span>。上面的命令只拷贝了和简体中文相关的字体，我觉得Debian Linux下的英文已经比较好看了。
  </p>
<p>
    安装完后，用<span class="command"><strong>fc-list | grep -i sun</strong></span>查看一下，是不是宋体已经安装成功，在我的计算机上输出如下：
  </p>
<pre class="screen">
新宋体,NSimSun:style=Regular
宋体\-PUA,SimSun\-PUA:style=Regular
宋体,SimSun:style=Regular
文鼎ＰＬ简报宋,AR PL SungtiL GB:style=Regular
  </pre>
<p>
    在滇狐的.font.conf中已经加入了对宋体和新宋体的支持，所以不需再进行配置就可以使用。
  </p>
<p>    我在安装完windows字体后，在启动firefox时会出现下面的错误提示：
  </p>
<pre class="programlisting">
......
(firefox-bin:4411): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is 'SimSun Bold 18'
(firefox-bin:4411): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is '宋体 Bold 10.771484375'
(firefox-bin:4411): Pango-WARNING **: failed to create cairo scaled font, expect ugly output. the offending font is '宋体 Bold 12'
(firefox-bin:4411): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='BasicEngineFc', font='宋体 Bold 12', text='Chinese ('
(firefox-bin:4411): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='BasicEngineFc', font='宋体 Bold 10.771484375', text=' '
......  </pre>
<p>
    这是由于字体文件的权限不正确，后来用<span class="command"><strong>chmod a+r /usr/local/share/fonts/msfonts/*</strong></span>为所有用户增加读权限后，就正常了。
  </p>
<p>
    如果你还是出现上面的错误，可以试着执行一遍以下几条命令：
  </p>
<pre class="programlisting">
dpkg-reconfigure libcairo2 libpango1.0-common
fc-cache -fs
update-pangox-aliases </pre>
</div>
<div class="section" lang="zh-CN">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="id3845776"></a>参考文档</h2>
</div>
</div>
</div>
<div class="itemizedlist">
<ul type="disc">
<li><a class="ulink" href="http://www.debsir.org/main/?q=node/85" target="_top">Debian中文桌面的快速构建</a></li>
<li><a class="ulink" href="http://211.100.7.181/~liling/debian-pretty.html" target="_top">Linux/美化及中文化</a>，原文似乎已经打不开，可以看<a class="ulink" href="http://zu.meltonfoundation.org/home/xg_liu2/public_html/wiki/index.php?title=Linux/%E7%BE%8E%E5%8C%96%E5%8F%8A%E4%B8%AD%E6%96%87%E5%8C%96" target="_top">这里的转载</a></li>
<li><a class="ulink" href="http://edyfox.codecarver.org/html/debian_testing_chinese.html" target="_top">简单搞定debian下的字体</a>,原文经常不可访问,可以看<a class="ulink" href="http://blog.chinaunix.net/u1/51156/showart_407719.html" target="_top">这里的转载</a></li>
<li><a class="ulink" href="http://www.fcitx.org/main/?q=node/37" target="_top">fcitx配置文件</a></li>
</ul>
</div>
</div>
<div class="posturl">
<p><span class="bold"><strong>原创文章，请阅读页脚的<a href="#license">许可方式</a>，转载请注明：</strong></span>转载自<a class="link" href="http://easwy.com/blog/" target="_top">易水博客</a> [ <a class="link" href="http://easwy.com/blog/" target="_top">http://easwy.com/blog/</a> ]</p>
<p><span class="bold"><strong>本文链接地址:</strong></span> <a class="link" href="http://easwy.com/blog/archives/chinese_in_debian_lenny/" target="_top">http://easwy.com/blog/archives/chinese_in_debian_lenny/</a></p>
</div>
<p style="margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%; font-style: italic">文章的脚注信息由WordPress的<a href="http://easwy.com/blog/wordpress/wp-posturl/" style="color: #8888FF; text-decoration: underline;">wp-posturl插件</a>自动生成</p>
<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post">
<li><a href='http://easwy.com/blog/archives/render_docbook_xml_to_pdf_by_apache_fop/' rel='bookmark' title='使用Apache FOP将Docbook文档转换成PDF'>使用Apache FOP将Docbook文档转换成PDF</a></li>
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/' rel='bookmark' title='在debian lenny上安装thinkpad t400无线驱动'>在debian lenny上安装thinkpad t400无线驱动</a></li>
<li><a href='http://easwy.com/blog/archives/vim_command_parameter_separator/' rel='bookmark' title='关于vi/vim中:s命令的参数分隔符'>关于vi/vim中:s命令的参数分隔符</a></li>
</div><div class="fixed"></div>]]></content:encoded>
			<wfw:commentRss>http://easwy.com/blog/archives/chinese_in_debian_lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在Linux中使用thinkpad的小红点+中键</title>
		<link>http://easwy.com/blog/archives/thinkpad_trackpoint_on_linux/</link>
		<comments>http://easwy.com/blog/archives/thinkpad_trackpoint_on_linux/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 14:40:31 +0000</pubDate>
		<dc:creator>Easwy</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[thinkpad]]></category>

		<guid isPermaLink="false">http://easwy.com/blog/?p=732</guid>
		<description><![CDATA[ 安装完无线驱动以后，就琢磨怎么在Debian Lenny中把Thinkpad的小红点用起来。
Thinkpad的小红点应该说是小黑的的特色之一了，用的熟了工作效率不比用鼠标差。用其它的本本我通常是用触摸板，感觉不是很方便，尤其是在上下滚屏时，要用两只手配合。而小黑的小红点+中键，只用一只手就能方便的上下左右滚屏，非常方便。 <div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post">
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/' rel='bookmark' title='在debian lenny上安装thinkpad t400无线驱动'>在debian lenny上安装thinkpad t400无线驱动</a></li>
<li><a href='http://easwy.com/blog/archives/solve-fragment-packets-loss-of-ping/' rel='bookmark' title='Linux使用笔记: 解决Xen虚拟机中VLAN接口不能ping大包的问题'>Linux使用笔记: 解决Xen虚拟机中VLAN接口不能ping大包的问题</a></li>
<li><a href='http://easwy.com/blog/archives/use_http_proxy_for_git/' rel='bookmark' title='Linux使用笔记: 使用代理服务器访问git版本库'>Linux使用笔记: 使用代理服务器访问git版本库</a></li>
</div><div class="fixed"></div>]]></description>
			<content:encoded><![CDATA[<p>
    <a class="ulink" href="http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/" target="_top">安装完无线驱动</a>以后，就琢磨怎么在Debian Lenny中把Thinkpad的小红点用起来。
  </p>
<p>
    Thinkpad的小红点应该说是小黑的的特色之一了，用的熟了工作效率不比用鼠标差。用其它的本本我通常是用触摸板，感觉不是很方便，尤其是在上下滚屏时，要用两只手配合。而小黑的小红点+中键，只用一只手就能方便的上下左右滚屏，非常方便。
  </p>
<p>
    从设计来看，黑色键盘中间一个红色的小点，最是吸引人的目光。记得我的小黑刚搬回来的时候，我女儿就盯上了这个红色的小点，一直想用手指去摸去抠，被我制止了。我装完系统就关机出去了，第二天回家打开小黑一看，怎么小红点没了？一想，肯定是小家伙干的！最后，在垃圾桶里找回了心爱的小红点。看来是小家伙不小心把它抠了下来，又不会装回去，就扔到垃圾桶去了。后来我就教她怎么用这个小红点控制光标的方向，这以后，她就没再干过抠红点的事。这算是和小红点有关的一件趣事吧。
  </p>
<p>
    小红点的中键按下时，再控制红点的方向时，就能够实现八个方向的滚屏。下图是我在<a class="ulink" href="http://blog.10ninox.com/2007/12/10/whats-so-good-about-trackpoint/" target="_top">这个网站</a>看到的，很形象的表示了中键的用法(感谢这副图的作者)。
  </p>
<div class="informalfigure">
<div class="mediaobject" align="center"><img src="http://easwy.com/blog/uploads/2009/04/thinkpad_trackpoint.gif" align="middle"></div>
</div>
<p>    在windows里，联想OEM的windows已经自动支持小红点的中键了。，但在Linux里还需要配置一下。
  </p>
<p>
    我们先执行命令<span class="command"><strong>dmidecode -t 21</strong></span>，这个命令会输出小黑内置的鼠标设备的信息，我们看到输出如下：
  </p>
<pre class="screen">
# dmidecode 2.9
SMBIOS 2.4 present.

Handle 0x0032, DMI type 21, 7 bytes
Built-in Pointing Device
	Type: Track Point
	Interface: PS/2
	Buttons: 3

Handle 0x0033, DMI type 21, 7 bytes
Built-in Pointing Device
	Type: Touch Pad
	Interface: PS/2
	Buttons: 0
  </pre>
<p>
    Linux已经自动识别出两个内置鼠标设备：Track Point (小红点)和Touch Pad (触摸板)。实际上小红点和触摸板都已经可以使用，只是小红点的中键在Linux缺省未打开，需要改一下配置。
  </p>
<p>
    配置很简单，把文章<a class="ulink" href="http://wiki.debian.org/InstallingDebianOn/Thinkpad/Trackpoint" target="_top">Trackpoint on Lenny</a>里的这段话加到你的xorg.conf中就可以了。打开/etc/X11/xorg.conf，在此文件中找到”Configured Mouse”这一节，然后加下下面三行：
  </p>
<pre class="programlisting">

Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "mouse"

        # 加入下面三行
        Option          "EmulateWheel"          "true"
        Option          "EmulateWheelTimeOut"   "200"
        Option          "EmulateWheelButton"    "2"
EndSection </pre>
<p>
    重新登录X window，再试试小红点+中键，是不是好用了？
  </p>
<div class="posturl">
<p><span class="bold"><strong>原创文章，请阅读页脚的<a href="#license">许可方式</a>，转载请注明：</strong></span>转载自<a class="link" href="http://easwy.com/blog/" target="_top">易水博客</a> [ <a class="link" href="http://easwy.com/blog/" target="_top">http://easwy.com/blog/</a> ]</p>
<p><span class="bold"><strong>本文链接地址:</strong></span> <a class="link" href="http://easwy.com/blog/archives/thinkpad_trackpoint_on_linux/" target="_top">http://easwy.com/blog/archives/thinkpad_trackpoint_on_linux/</a></p>
</div>
<p style="margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%; font-style: italic">文章的脚注信息由WordPress的<a href="http://easwy.com/blog/wordpress/wp-posturl/" style="color: #8888FF; text-decoration: underline;">wp-posturl插件</a>自动生成</p>
<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post">
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/' rel='bookmark' title='在debian lenny上安装thinkpad t400无线驱动'>在debian lenny上安装thinkpad t400无线驱动</a></li>
<li><a href='http://easwy.com/blog/archives/solve-fragment-packets-loss-of-ping/' rel='bookmark' title='Linux使用笔记: 解决Xen虚拟机中VLAN接口不能ping大包的问题'>Linux使用笔记: 解决Xen虚拟机中VLAN接口不能ping大包的问题</a></li>
<li><a href='http://easwy.com/blog/archives/use_http_proxy_for_git/' rel='bookmark' title='Linux使用笔记: 使用代理服务器访问git版本库'>Linux使用笔记: 使用代理服务器访问git版本库</a></li>
</div><div class="fixed"></div>]]></content:encoded>
			<wfw:commentRss>http://easwy.com/blog/archives/thinkpad_trackpoint_on_linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在debian lenny上安装thinkpad t400无线驱动</title>
		<link>http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/</link>
		<comments>http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 15:27:44 +0000</pubDate>
		<dc:creator>Easwy</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[thinkpad]]></category>

		<guid isPermaLink="false">http://easwy.com/blog/?p=724</guid>
		<description><![CDATA[登录lenny后，使用/sbin/ifconfig看到已经存在一个名为wlan0的无线网卡。既然无线网卡已经发现，驱动也已经装好，那么只需要配置一下应该就可以用了。于是打开文件/etc/network/interface，在这个文件里增加了无线网卡的配置...<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post">
<li><a href='http://easwy.com/blog/archives/chinese_in_debian_lenny/' rel='bookmark' title='在Debian Lenny中配置中文'>在Debian Lenny中配置中文</a></li>
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_audio_in_debian_lenny/' rel='bookmark' title='在Debian Lenny中配置Thinkpad T400的声卡'>在Debian Lenny中配置Thinkpad T400的声卡</a></li>
<li><a href='http://easwy.com/blog/archives/subversion-configuration-in-debian-etch/' rel='bookmark' title='在debian etch中配置subversion版本管理'>在debian etch中配置subversion版本管理</a></li>
</div><div class="fixed"></div>]]></description>
			<content:encoded><![CDATA[<p>
    <a href="http://easwy.com/blog/archives/debian-lenny-installation-on-thinkpad-t400/">安装完debian lenny</a>后，常用的设备驱动都已经安装好，做一些日常应用已经没什么问题。接下来，我就开始配置无线网卡的驱动。
  </p>
<p>
    首先说一下我所用的无线路由器的配置。我的无线路由器是Linksys的WRT54G V4.0，无线网络名设置为easwy，使用WPA2 Person加密认证，出于安全的考虑，不广播SSID，并且只允许特定的MAC地址无线接入。
  </p>
<p>
    登录lenny后，使用<span class="command"><strong>/sbin/ifconfig</strong></span>看到已经存在一个名为wlan0的无线网卡，心中一阵暗喜，暗道Linux进步果然神速，对硬件的支持已经做的这么好。没想到正是这一时的大意，让我费了诸多周折。
  </p>
<p>
    既然无线网卡已经发现，驱动也已经装好，那么只需要配置一下应该就可以用了。于是打开文件<span class="emphasis"><em>/etc/network/interface</em></span>，在这个文件里增加了无线网卡的配置：
  </p>
<pre class="programlisting">

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

# The wireless interface
auto wlan0
iface wlan0 inet dhcp
	wpa-ssid "easwy"
	wpa-psk "xxxxxxxx"
	wpa-ap-scan 1
	wpa-scan-ssid 1 </pre>
<p>
    简单解释一下wlan0的配置：
  </p>
<div class="itemizedlist">
<ul type="disc">
<li><span class="command"><strong>auto wlan0</strong></span>的意思是wlan0接口在系统启动时自动启动。
    </li>
<li><span class="command"><strong>iface wlan0 inet dhcp</strong></span>的意思是这个接口使用DHCP来获取IP地址
    </li>
<li><span class="command"><strong>wpa-ssid</strong></span>用来配置无线网络的SSID
    </li>
<li><span class="command"><strong>wpa-psk</strong></span>配置连接easwy无线网络的密码
    </li>
<li><span class="command"><strong>wpa-ap-scan 1</strong></span>和<span class="command"><strong>wpa-scan-ssid 1</strong></span>主要用来扫描不广播SSID的无线接入点。因为我的无线路由器不广播SSID，所以加了这两条配置。
    </li>
</ul>
</div>
<p>    这样配置好后，使用<span class="command"><strong>/sbin/ifdown wlan0</strong></span>关闭wlan0网卡，然后再重新启用<span class="command"><strong>/sbin/ifup wlan0</strong></span>，发现无法获得IP地址，输出如下：
  </p>
<pre class="screen">
    run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
    Internet Systems Consortium DHCP Client V3.1.1
    Copyright 2004-2008 Internet Systems Consortium.
    All rights reserved.
    For info, please visit http://www.isc.org/sw/dhcp/

    wmaster0: unknown hardware address type 801
    wmaster0: unknown hardware address type 801
    Listening on LPF/wlan0/00:22:69:68:8b:86
    Sending on   LPF/wlan0/00:22:69:68:8b:86
    Sending on   Socket/fallback
    DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
    DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
    DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
    DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
    DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 17
    No DHCPOFFERS received.
    No working leases in persistent database - sleeping.
    --- in /var/wpa_supplicant.wlan0.log
    1235814861.502506: Cancelling authentication timeout
    1235814861.502518: WEXT: Operstate: linkmode=0, operstate=6
  </pre>
<p>
    这时我还没怀疑到驱动的问题，还以为是自己配置的问题，于是开始进行各种检查。
  </p>
<p>
    首先查看一下T400 AA1所用的无线网卡芯片：
  </p>
<pre class="screen">
    # lspci -nn | grep Ethernet
    00:19.0 Ethernet controller [0200]: Intel Corporation 82567LM Gigabit Network Connection [8086:10f5] (rev 03)
    03:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter [168c:001c] (rev 01)
  </pre>
<p>    从这里可以看出，我的无线网卡使用的是Atheros的AR242x系列芯片(具体型号是AR2425)。使用<span class="command"><strong>lsmod</strong></span>命令查看了一下网卡所使用的驱动是ath5k。在网上搜索了一下，似乎ath5k驱动可以驱动这个芯片，接下来又用<span class="command"><strong>/sbin/iwconfig</strong></span>查看了无线网卡的配置，似乎也没什么问题。
  </p>
<p>
    这样折腾了很久之后，开始怀疑是不是网卡驱动有问题？在debian wiki上搜索了一下，发现MadWifi是用的比较多的Atheros芯片驱动，抱着试试看的态度，尝试安装MadWifi驱动。
  </p>
<p>
    按照文章<a class="ulink" href="http://wiki.debian.org/WiFi/ath_pci" target="_top">Atheros AR5xxx devices (MadWifi)</a>的步骤，首先将下面的源加入到<span class="emphasis"><em>/etc/apt/sources.list</em></span>文件中：
  </p>
<pre class="programlisting">

# Debian Lenny/5.0
deb http://ftp.us.debian.org/debian lenny main contrib non-free </pre>
<p>
    接下来更新源中的安装包列表，并且下载module-assistant和wireless-tools安装包：
  </p>
<pre class="programlisting">
aptitude update
aptitude install module-assistant wireless-tools </pre>
<p>
    编译安装madwifi-modules-*包：
  </p>
<pre class="programlisting">
m-a prepare
m-a a-i madwifi </pre>
<p>
    卸载athtk内核模块，然后加载atp_pci内核模块：
  </p>
<pre class="programlisting">
modprobe -r ath5k
modprobe ath_pci </pre>
<p>    这样配置之后，再用<span class="command"><strong>/sbin/iwconfig</strong></span>命令查看一下无线网卡的状态，正常。
  </p>
<p>
    修改<span class="emphasis"><em>/etc/network/interface</em></span>文件，把上面文件中的wlan0改为ath0，因为MadWifi驱动使用的网卡名称是ath0。这样修改后，使用<span class="command"><strong>/sbin/ifup ath0</strong></span>，哈哈，无线网卡可以正常工作了！
  </p>
<p>
    奉上<span class="command"><strong>/sbin/iwconfig</strong></span>命令和<span class="command"><strong>/sbin/ifup ath0</strong></span>命令的输出，以供参考：
  </p>
<pre class="screen">

    # /sbin/iwconfig ath0
    ath0      IEEE 802.11g  ESSID:"easwy"  Nickname:""
              Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated
              Bit Rate:1 Mb/s   Tx-Power:16 dBm   Sensitivity=1/1
              Retry:off   RTS thr:off   Fragment thr:off
              Power Management:off
              Link Quality=0/70  Signal level=-96 dBm  Noise level=-96 dBm
              Rx invalid nwid:171945  Rx invalid crypt:0  Rx invalid frag:0
              Tx excessive retries:0  Invalid misc:0   Missed beacon:0
    # /sbin/ifup ath0
    Internet Systems Consortium DHCP Client V3.1.1
    Copyright 2004-2008 Internet Systems Consortium.
    All rights reserved.
    For info, please visit http://www.isc.org/sw/dhcp/

    wifi0: unknown hardware address type 801
    wifi0: unknown hardware address type 801
    Listening on LPF/ath0/00:22:69:68:8b:86
    Sending on   LPF/ath0/00:22:69:68:8b:86
    Sending on   Socket/fallback
    DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 4
    DHCPOFFER from 192.168.1.1
    DHCPREQUEST on ath0 to 255.255.255.255 port 67
    DHCPACK from 192.168.1.1
    bound to 192.168.1.100 -- renewal in 37824 seconds.
  </pre>
<div class="section" lang="zh-CN">
<div class="titlepage"></div>
<p>参考文档</p></div>
<div class="itemizedlist">
<ul type="disc">
<li><a class="ulink" href="http://wiki.debian.org/WiFi/ath_pci" target="_top">Atheros AR5xxx devices (MadWifi)</a></li>
<li><a class="ulink" href="http://wiki.debian.org/WiFi/HowToUse" target="_top">How to use a WiFi interface</a></li>
<li>
      /usr/share/doc/wpasupplicant/README.gz
    </li>
<li>
      /usr/share/doc/wpasupplicant/README.modes.gz
    </li>
<li>
      /usr/share/doc/wpasupplicant/README.wpa_supplicant.conf.gz
    </li>
</ul>
</div>
<div class="posturl">
<p><span class="bold"><strong>原创文章，请阅读页脚的<a href="#license">许可方式</a>，转载请注明：</strong></span>转载自<a class="link" href="http://easwy.com/blog/" target="_top">易水博客</a> [ <a class="link" href="http://easwy.com/blog/" target="_top">http://easwy.com/blog/</a> ]</p>
<p><span class="bold"><strong>本文链接地址:</strong></span> <a class="link" href="http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/" target="_top">http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/</a></p>
</div>
<p style="margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%; font-style: italic">文章的脚注信息由WordPress的<a href="http://easwy.com/blog/wordpress/wp-posturl/" style="color: #8888FF; text-decoration: underline;">wp-posturl插件</a>自动生成</p>
<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post">
<li><a href='http://easwy.com/blog/archives/chinese_in_debian_lenny/' rel='bookmark' title='在Debian Lenny中配置中文'>在Debian Lenny中配置中文</a></li>
<li><a href='http://easwy.com/blog/archives/thinkpad_t400_audio_in_debian_lenny/' rel='bookmark' title='在Debian Lenny中配置Thinkpad T400的声卡'>在Debian Lenny中配置Thinkpad T400的声卡</a></li>
<li><a href='http://easwy.com/blog/archives/subversion-configuration-in-debian-etch/' rel='bookmark' title='在debian etch中配置subversion版本管理'>在debian etch中配置subversion版本管理</a></li>
</div><div class="fixed"></div>]]></content:encoded>
			<wfw:commentRss>http://easwy.com/blog/archives/thinkpad_t400_wireless_driver_for_debian_lenny/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>在thinkpad t400上安装debian lenny</title>
		<link>http://easwy.com/blog/archives/debian-lenny-installation-on-thinkpad-t400/</link>
		<comments>http://easwy.com/blog/archives/debian-lenny-installation-on-thinkpad-t400/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 01:29:17 +0000</pubDate>
		<dc:creator>Easwy</dc:creator>
				<category><![CDATA[开源软件]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[thinkpad]]></category>

		<guid isPermaLink="false">http://easwy.com/blog/?p=490</guid>
		<description><![CDATA[上周末从upnb搬了一部Thinkpad T400-aa1回来，价钱比较实惠。刚好debian 5.0 (lenny)发布，于是打算在小黑上安装lenny，这一系列文章主要是记录安装、配置lenny的过程。
安装前的准备花费了一点时间。因为t400 aa1是港版学生机，自带的操作系统是繁体中文windows vista，也可以转换成英文vista用，不过据说运行简体软件仍会出现乱码。于是就把它格掉，准备安装windows xp。
安装完xp后，整个硬盘只有两个分区，一个系统分区，另外一个是一键恢复占用的隐藏分区。要安装debian，首先要为debian留出空闲分区。可以使用PQMAGIC来重新分区，不过这样分区后，一键恢复功能就不能用了。在网上搜了一下，联想网站上介绍了一种分区方法，这种方法不会影响一键恢复功能。<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post">
<li><a href='http://easwy.com/blog/archives/upgrade_debian_etch_to_lenny/' rel='bookmark' title='升级Debian Etch(4.0)到Debian Lenny(5.0)'>升级Debian Etch(4.0)到Debian Lenny(5.0)</a></li>
<li><a href='http://easwy.com/blog/archives/install-ubuntu-on-thinkpad-t400-aa1/' rel='bookmark' title='在Thinkpad T400上安装Ubuntu'>在Thinkpad T400上安装Ubuntu</a></li>
<li><a href='http://easwy.com/blog/archives/thinkpad-t400-suspend-hibernate-problem-on-linux/' rel='bookmark' title='解决Thinkpad T400在Debian Linux下不能休眠/待机的问题'>解决Thinkpad T400在Debian Linux下不能休眠/待机的问题</a></li>
</div><div class="fixed"></div>]]></description>
			<content:encoded><![CDATA[<p>
      上周末从<a class="link" href="http://www.upnb.com/" target="_blank">upnb</a>搬了一部Thinkpad T400-aa1回来，价钱比较实惠。刚好debian 5.0 (lenny)发布，于是打算在小黑上安装lenny，这一系列文章主要是记录安装、配置lenny的过程。
    </p>
<p>
      安装前的准备花费了一点时间。因为t400 aa1是港版学生机，自带的操作系统是繁体中文windows vista，也可以转换成英文vista用，不过据说运行简体软件仍会出现乱码。于是就把它格掉，准备安装windows xp。之所以装xp，是因为对vista系统印象一直不好。家里DELL计算机上的vista，用了两年多了，还是用不习惯。
    </p>
<p>
      安装xp的过程就不细讲了，用的是<a class="link" href="http://www.upnb.com/" target="_blank">upnb</a>提供的windows xp恢复盘。
    </p>
<p>
      安装完xp后，整个硬盘只有两个分区，一个系统分区，另外一个是一键恢复占用的隐藏分区。虽然说lenovo的一键恢复没什么大用，不过懒得删掉它，放在那儿放着吧，反正250G的硬盘足够大了。
    </p>
<p>
      要安装debian，首先要为debian留出空闲分区。可以使用PQMAGIC来重新分区，不过这样分区后，一键恢复功能就不能用了。在网上搜了一下，联想网站上介绍了一种分区方法，这种方法不会影响一键恢复功能。
    </p>
<p>
      参照文章<a class="link" href="http://think.lenovo.com.cn/support/knowledge/detail.aspx?docID=KN1199274542828&amp;docTypeID=DOC_TYPE_KNOWLEDGE" target="_blank">对ThinkPad预装系统重新分区</a>，先磁盘整理(其实没什么好整理的，刚装的xp)，然后拿出我DELL机配的vista安装盘，运行diskpart，收回了不到120G的硬盘空间。把这120G建成扩展分区，里面再拿出两个32G来格成fat32系统。之所以格成fat32系统，主要考虑到这两个分区要同时能在debian以及windows里访问，而32G是fat32文件系统能支持的最大分区大小。
    </p>
<p>
      现在还剩下大概50多G的空间，对安装debian来说足够了。
    </p>
<p>
      我安装debian，都是使用netinst映像。先由netinst光盘安装完基本系统，然后再由网络安装。这样的好处是不用下载几张光盘镜像，这些镜像在装过一次后基本没什么用了，因为debian在不断更新中；不过网络安装要求有便利的上网条件，以及高速的下载源。在当前的宽带环境下，这倒不是什么问题。
    </p>
<p>
      到<a class="link" href="http://www.debian.org/distrib/netinst" target="_blank">debian官方网站</a>下载netinst光盘映像，我下的是大约180MB的映像。如果你更懒的话，可以下载不到40MB的映像。
    </p>
<p>
      把映像刻录到光盘后，光盘启动，按照提示一步步做就可以了。lenny在安装过程中有中文界面，如果选用中文界面的话，安装后系统的默认语言就是中文。我在这里选的是英文界面，中文打算安装完lenny后再配置。
    </p>
<p>
      安装过程不必多讲，大概只有硬盘分区时费一点脑子，要想好自己怎么分区。我通常是分三个区，一个/分区，一个/home分区，一个swap分区。debian也可以帮你自动分区，不过我看了一下，自动分区后，留给/分区的空间不够，最好还是手动分区。
    </p>
<p>
      在配置apt源的时候，要等上很长一段时间，当时以为出了什么问题，不过后来还是走过去了。apt源设置成网速最快的，以前我都使用debian.cn99.com，不过最近用它更新好像不正常，改用台湾的源http://ftp.tw.debian.org/debian，下载的速度还不错。配置完apt源，会让你选择安装哪些包，我在这儿把所有选项都清掉了，先把基本系统装好再装这些包也不迟。
    </p>
<p>
      跳过package安装后，很快基本系统就装好了。重启计算机，进入debian，本本的硬件差不多都能识别出来。切换到root用户，运行<span class="command"><strong>aptitude</strong></span>，把自己想装的任务(task)选中，GO，开始下载安装~~ 下载安装的过程差不多花了两个小时，主要取决于你所选的包的数目，我选了xfce、KDE、笔记本相关组件、中文组件等。
    </p>
<p>
      安装完成了，接下来要进行系统配置，下篇文章继续。
    </p>
<div class="posturl">
<p><span class="bold"><strong>原创文章，请阅读页脚的<a href="#license">许可方式</a>，转载请注明：</strong></span>转载自<a class="link" href="http://easwy.com/blog/" target="_top">易水博客</a> [ <a class="link" href="http://easwy.com/blog/" target="_top">http://easwy.com/blog/</a> ]</p>
<p><span class="bold"><strong>本文链接地址:</strong></span> <a class="link" href="http://easwy.com/blog/archives/debian-lenny-installation-on-thinkpad-t400/" target="_top">http://easwy.com/blog/archives/debian-lenny-installation-on-thinkpad-t400/</a></p>
</div>
<p style="margin-top: 0; margin-bottom: 15px; color: #888888; font-size: 80%; font-style: italic">文章的脚注信息由WordPress的<a href="http://easwy.com/blog/wordpress/wp-posturl/" style="color: #8888FF; text-decoration: underline;">wp-posturl插件</a>自动生成</p>
<div class="fixed"></div><div id="related_posts"><h3  class="related_post_title">相关文章</h3><ul class="related_post">
<li><a href='http://easwy.com/blog/archives/upgrade_debian_etch_to_lenny/' rel='bookmark' title='升级Debian Etch(4.0)到Debian Lenny(5.0)'>升级Debian Etch(4.0)到Debian Lenny(5.0)</a></li>
<li><a href='http://easwy.com/blog/archives/install-ubuntu-on-thinkpad-t400-aa1/' rel='bookmark' title='在Thinkpad T400上安装Ubuntu'>在Thinkpad T400上安装Ubuntu</a></li>
<li><a href='http://easwy.com/blog/archives/thinkpad-t400-suspend-hibernate-problem-on-linux/' rel='bookmark' title='解决Thinkpad T400在Debian Linux下不能休眠/待机的问题'>解决Thinkpad T400在Debian Linux下不能休眠/待机的问题</a></li>
</div><div class="fixed"></div>]]></content:encoded>
			<wfw:commentRss>http://easwy.com/blog/archives/debian-lenny-installation-on-thinkpad-t400/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

