<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>杂乱的书桌 &#187; ubuntu</title>
	<atom:link href="http://www.quhuashuai.com/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.quhuashuai.com</link>
	<description>我学习，我思考，我记录</description>
	<lastBuildDate>Fri, 17 Apr 2009 18:25:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>zh-cn</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.4" -->
		<copyright>2007-2008 </copyright>
		<managingEditor>quhuashuai@gmail.com (杂乱的书桌)</managingEditor>
		<webMaster>quhuashuai@gmail.com (杂乱的书桌)</webMaster>
		<category>posts</category>
		<ttl>1440</ttl>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary>我学习，我思考，我记录</itunes:summary>
		<itunes:author>杂乱的书桌</itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name>杂乱的书桌</itunes:name>
			<itunes:email>quhuashuai@gmail.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://www.quhuashuai.com/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<image>
			<url>http://www.quhuashuai.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>杂乱的书桌</title>
			<link>http://www.quhuashuai.com</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>Archlinux下启用Thinkpad功能键</title>
		<link>http://www.quhuashuai.com/2008/10/enable-fn-in-thinkpad-under-archlinux/</link>
		<comments>http://www.quhuashuai.com/2008/10/enable-fn-in-thinkpad-under-archlinux/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 01:39:41 +0000</pubDate>
		<dc:creator>Hugh</dc:creator>
				<category><![CDATA[电脑应用]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.quhuashuai.com/?p=294</guid>
		<description><![CDATA[不知道是Thinkpad的问题，还是Archlinux的问题，自从由Ubuntu换到了Archlinux之后，我的T43就没有成功搞定过Thinkpad的这些功能键，所以Fn这个键就成了个摆设，每次需要开启蓝牙或者关闭屏幕的时候[...]]]></description>
			<content:encoded><![CDATA[<p>
不知道是Thinkpad的问题，还是Archlinux的问题，自从由Ubuntu换到了Archlinux之后，我的T43就没有成功搞定过Thinkpad的这些功能键，所以Fn这个键就成了个摆设，每次需要开启蓝牙或者关闭屏幕的时候，我能做的事情就是敲一些命令，实在有点烦。今天在网上找了一些，确实是有解决办法的，而且并不复杂，我们需要做的事情就是修改/etc/acpi/handler.sh这个问题，在这里面配置下功能键对应的命令。
</p>
<p>
开始之前，先确定你已经在/etc/rc.conf里面加载了ibm_acpi这个Module。这是我们进行修改和配置的先决条件，接下里将原本的/etc/acpi/handler.sh备份一下，尽管来说很多时候并不是需要这么做，鉴于我们都是新手，防止出现意外还是备份一下比较安全。这些都搞定之后，把下面的这段代码保存为新的/etc/acpi/handler.sh。
</p>
<div class="hl-surround"><div class="hl-main">#!/bin/sh<br /># Default acpi script that takes an entry for all actions<br /><br /># NOTE: This is a 2.6-centric script.&nbsp; If you use 2.4.x, you'll have to<br />#&nbsp; &nbsp; &nbsp; &nbsp;modify it to not use /sys<br /><br />set $*<br /><br />case &quot;$1&quot; in<br />&nbsp;&nbsp; &nbsp;ibm/hotkey)<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;case &quot;$2&quot; in<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HKEY)<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &quot;$4&quot; in<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;00001002) # Lock screen<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xscreensaver-command -lock<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;00001003) # swithing display off<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;	xset dpms force off<br />						;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;00001004) # Suspend to RAM<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/usr/sbin/pm-suspend<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;00001005) # Switch Bluetooth<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if [ &quot;$(grep &quot;status.*enabled&quot; /proc/acpi/ibm/bluetooth)&quot; ]; then<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;disable&quot; &gt; /proc/acpi/ibm/bluetooth<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;enable&quot; &gt; /proc/acpi/ibm/bluetooth<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;00001007) # Toggle external display<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if [ &quot;$(xrandr -q | grep &quot;VGA connected&quot;)&quot; ]; then<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if [ &quot;$(xrandr -q | grep &quot;VGA connected [0-9]&quot;)&quot; ]; then<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xrandr --output VGA --off<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xrandr --output VGA --auto<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xrandr --output VGA --off<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#00001008) # Toggle Trackpoint/Touchpad<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp; &nbsp; ;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#00001009) # Eject from dock<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp; &nbsp; ;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0000100c) # Hibernate<br />						/usr/sbin/pm-hibernate<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#00001014) # Toggle zoom<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp; &nbsp; ;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#00001018) # ThinkVantage button<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp; &nbsp; ;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;esac<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;esac<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp;button/lid)<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;case &quot;$2&quot; in<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LID)<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &quot;$3&quot; in<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;00000080) # Lid opened/closed<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;grep open /proc/acpi/button/lid/LID/state || hibernate -F /etc/hibernate/ususpend-ram.conf<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;esac<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;esac<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp;ac_adapter)<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;case &quot;$2&quot; in<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC)<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &quot;$4&quot; in<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;00000001) # AC plugged<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo -n performance &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;00000000) # AC unplugged<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo -n ondemand &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;esac<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;esac<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp;video)<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;case &quot;$2&quot; in<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LCD0)<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case &quot;$3&quot; in<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;00000086) # Brightness up<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;brightness +<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;00000087) # Brightness down<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;brightness -<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;esac<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;esac<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;;;<br />esac</div></div>
<p>
在保存好之后，其实你可以根据自己的需要修改一些对应的命令，进而调整一些功能键。在我的这个配置下面，Fn+F2是使用xscreensaver锁定屏幕；Fn+F3是关闭显示屏幕；Fn+F4是挂起，这里我使用的是pm-suspend；Fn+F5是切换蓝牙的开关；Fn+F7是启动外接显示器或者投影仪之类的；Fn+F12是休眠。基本上就是这样，同时还启用了调整屏幕亮度，打开上面小灯等功能。至少在我的T43上面这些功能都没有问题。
</p>
<p>
这些都搞定之后你只需要sudo /etc/rc.d/acpi restart，重启启动acpi就好了，现在赶紧来试试看吧，那些你熟悉的功能键是不是都找回来了？
</p>
<p><i>本文主要参考<a href="http://bbs.archlinux.org/viewtopic.php?id=45710">Arch Linux Forum</a></i></p>
<img src="http://www.quhuashuai.com/?ak_action=api_record_view&id=294&type=feed" alt="" /><hr />
<p><small>&copy; Hugh for <a href="http://www.quhuashuai.com">杂乱的书桌</a>, 2008. |
<a href="http://www.quhuashuai.com/2008/10/enable-fn-in-thinkpad-under-archlinux/">Permalink</a> |
<a href="http://www.quhuashuai.com/2008/10/enable-fn-in-thinkpad-under-archlinux/#comments">2 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.quhuashuai.com/2008/10/enable-fn-in-thinkpad-under-archlinux/&amp;title=Archlinux下启用Thinkpad功能键">del.icio.us</a>
<br/>
Post tags: <a href="http://www.quhuashuai.com/tag/linux/" rel="tag">linux</a>, <a href="http://www.quhuashuai.com/tag/ubuntu/" rel="tag">ubuntu</a><br/>
</small></p>
	<h4>也许你对这些文章还有兴趣</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.quhuashuai.com/2007/08/install_matlab_on_ubuntu/" title="Ubuntu下安装matlab过程 (2007-08-15)">Ubuntu下安装matlab过程</a> (9)</li>
	<li><a href="http://www.quhuashuai.com/2008/10/okular-font-problem-in-archlinux/" title="Archlinux中配置Okular下缺失的英文字体 (2008-10-09)">Archlinux中配置Okular下缺失的英文字体</a> (2)</li>
	<li><a href="http://www.quhuashuai.com/2009/04/archlinux%e4%b8%8b%e7%bb%99t43%e6%b7%bb%e5%8a%a0win%e9%94%aesuper%e9%94%ae/" title="Archlinux下给T43添加Win键(Super键) (2009-04-17)">Archlinux下给T43添加Win键(Super键)</a> (15)</li>
	<li><a href="http://www.quhuashuai.com/2008/09/install-matlab-2008a-on-archlinux/" title="Archlinux下安装Matlab 2008a (2008-09-11)">Archlinux下安装Matlab 2008a</a> (2)</li>
</ul>


<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.quhuashuai.com/2008/10/enable-fn-in-thinkpad-under-archlinux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu下安装matlab过程</title>
		<link>http://www.quhuashuai.com/2007/08/install_matlab_on_ubuntu/</link>
		<comments>http://www.quhuashuai.com/2007/08/install_matlab_on_ubuntu/#comments</comments>
		<pubDate>Wed, 15 Aug 2007 05:35:02 +0000</pubDate>
		<dc:creator>Hugh</dc:creator>
				<category><![CDATA[个人发展]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[学习]]></category>

		<guid isPermaLink="false">http://www.quhuashuai.com/2007/08/install_matlab_on_ubuntu/</guid>
		<description><![CDATA[在这里要谢谢yilingr0.spaces.live.com的内容，我把自己的安装过程写在这里，一是为了方便以后 再装的时候方便查阅，其次也是为了方便很多和我一样的菜鸟可以在这里查阅东西. 过程开始：
更新[...]]]></description>
			<content:encoded><![CDATA[<p>在这里要谢谢yilingr0.spaces.live.com的内容，我把自己的安装过程写在这里，一是为了方便以后 再装的时候方便查阅，其次也是为了方便很多和我一样的菜鸟可以在这里查阅东西. 过程开始：</p>
<p><b>更新内容：对于最新版本的2007b进行了一些更新。如果你在安装过程中，或者下载方面有任何问题，欢迎留言告诉我。</b></p>
<ol>
<li>下载<a href="http://www.quhuashuai.com/tag/matlab"  class="alinks_links" onclick="return alinks_click(this);" title="&#20851;&#20110;"Matlab"&#30340;&#25991;&#31456;"  rel="external">matlab</a> for <a href="http://www.quhuashuai.com/tag/linux"  class="alinks_links" onclick="return alinks_click(this);" title="&#20851;&#20110;"Linux"&#30340;&#25991;&#31456;"  rel="external">linux</a>，我是用amule在veryCD上面下载的，一个for Mac和linux的版本，<b>现在最新的matlab 2007b的链接在这里：ed2k://|file|Mathworks.Matlab.R2007b.UNIX.DVD.-TBE.iso|3594958848|58E5A99B5C4E921D0FDCC51B4F827765|/</b>，大家可以一起去加速了。</li>
<li>挂载iso文件: sudo mount -t iso9660 (iso文件的路径和文件名) /media/cdrom -o loop。最新版本的下载下来是DVD的镜像文件，所以不需要再换盘了。如果你使用别的安装文件，安装过程中提示换盘的时候, 先umount: sudo umount /media/cdrom，再用上面的挂载方法，挂上其它盘.</li>
<li>
<p>建立安装matlab的目录：我是装在 /opt/matlab，命令：sudo mkdir /opt/matlab，然后把license文件拷贝到安装目录下面。</p>
<ul>
<li>如果版本是2006b, 可以下载一个license的压缩包。里面有一个license_lock, 一个license_server, 无论使用哪一个, 拷贝到/opt/matlab/license.dat</li>
<li>如果版本是2007b，在crack文件夹下面，可以找到两个license的文件，以及一个简单的安装说明，将其中任意一个拷贝到/opt/matlab/license.dat</li>
</ul>
</li>
<li>打开终端，sudo /media/cdrom/install。注意当前路径不要放在/media/cdrom，然后直接使用install，这样会提示有问题。所以上面命令用绝对路径. 安装过程中遇到问题就看看上面的英文提示，正常情况下不会有太多问题的.</li>
<li>安装路径: 提示你选择安装路径的时候就是你刚在建立的那个目录了.</li>
<li>然后就会提示你选择要安装的组件，全选就可以了.</li>
<li>提示换盘时，按我上面说的挂载上去就行.</li>
<li>最后OK就行了.</li>
<li>运行：sudo /opt/matlab/install_matlab进行一些相关的设置，就按照默认的就行了.</li>
</ol>
<p><del>如果进入matlab之后提示一些错误的话，如果是opengl方面的，最好就更新一下自己的显卡驱动；如果是java方面的话（我重装了以后点击一些yes,no,cancel之类的按钮就会crash,这种情况的话就在terminal下面运行：export MATLAB_JAVA=/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre (具体的路径请看自己的系统). 等号后面的是你的jre的目录，但是这么做也有不好的地方，就是只能在当前的terminal下面运行matlab，如果 另外打开一个terminal，还要再运行一遍上面的命令. 如果想以后不用再费劲的话，就编辑一下~/.bashrc下面的内容，把上面的命令添加进去， 这样每次运行terminal的时候，这条指令就是自动执行的了，现在试试直接输入matlab吧</del>!</p>
<p><b>对于最新的matlab 2007b的一些问题更新如下：</b></p>
<p>我个人使用kde，没有任何不正常现象，不过在网上见到有些朋友使用gnome的，运行matlab后，只有一个外框能正确显示，其它的都是一片白。同时转载过来见到的解决办法（实在不知道出处了，如果有朋友知道，不妨告诉我，Hugh一定注明）</p>
<ol>
<li>办法1：在matlab安装目录下的bin/matlab文件中（一堆注释后面）添加：<br />
<code>export AWT_TOOLKIT=MToolkit</code></p>
<p>该方法可以解决显示问题，但会经常出现无法输入的问题。比如调用plot函数后，command窗口就<br />
无法输入新字符了，只能通过依次点击Current Directory 和 Workspace解决。。依次点击后就可以<br />
继续输入字符了。</li>
<li>方法2：安装sun-java6-jre。具体方法为<br />
<code>sudo apt-get install sun-java6-jre</code></p>
<p>然后在matlab安装目录下的bin/matlab文件中（一堆注释后面）添加：<br />
<code>export MATLAB_JAVA=/usr/lib/jvm/java-6-sun/jre/</code><br />
注意，不需要添加export AWT_TOOLKIT=MToolkit了，这样修改以后就没有输入的问题。</li>
</ol>
<p>如果你的matlab不能显示中文，那么你需要在File-Preference-Fonts中指定中文字体。如果你为了让字体显示效果更好一些的话，不妨选中下面的Use antialiasing to smooth fonts，然后重启，开始你的matlab之旅吧！</p>
<img src="http://www.quhuashuai.com/?ak_action=api_record_view&id=5&type=feed" alt="" /><hr />
<p><small>&copy; Hugh for <a href="http://www.quhuashuai.com">杂乱的书桌</a>, 2007. |
<a href="http://www.quhuashuai.com/2007/08/install_matlab_on_ubuntu/">Permalink</a> |
<a href="http://www.quhuashuai.com/2007/08/install_matlab_on_ubuntu/#comments">9 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.quhuashuai.com/2007/08/install_matlab_on_ubuntu/&amp;title=Ubuntu下安装matlab过程">del.icio.us</a>
<br/>
Post tags: <a href="http://www.quhuashuai.com/tag/matlab/" rel="tag">matlab</a>, <a href="http://www.quhuashuai.com/tag/ubuntu/" rel="tag">ubuntu</a>, <a href="http://www.quhuashuai.com/tag/%e5%ad%a6%e4%b9%a0/" rel="tag">学习</a><br/>
</small></p>
	<h4>也许你对这些文章还有兴趣</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.quhuashuai.com/2007/12/mit-sls-lectures-browser/" title="麻省理工学院的SLS课程浏览器 (2007-12-16)">麻省理工学院的SLS课程浏览器</a> (11)</li>
	<li><a href="http://www.quhuashuai.com/2008/04/umass-offer-online-course-in-china/" title="马萨诸塞大学(UMass)获准在中国提供在线课程 (2008-04-10)">马萨诸塞大学(UMass)获准在中国提供在线课程</a> (7)</li>
	<li><a href="http://www.quhuashuai.com/contact/" title="联系方式 (2007-09-09)">联系方式</a> (84)</li>
	<li><a href="http://www.quhuashuai.com/2007/12/yale-open-courses/" title="耶鲁大学推出开放课程材料! (2007-12-14)">耶鲁大学推出开放课程材料!</a> (33)</li>
	<li><a href="http://www.quhuashuai.com/2007/08/bibliography_for_math_student/" title="美国数学本科生，研究生基础课程参考书目 (2007-08-16)">美国数学本科生，研究生基础课程参考书目</a> (64)</li>
	<li><a href="http://www.quhuashuai.com/2008/01/ultimate-student-resource-list/" title="终极学生资源列表 (2008-01-24)">终极学生资源列表</a> (18)</li>
	<li><a href="http://www.quhuashuai.com/2008/10/determine-your-study-time/" title="确定每天的学习时间 (2008-10-11)">确定每天的学习时间</a> (67)</li>
	<li><a href="http://www.quhuashuai.com/2008/10/is-it-necessary-to-reorganize-notes/" title="整理笔记的必要性？ (2008-10-07)">整理笔记的必要性？</a> (18)</li>
</ul>


<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.quhuashuai.com/2007/08/install_matlab_on_ubuntu/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
