﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-blacktusk--期待收获的季节-文章分类-linux使用解决指南</title><link>http://www.cppblog.com/heidaizx/category/5280.html</link><description /><language>zh-cn</language><lastBuildDate>Tue, 20 May 2008 00:14:05 GMT</lastBuildDate><pubDate>Tue, 20 May 2008 00:14:05 GMT</pubDate><ttl>60</ttl><item><title>KDevelop的第一次使用</title><link>http://www.cppblog.com/heidaizx/articles/50304.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Sun, 18 May 2008 12:00:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/50304.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/50304.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/50304.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/50304.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/50304.html</trackback:ping><description><![CDATA[<p>1. KDevelop只是一个IDE，要想编译c/c++程序，要安装make和GCC，以及头文件，那就从这里开始：</p>
<font color="#33cc33">
<div class="quote"><font color="#9900ff">sudo apt-get build-dep gcc <br>sudo apt-get install&nbsp;build-essential</font> </div>
</font>
<p>2.安装KDevelop</p>
<font color="#9900ff">
<div class="quote"><font color="#9900ff">sudo apt-get install kdevelop3</font></div>
</font>
<p>3.安装好后，可以在应用程序-&gt;编程 中看到 KDevelop了。下面这个使用KDevelop开发程序是转的，偷下懒:-)</p>
<div class="quote">
<p>基本步骤 <br>一般而言，用<strong style="color: #ffa34f;">KDevelop 编程大体要经历如下几个步骤。编程是比较复杂的，很难一次成功，这些步骤 <br>可能要反复进行多次。 <br><br>第一步，新建工程 <br>可以通过菜单操作启动相应的向导程序，借助它完成工程的初建工作。 <br>【Project】&#8594;【New Project】 <br>在新建工程过程中，主要需要指定工程文件保存位置、工程名称、工程类型，并且可以填写编程作者 <br>的信息。根据所选工程类型(比如，是文本界面的程序还是图形界面的程序，是C程序还是C++程序)，向导程序会自动生成一批模板文件。 <br><br>第二步，编辑程序文件 <br>向导程序一般会创建一些程序文件，应该对这些文件进行编辑以满足特定的编程需要。 <br>还可以执行菜单操作来增加新的文件。 <br>【File】&#8594;【New】 <br>上述操作后，会出现一个对话框，用于指定文件名和文件类型。根据文件类型的不同，会自动设定合 <br>适的扩展名。注意，&#8220;Add to project&#8221;复选框应该勾选上以确保新文件被加入到当前的工程中。 <br><br>第三步，生成源码结构 <br>在编辑好程序文件后，要先借助GNU Build System生成系统生成源码结构。在增加了新文件(或目 <br>录)、
修改了文件(或目录)名、改变文件的保存位置之后，都应该重新生成源码结构。具体而言，生成源码结构包括autoconf、automake等操作，把每
个子目录的Makefile.am变成了Makefile.in。具有源码结构的程序文件包可以在任何UNIX、LINUX的系统上使用简单的命令(即
configure/make/make install等)进行配置、编译、连接和安装。 <br>可以执行菜单操作来生成源码结构： <br>【Build】&#8594;【Run automake&amp;conf】 <br><br>第四步，配置，即运行configure <br>configure是一个脚本，用来确定所处系统的细节，比如使用何种编译器、何种库，以及编译器和库的 <br>保存位置，并把Makefile.in的相应部分进行替换，形成Makefile。 <br>可以执行菜单操作来进行配置： <br>【Build】&#8594;【Run configure】 <br><br>第五步，编译连接 <br>执行菜单操作【Build】&#8594;【Built Project】即可完成编译连接，形成可执行文件。默认情况下，这种可执行文件是带有源码调试符号的。 <br>对于多文件的程序，一般需要对每一个文件分别进行编译生成目标文件。当每个文件的编译通过之后，再统一进行编译连接。单独编译当前正在编辑的文件的菜单操作是： <br>【Build】&#8594;【Compile File】 <br><br>第六步，运行 <br>如果想在<strong style="color: #ffa34f;">KDevelop 的控制下运行已编译连接好的程序，可以执行菜单操作： <br>【Build】&#8594;【Excecute program】 <br>如果想单独运行程序，则需要先安装，然后在命令行中输入相应的可执行文件的名字(一般来讲，就是 <br>工程的名字)即可。<strong style="color: #ffa34f;">KDevelop 会把可执行文件放在/usr/local/bin之中 <br>【Build】&#8594;【Install】</strong></strong></strong></p>
</div>
<div class="quote"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">编写程序文件 <br>通过菜单操作【Project】&#8594;【New Project】启动新建工程向导程序，选择工程类型，并指定 工程名称及其保存位置，如图所示。接下来一路点击Next即可完成工程的创建工作。 <br>向导程序会自动生成一个含有主函数的文件。以此文件是一个模板，在它的基础上修改并添加代码， <br>即可编写需要的程序。 <br><br>编译 <br>程序写好后，应该把文件保存起来，然后按照前面提到的步骤，生成源码结构、配置、编译，即依次 <br>执行如下菜单操作： <br>【Build】&#8594;【Run automake&amp;conf】 <br>【Build】&#8594;【Run configure】 <br>【Build】&#8594;【Compile File】 <br>每一个操作若能正常完成，在Messages窗口中会出现Success的提示。如果没有Success的提示，则表明相应的操作失败，应查明原因。 <br>一般来讲，生成源码结构和配置这两个操作都能顺利通过。 <br>如果编译连接是首次进行，则一般会失败，因为很少有人能一次写出没有任何语法错误的程序。查看 <br>Messages窗口中的提示信息，可以了解哪些地方出现了语法错误。单击某一条错误提示信息，<strong style="color: #ffa34f;">KDevelop 会自动把光标定位到发生该错误的语句上。 <br>依据错误提示，修正程序中的语法错误，然后再次尝试编译，直到出现Success的提示。 <br>经常出现的一种情况是，程序上的一个语法错误会导致多条错误信息的出现。因此，应该把第一条错 <br>误信息认真处理好，再从随后的错误信息中随机选择几条加以处理，然后就再次尝试编译，看还有没有错误信息。如此反复多次，直到把所有的错误提示消除掉，编译就成功了。不要把所有错误信息都依次处理完再尝试编译，那样的效率比较低。 <br><br>生成可执行文件 <br>编译成功后，执行菜单操作【Build】&#8594;【Built Project】即可生成相应的生成可执行文件。 <br><br>调试 <br>接下来，可以执行菜单操作【Build】&#8594;【Excecute program】试运行程序。这种运行是在<strong style="color: #ffa34f;">KDevelop 的控制下进行的。因此，如果出现&#8220;死循环&#8221;，可以执行菜单操作【Build】&#8594;【Stop】或按Esc键即可中止程序的运行。 <br>如果在程序中存在逻辑错误，就得不到期望的结果。逻辑错误的排除比较困难。必须对程序进行仔细 <br>的分析才能找到错误的原因。 <br>一般的逻辑错误可以根据程序的运行表现加以判断。比较深层次的逻辑错误则需要借助调试工具。 <br>本章前面介绍的调试工具GNU gdb就是一个很好的工具，可以用它对程序进行仔细分析，查找逻辑错 <br>误的根源。默认情况下，经过【Build】&#8594;【Built Project】操作之后，可以在工程目录下的/debug/src/中找到带源代码调试符号的可执行文件。 <br>发现逻辑错误后，就要修改程序，重新编译连接。然后再试运行。如果仍然得不到期望的结果，说明 <br>程序中还有逻辑错误，应再次进行分析。如此反复多次，直到消除全部的逻辑错误。 <br><br>发布可执行文件 <br>如果只想发布程序的可执行文件，可以先调整项目的编译连接选项，选择优化编译的方式。这样可以 <br>得到更小更快的可执行文件。 <br>可
以通过菜单【Project】&#8594;【Build
Configuration】修改编译连接选项。此菜单之下有三种选项，默认为Debug，生成的可执行文件中含有源程序调试符号；还可以选择
Default或Optimized。选择Optimized时，编译连接时将进行优化，生成的可执行文件更小，执行起来也更快。 <br>选择Debug时，可执行文件保存在工程目录下的/debug/src/中；选择Optimized时， 可执行文件保存在工程目录下的/optimized/src/中；选择Default时， 可执行文件保存在工程目录下的/src/中。 <br>如果要发布可执行文件，应该选择Optimized的方式进行编译连接。 <br><br>发布源程序 <br>把工程目录及其中的所有文件打包即可形成源程序包。用户得到这个源程序包并解压后，不必安装<strong style="color: #ffa34f;">KDevelop  就可以按标准方法进行编译和安装，即支持 <br>configure，make，make install，make clean，make uninstall等命令。这个包也含有<strong style="color: #ffa34f;">KDevelop 的工程文件和其他相关的信息。因此，如果用户安装了<strong style="color: #ffa34f;">KDevelop ，可以直接打开该工程进行修改。</strong></strong></strong></strong></strong></strong></strong></strong></div>
<div class="quote"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">如何使用已有的源文件？ <br>在<strong style="color: #ffa34f;">KDevelop 主窗口的右侧有一个Automake Manager标签。点击该标签，就可以看到本工程源文件所在的文件夹以及各文件。在列有文件的那个窗口上方有工具条，其中就是用来添加文件的。添加文件有两种方式，一种是链接(link)方式，另一种是复制(copy)方式。</strong></strong></strong></strong></strong></strong></strong></strong></strong></div>
<div class="postname"><br><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"></strong></strong></strong></strong></strong></strong></strong></strong></strong></div>
<p><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">4.遇到的问题，按照上面的方法编译第一个程序时遇到了问题：</strong></strong></strong></strong></strong></strong></strong></strong></strong></p>
<p><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">a)运行Run automake&amp;friend时，报错：</strong></strong></strong></strong></strong></strong></strong></strong></strong></p>
<p>
</p>
<p><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">&nbsp;</strong></strong></strong></strong></strong></strong></strong></strong></strong></p>
<p><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">这是由于没有安装automake造成的，解决方法是在终端中运行下列代码：</strong></strong></strong></strong></strong></strong></strong></strong></strong></p>
<p>
</p>
<p><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">&nbsp;sudo apt-get install automake<br></strong></strong></strong></strong></strong></strong></strong></strong></strong></p>
<p><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><font color="#000000">b)再次运行Run automake&amp;friend时遇到错误：</font></strong></strong></strong></strong></strong></strong></strong></strong></strong></p>
<p><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><font color="#000000"></font>
</strong></strong></strong></strong></strong></strong></strong></strong></strong></p>
<p><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">&nbsp;</strong></strong></strong></strong></strong></strong></strong></strong></strong></p>
<p><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">这是由于没有安装libtool造成的，解决方法是</strong></strong></strong></strong></strong></strong></strong></strong></strong></p>
<p>
</p>
<p><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">&nbsp;<strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">sudo apt-get install libtool
</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></p>
<p><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">c)终于编程通过了，但是在Excecute program又提示错误了：</strong></strong></strong></strong></strong></strong></strong></strong></strong></p>
<div class="quote"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">konsole not found</strong></strong></strong></strong></strong></strong></strong></strong></strong></div>
<p><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">这是由于没有安装konsole造成的，安装就好了</strong></strong></strong></strong></strong></strong></strong></strong></strong></p>
<p><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">sudo apt-get install konsole</strong></strong></strong></strong></strong></strong></strong></strong></strong><br>
</strong></strong></strong></strong></strong></strong></strong></strong></strong></p>
<strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;"><strong style="color: #ffa34f;">	</strong></strong></strong></strong></strong></strong></strong></strong></strong><br><img src ="http://www.cppblog.com/heidaizx/aggbug/50304.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2008-05-18 20:00 <a href="http://www.cppblog.com/heidaizx/articles/50304.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>安装星际译王</title><link>http://www.cppblog.com/heidaizx/articles/45747.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Sun, 30 Mar 2008 07:45:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/45747.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/45747.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/45747.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/45747.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/45747.html</trackback:ping><description><![CDATA[安装星际译王<br>在源里面搜索stardict,然后安装。<br>然后到星际译王中文站中下载词典放到指定文件夹中，步骤如下<br>tar -xjvf a.tar.bz2<br>mv a /usr/share/stardict/dic<br>或者是 ./stardict/dic中<br><br><img src ="http://www.cppblog.com/heidaizx/aggbug/45747.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2008-03-30 15:45 <a href="http://www.cppblog.com/heidaizx/articles/45747.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>wine 魔兽成功</title><link>http://www.cppblog.com/heidaizx/articles/45669.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Sat, 29 Mar 2008 06:25:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/45669.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/45669.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/45669.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/45669.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/45669.html</trackback:ping><description><![CDATA[1 打开终端，输入
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><span class="genmed"><strong>引用:</strong></span></td>
        </tr>
        <tr>
            <td class="quote">  sudo gedit /etc/apt/sources.list</td>
        </tr>
    </tbody>
</table>
<span class="postbody">
<br>
2 添加源
<br>
For Ubuntu Dapper (6.06):
<br>
</span>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><span class="genmed"><strong>引用:</strong></span></td>
        </tr>
        <tr>
            <td class="quote">deb <a  href="http://wine.budgetdedicated.com/apt" target="_blank">http://wine.budgetdedicated.com/apt</a> dapper main
            <br>
            deb-src <a  href="http://wine.budgetdedicated.com/apt" target="_blank">http://wine.budgetdedicated.com/apt</a> dapper main</td>
        </tr>
    </tbody>
</table>
<span class="postbody">
<br>
<br>
For Ubuntu Breezy (5.10):
<br>
</span>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><span class="genmed"><strong>引用:</strong></span></td>
        </tr>
        <tr>
            <td class="quote">deb <a  href="http://wine.budgetdedicated.com/apt" target="_blank">http://wine.budgetdedicated.com/apt</a> breezy main
            <br>
            deb-src <a  href="http://wine.budgetdedicated.com/apt" target="_blank">http://wine.budgetdedicated.com/apt</a> breezy main</td>
        </tr>
    </tbody>
</table>
<span class="postbody">
<br></span><span class="postbody">
For Ubuntu Feisty (7.04):
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>deb <a  href="http://wine.budgetdedicated.com/apt" target="_blank">http://wine.budgetdedicated.com/apt</a> <span class="postbody">feisty</span> main
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; deb-src <a  href="http://wine.budgetdedicated.com/apt" target="_blank">http://wine.budgetdedicated.com/apt</a> <span class="postbody">feisty</span> main<br><span class="postbody"><br></span><span class="postbody">3 使用以下代码
<br>
</span>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><span class="genmed"><strong>引用:</strong></span></td>
        </tr>
        <tr>
            <td class="quote">sudo apt-get update
            <br>
            sudo apt-get dist-upgrade
            <br>
            sudo apt-get install wine
            <br>
            </td>
        </tr>
    </tbody>
</table>
<span class="postbody">
<br>
就可以安装wine 最新版本了。<br>安装后我没配置就可以进入魔兽了<br>加上参数 －opengl运行起来一点都不卡<br></span><img src ="http://www.cppblog.com/heidaizx/aggbug/45669.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2008-03-29 14:25 <a href="http://www.cppblog.com/heidaizx/articles/45669.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>tomen+xine代替totem</title><link>http://www.cppblog.com/heidaizx/articles/45173.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Sun, 23 Mar 2008 03:02:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/45173.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/45173.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/45173.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/45173.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/45173.html</trackback:ping><description><![CDATA[<span class="postbody"><br>
<br>
安装gstreamer的解码器
<br>
</span>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><span class="genmed"><strong>代码:</strong></span></td>
        </tr>
        <tr>
            <td class="code">sudo
            apt-get install gstreamer0.10-pitfdll gstreamer0.10-ffmpeg
            gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse
            gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse</td>
        </tr>
    </tbody>
</table>
<span class="postbody">
<br>
<br>
安装xine及解码器
<br></span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sudo apt-get install libxine-extracodecs totem-xine ffmpeg lame faad sox mjpegtools libxine-main1<br><br>转贴于：<a  href="http://forum.ubuntu.org.cn/viewtopic.php?t=47715&amp;postdays=0&amp;postorder=asc&amp;start=0">http://forum.ubuntu.org.cn/viewtopic.php?t=47715&amp;postdays=0&amp;postorder=asc&amp;start=0</a><br><img src ="http://www.cppblog.com/heidaizx/aggbug/45173.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2008-03-23 11:02 <a href="http://www.cppblog.com/heidaizx/articles/45173.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>安装realplayer for linux</title><link>http://www.cppblog.com/heidaizx/articles/45168.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Sun, 23 Mar 2008 01:53:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/45168.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/45168.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/45168.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/45168.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/45168.html</trackback:ping><description><![CDATA[<span class="postbody">换列外的方法装一下,我经常这样装的:
<br>
请访问 <a  href="http://www.real.com/linux/" target="_blank">http://www.real.com/linux/</a> 下载Realplayer 10 Linux版到一个本地文件夹。
<br>
<br>
为下载来的文件添加执行属性。在终端中，转到下载文件目录，输入
<br>
<br>
chmod +x RealPlayer10GOLD.bin
<br>
<br>
安装Real Player 10，运行下载的文件。输入
<br>
<br>
sudo ./RealPlayer10GOLD.bin
<br>
当安装程序询问安装RealPlayer 10的目的目录时，输入/usr/bin/RealPlayer
<br>
<br>
当询问是否配置全系统可用的符号链接时，输入"y"。然后接受默认的符号链接前缀(按下enter)。
<br>
<br>
之后就可以安全的删除下载的文件。输入
<br>
<br>
rm RealPlayer10GOLD.bin<br><br>我的机子是64位ubuntu 7.04<br><br>转贴于：<a  href="http://forum.ubuntu.org.cn/viewtopic.php?p=107468&amp;sid=38a103cf7595591d9d53dde777e043ce">http://forum.ubuntu.org.cn/viewtopic.php?p=107468&amp;sid=38a103cf7595591d9d53dde777e043ce</a><br></span><img src ="http://www.cppblog.com/heidaizx/aggbug/45168.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2008-03-23 09:53 <a href="http://www.cppblog.com/heidaizx/articles/45168.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ubuntu 7.04 新手指南</title><link>http://www.cppblog.com/heidaizx/articles/43193.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Mon, 25 Feb 2008 03:27:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/43193.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/43193.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/43193.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/43193.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/43193.html</trackback:ping><description><![CDATA[<span class="postbody"><span style="font-weight: bold;">安装后的设置</span>
<br>
<span style="font-weight: bold;">1、修改为国内源</span>
<br>
我这里使用 cn99 的源比较快，使用哪个根据自己实际情况决定。
<br>
我这里只列出了使用得比较多的 <a  href="http://mirror.lupaworld.com/" target="_blank" class="postlink"><span style="color: #0000ff;">lupaworld 源</span></a>和 <a  href="http://ubuntu.cn99.com/" target="_blank" class="postlink"><span style="color: #0000ff;">cn99</span></a> 源。
<br>
在&#8220;应用程序-附件-终端&#8221;里输入：
<br>
</span>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><span class="genmed"><strong>代码:</strong></span></td>
        </tr>
        <tr>
            <td class="code">sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
            <br>
            <br>
            sudo gedit /etc/apt/sources.list</td>
        </tr>
    </tbody>
</table>
<span class="postbody">
<br>
#Mirror.lupaworld.com 源
<br>
deb <a  href="http://mirror.lupaworld.com/ubuntu" target="_blank">http://mirror.lupaworld.com/ubuntu</a> feisty main restricted universe multiverse
<br>
deb <a  href="http://mirror.lupaworld.com/ubuntu" target="_blank">http://mirror.lupaworld.com/ubuntu</a> feisty-security main restricted universe multiverse
<br>
deb <a  href="http://mirror.lupaworld.com/ubuntu" target="_blank">http://mirror.lupaworld.com/ubuntu</a> feisty-updates main restricted universe multiverse
<br>
deb <a  href="http://mirror.lupaworld.com/ubuntu" target="_blank">http://mirror.lupaworld.com/ubuntu</a> feisty-backports main restricted universe multiverse
<br>
deb-src <a  href="http://mirror.lupaworld.com/ubuntu" target="_blank">http://mirror.lupaworld.com/ubuntu</a> feisty main restricted universe multiverse
<br>
deb-src <a  href="http://mirror.lupaworld.com/ubuntu" target="_blank">http://mirror.lupaworld.com/ubuntu</a> feisty-security main restricted universe multiverse
<br>
deb-src <a  href="http://mirror.lupaworld.com/ubuntu" target="_blank">http://mirror.lupaworld.com/ubuntu</a> feisty-updates main restricted universe multiverse
<br>
deb-src <a  href="http://mirror.lupaworld.com/ubuntu" target="_blank">http://mirror.lupaworld.com/ubuntu</a> feisty-backports main restricted universe multiverse
<br>
#cn99.com 源
<br>
deb <a  href="http://ubuntu.cn99.com/ubuntu/" target="_blank">http://ubuntu.cn99.com/ubuntu/</a> feisty main restricted universe multiverse
<br>
deb <a  href="http://ubuntu.cn99.com/ubuntu/" target="_blank">http://ubuntu.cn99.com/ubuntu/</a> feisty-security main restricted universe multiverse
<br>
deb <a  href="http://ubuntu.cn99.com/ubuntu/" target="_blank">http://ubuntu.cn99.com/ubuntu/</a> feisty-updates main restricted universe multiverse
<br>
deb <a  href="http://ubuntu.cn99.com/ubuntu/" target="_blank">http://ubuntu.cn99.com/ubuntu/</a> feisty-proposed main restricted universe multiverse
<br>
deb <a  href="http://ubuntu.cn99.com/ubuntu/" target="_blank">http://ubuntu.cn99.com/ubuntu/</a> feisty-backports main restricted universe multiverse
<br>
deb-src <a  href="http://ubuntu.cn99.com/ubuntu/" target="_blank">http://ubuntu.cn99.com/ubuntu/</a> feisty main restricted universe multiverse
<br>
deb-src <a  href="http://ubuntu.cn99.com/ubuntu/" target="_blank">http://ubuntu.cn99.com/ubuntu/</a> feisty-security main restricted universe multiverse
<br>
deb-src <a  href="http://ubuntu.cn99.com/ubuntu/" target="_blank">http://ubuntu.cn99.com/ubuntu/</a> feisty-updates main restricted universe multiverse
<br>
deb-src <a  href="http://ubuntu.cn99.com/ubuntu/" target="_blank">http://ubuntu.cn99.com/ubuntu/</a> feisty-proposed main restricted universe multiverse
<br>
deb-src <a  href="http://ubuntu.cn99.com/ubuntu/" target="_blank">http://ubuntu.cn99.com/ubuntu/</a> feisty-backports main restricted universe multiverse
<br>
然后在终端里输入
<br>
</span>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><span class="genmed"><strong>引用:</strong></span></td>
        </tr>
        <tr>
            <td class="quote">sudo apt-get update
            <br>
            <br>
            sudo apt-get dist-upgrade</td>
        </tr>
    </tbody>
</table>
<span class="postbody">
<br>
<span style="font-weight: bold;">2、安装中文支持</span>
<br>
在 &#8220;系统－系统管理－语言支持&#8221; 里面把 &#8220;Chinese&#8221; 勾选上。
<br>
如需要使用黑体或其他字体，可以参考<a  href="http://www.osxcn.com/?s=%E9%BB%91%E4%BD%93" target="_blank" class="postlink"><span style="color: #0000ff;">这几篇文章</span></a>。
<br>
<span style="font-weight: bold;">三、媒体解决方案</span>
<br>
能够浏览一下网站、写写文章、看看电影、听听歌、搞搞图片、打打小游戏，还差一个最重要的步骤，就是安装媒体播放软件和相应的解码器。
<br>
在 Linux 上用得最多也最受好评的播放器应该是 Mplayer ，但是在 gnome 2.18 中随之升级的 Totem
播放器已经很不错了，除了自定义不是很强外，可操作性很好，修复了很多 Bug ，还增加了一些功能，好像以前不能双击画面进入全屏。Totem 从
2.17.5 开始默认使用 Gstreamer 作为后端解码方案，但我还是推荐使用 xine。所以我的解决方案是，一般普通的播放任务使用
Totem 电影播放机，如果遇到不能播放的情况或者看大碟时就选用 Mplayer ，播放音乐使用 Rhythmbox。
<br>
<span style="font-weight: bold;">1、安装软件和相应解码器</span>
<br>
</span>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><span class="genmed"><strong>代码:</strong></span></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install mplayer mozilla-mplayer totem-xine libxine-extracodecs</td>
        </tr>
    </tbody>
</table>
<span class="postbody">
<br>
源里好像已经没有了 w32codecs，需要自己从<a  href="http://www.debian-multimedia.org/pool/main/w/w32codecs/" target="_blank" class="postlink"><span style="color: #0000ff;">这里下载</span></a>然后手动安装。
<br>
如果遇到 mp3 这些文件不能播放，可以让 7.04 自动给你找解码器。
<br>
<span style="font-weight: bold;">2、Mplayer 的中文字幕设置方法</span>
<br>
1) 在 Preferences-Font 里面点击 &#8221;Browse&#8221; 选择一个中文字体，Encodeing 选择 Unicode。
<br>
2) 在 Preferences-Subtitle&amp;OSD 里面的 Encoding 选择：
<br>
Simplified Chinese Charset(cp936)
<br>
3) 在 Preferences-Font &#8220;Text scale&#8221; 这里调整字幕大小(我调整为 3.8 )。
<br>
如果播放时提示错误，设置一下：
<br>
Preferences-Video 选择 &#8220;xv X11/Xv&#8221;
<br>
Preferences-Codecs&amp;demuxer 选择 &#8220;FFmpeg/libavcodec audio decoders&#8221;
<br>
<span style="font-weight: bold;">3、使用 Firefox 在线播放解决办法</span>
<br>
1) 内嵌播放，可以安装 <a  href="http://addons.mozine.cn/firefox/116/" target="_blank" class="postlink"><span style="color: #0000ff;">MediaWrap</span></a> 这个扩展。
<br>
2) 如果喜欢调用外部播放器播放，安装 <a  href="http://addons.mozine.cn/firefox/23/" target="_blank" class="postlink"><span style="color: #0000ff;">MediaPlayerConnectivity</span></a> 。
<br>
<span style="font-weight: bold;">4、Totem 播放 rmvb 没有声音</span>，<a  href="http://forum.ubuntu.org.cn/about38854.html#228045" target="_blank" class="postlink"><span style="color: #0000ff;">这里</span></a>给出了解决方法：
<br>
编辑 ~/.xine/catalog.cache 文件
<br>
找到
<br>
[/usr/lib/xine/plugins/1.1.4/xineplug_decode_real_audio.so]
<br>
把 decoder_priority 增加到 10
<br>
<span style="font-weight: bold;">四、其他软件安装</span>
<br>
<span style="font-weight: bold;">1) 安装aMule</span>
<br>
sudo apt-get install amule amule-utils
<br>
然后在Firefox里面关联ed2k链接
<br>
在地址栏输入about:config
<br>
新建&#8220;布尔&#8221;
<br>
名称为：network.protocol-handler.external.ed2k
<br>
值为：true
<br>
新建&#8220;字符串&#8221;
<br>
名称为：network.protocol-handler.app.ed2k
<br>
值为：/usr/bin/ed2k
<br>
ED2K服务器列表
<br>
<a  href="http://www.emule.org.cn/server.met" target="_blank">http://www.emule.org.cn/server.met</a>（VeryCD eMule）
<br>
<a  href="http://my.opera.com/youknowwho/homes/misc/server.met" target="_blank">http://my.opera.com/youknowwho/homes/misc/server.met</a>
<br>
<a  href="http://corpo.free.fr/server.met" target="_blank">http://corpo.free.fr/server.met</a>
<br>
KAD nodes.dat
<br>
<a  href="http://www.emule-inside.net/nodes.dat" target="_blank">http://www.emule-inside.net/nodes.dat</a>
<br>
<a  href="http://renololo1.free.fr/e/nodes.dat" target="_blank">http://renololo1.free.fr/e/nodes.dat</a>
<br>
<span style="font-weight: bold;">2) 安装编译工具</span>
<br>
如果你有编译源码的需要建议安装上 gcc,g++,make 等。
<br>
</span>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><span class="genmed"><strong>代码:</strong></span></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install build-essential</td>
        </tr>
    </tbody>
</table>
<span class="postbody">
<br>
<span style="font-weight: bold;">3) 安装IE for Linux</span>
<br>
首先要先下载Wine安装后才能装ie4linux的哦。
<br>
<a  href="http://www.tatanka.com.br/ies4linux/downloads/" target="_blank" class="postlink"><span style="color: #0000ff;">到这里下载</span></a>ies4linux后，在终端直接./ies4linux，然后回答几个简单的问题就搞定。
<br>
<span style="font-weight: bold;">4) 也可以通过 easywine 来安装 QQ、IE 这些东西。</span>
<br>
源里有EVA，也可以上QQ
<br>
安装方法，在终端输入
<br>
</span>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><span class="genmed"><strong>代码:</strong></span></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install eva</td>
        </tr>
    </tbody>
</table>
<span class="postbody">
<br>
<span style="font-weight: bold;">5) Web 服务器安装</span>
<br>
<a  href="http://www.osxcn.com/ubuntu/ubuntu-feisty-fawn-server.html" target="_blank" class="postlink"><span style="color: #0000ff;">Ubuntu 7.04 桌面服务器配置</span></a></span><span class="postbody"></span><span class="gensmall"><br><br>上一次由cheno于2007-9-15 周六, 9:10修改，总共修改了13次</span><img src ="http://www.cppblog.com/heidaizx/aggbug/43193.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2008-02-25 11:27 <a href="http://www.cppblog.com/heidaizx/articles/43193.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Rhythmbox播放mp3 wma问题，乱码问题</title><link>http://www.cppblog.com/heidaizx/articles/43162.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Sun, 24 Feb 2008 04:34:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/43162.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/43162.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/43162.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/43162.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/43162.html</trackback:ping><description><![CDATA[支持mp3，在终端：
<br>
sudo apt-get install gstreamer0.10-*plugins-ugly
<br>
支持wma，在终端：
<br>
sudo apt-get install gstreamer0.10-ffmpeg
<br><br>乱码解决：
<br>
<br>
1     sudo apt-get install python-mutagen
<br>
<br>
2     mid3iconv -e GBK *.mp3
<br>我的歌曲都在windows下的分区的E盘里，所以可以用mid3iconv -e GBK /media/sda6/歌曲/*.mp3命令转化格式<br><br>
<br><br>
<div style="text-align: left;">转贴于<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=76396&amp;sid=ad7f3aedc87cef753694378a9d4ec052">http://forum.ubuntu.org.cn/viewtopic.php?t=76396&amp;sid=ad7f3aedc87cef753694378a9d4ec052</a><br></div>
<br> <img src ="http://www.cppblog.com/heidaizx/aggbug/43162.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2008-02-24 12:34 <a href="http://www.cppblog.com/heidaizx/articles/43162.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>linux压缩文档简介</title><link>http://www.cppblog.com/heidaizx/articles/43133.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Sat, 23 Feb 2008 12:37:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/43133.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/43133.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/43133.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/43133.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/43133.html</trackback:ping><description><![CDATA[<div class="entryTop"> </div>
<span style="font-size: 14px; line-height: normal;">已经有很多的关于linux压缩文档的文章，而且写得非常好，不过我还是想再写一篇，一来是对自己所学知识的一次检验，二来希望能写得更加简单明了。
<br>
我很喜欢linux，自由开源软件也很精彩，只是初接触linux时，被它众多的压缩文档类型弄得不知所措而无从下手，如果一开始就学linux就不会觉
得有太大的困难，但是对于那些象我这样刚从windows转投linux怀抱的人来说，没有了zip和rar就找不着北了，所以我迫切地想了解和熟悉
linux压缩文档。
<br>
<br>
首先要弄清楚的一个概念，就是打包和压缩。打包就是将很多的目录和文件捆成一个文件包，这其中并没有压缩的过程。linux里很多压缩程序都是对单个文件进行压缩的，所以要打包好以后再用压缩程序将大文件压缩成小文件以方便传输。
<br>
<br>
linux世界里常用的打包程序就是tar，用tar打包的出来的文件叫tar包，后缀是.tar。tar的详细用法可以在终端用命令man tar来查看，命令的用法非常丰富，只是如果在这里一一罗列，就太繁琐了，我不想把它搞得太复杂。
<br>
<br>
我有很多的doc文档，想将它打成一个tar包，所以我在终端敲入了下面的这条指令
<br>
tar -cf abc.tar *.doc 将所有的doc文档打成一个名为abc.tar的包
<br>
-c (create) 建立新的压缩文档
<br>
-f (file) 指定压缩文档的名字
<br>
<br>
打包的过程好象什么也没有，机子到底在做了些什么？我很想看看在打包的过程中都处理了哪些文件，所以我给上面的打包命令加了一个参数，可以让我看到打包的过程
<br>
tar -cvf abc.tar *.doc
<br>
-v (verbose)详细列出处理的文件
<br>
<br>
现在我有一个名为abc.tar的包了，不过我刚才忘了将所有的jpg图片也一起打包了，如何将它们加到abc.tar包里呢？
<br>
tar -rf abc.tar *.jpg 将所有的jpg文档加入到名为abc.tar的包里
<br>
-r (append) 给已有的tar包增加文件
<br>
<br>
我把一幅名为pic01.jpg的文件重新编辑了，但是abc.tar里面的文件还是原来的没有改变，我希望把包里的文件也更新一下。
<br>
tar -uf abc.tar pic01.jpg
<br>
-u (updata) 更新已有的tar包文件
<br>
<br>
现在包也打好了，文件也更新了，我想看看包里现在有什么内容，所以敲进
<br>
tar -tf abc.tar
<br>
-t (list) 查看tar包文件的内容
<br>
<br>
我现在想把abc.tar这个包里的文件都解开来使用，那就用下面这条指令好了
<br>
tar -xf abc.tar
<br>
-x (extract) 解包
<br>
<br>
看着自己打好的包，心里挺高兴的，这下备份文件就方便多了，只是这个包的文件很多，体积挺大的，也太占地方了，我的硬盘还想多放一部我喜欢的电影，所以要把这个包压缩一下。
<br>
<br>值得高兴的是，tar已经考虑到我的这种需要，可以在打包或解包的同时可以调用压缩程序。现在我想调用老牌的压缩程序gzip来压缩我的打包文
件。gzip是GUN组织开发的一个压缩程序，它压缩的文档是以.gz结尾，与它相对的解压程序是ungzip。我在终端敲进了这样一条指令
<br>
tar -czvf abcd.tar.gz *.doc 把所有的doc文档打包，并调用gzip压缩，生成一个gzip压缩过的包，名字是abcd.tar.gz
<br>
-z (gzip,gunzip,ungzip)
<br>
这里顺便说一下，tar不仅可以调动gzip压缩，也可以调动它来解包。
<br>
tar -xzvf abcd.tar.gz
<br>
<br>
生的的包体积比原来的小多了，不过还是不太合我意，要是可以更小一点就好了。这难不倒我，我现在用bzip2程序来压缩它，bzip2的压缩能力比gzip好多了，它压缩出来的文件都有一个.bz2的后缀，相对的解压程序是bunzip2。
<br>
tar -cjvf abcd.tar.bz2 *.doc 把所有的doc文档打包，并调用bzip2压缩，生成一个bzip2压缩过的包，名字是abcd.tar.bz2
<br>
-j (bzip2,bunzip2)
<br>
同样道理，解包就用
<br>
tar -xjvf abcd.tar.bz2
<br>
<br>
还有一个压缩程序就是compress，它压缩出来的文档有一个后缀.Z，相对的解压程序是uncompress，当然，我也可以用tar来调用它
<br>
tar -cZf abcd.tar.Z 把所有的doc文档打包，并调用compress压缩，生成一个compress压缩过的包，名字是abcd.tar.Z
<br>
-Z (compress,uncompress)
<br>
同样道理，解包就用
<br>
tar -xZf abcd.tar.Z
<br>
<br>
我现在的电脑里有好几个压缩包了，它们分别是abc.tar, abcd.tar.gz, abcd.tar.bz2, abcd.tar.Z, 我现在可以放心地把压缩包收好备份了，需要用的时候再把它们解开来，这一点都不难。
<br>
没打包的压缩文件后缀一般就是.gz, .bz2, .Z，这和我上面用的三个压缩程序是一样的，不同的只是没有.tar而已，压缩和解压就直接用相关的程序。
<br>
<br>
linux也提供对zip压缩的支持，压缩的程序是zip，解压的程序是unzip.
<br>
zip abc.zip *.doc 把所有doc文档压缩成名为abc.zip的压缩包
<br>
unzip abc.zip 解zip包
<br>
<br>
rar的话就要麻烦一点，要上网去安装一个rar for linux的软件，安装好以后会有rar和unrar两个程序。
<br>
rar a abcd *.doc 把所有doc文档压缩成rar包
<br>
rar e abcd.rar 解rar包
<br>
<br>
linux下的压缩文档其实并没有想象中的那样复杂。复杂其实就是很多的简单。<br><br>转贴于：<a  href="http://forum.ubuntu.org.cn/weblog_entry.php?e=3020&amp;tb=1&amp;sid=ce10aaf32439f770bfc2d57c1cb0956a">http://forum.ubuntu.org.cn/weblog_entry.php?e=3020&amp;tb=1&amp;sid=ce10aaf32439f770bfc2d57c1cb0956a</a><br>
</span><img src ="http://www.cppblog.com/heidaizx/aggbug/43133.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2008-02-23 20:37 <a href="http://www.cppblog.com/heidaizx/articles/43133.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>gdb和g++的简单使用</title><link>http://www.cppblog.com/heidaizx/articles/33582.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Fri, 05 Oct 2007 15:51:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/33582.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/33582.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/33582.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/33582.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/33582.html</trackback:ping><description><![CDATA[<meta http-equiv="CONTENT-TYPE" content="text/html; charset="utf-8"">
<title></title>
<meta name="GENERATOR" content="OpenOffice.org 2.2  (Unix)">
<meta name="AUTHOR" content="heidaizx">
<meta name="CREATED" content="20071005;21534700">
<meta name="CHANGEDBY" content="heidaizx">
<meta name="CHANGED" content="20071005;23351900">
<style type="text/css">
<!--
@page { size: 21cm 29.7cm; margin: 2cm }
P { margin-bottom: 0.21cm }
TD P { margin-bottom: 0cm }
-->
</style>
<p style="margin-bottom: 0cm;">在编译之前我们需要在系统里安装<font face="文鼎PL细上海宋Uni, serif">G++
GCC</font>，它们就是<font face="文鼎PL细上海宋Uni, serif">Linux</font>下的<font face="文鼎PL细上海宋Uni, serif">C++/C</font>的编译器。代码如下
</p>
<center>
<table border="0" cellpadding="3" cellspacing="0" width="90%">
    <col width="256*">
    <tbody>
        <tr>
            <td width="100%">
            <p><strong> 代码<font face="文鼎PL细上海宋Uni, serif">:</font></strong> </p>
            </td>
        </tr>
        <tr>
            <td width="100%">
            <p><font face="文鼎PL细上海宋Uni, serif"><br>sudo apt-get
            install build-essential </font>
            </p>
            </td>
        </tr>
    </tbody>
</table>
</center>
<p style="margin-bottom: 0cm;"><font face="文鼎PL细上海宋Uni, serif"><br></font>好，现在我们在文本编辑器里写一个<font face="文鼎PL细上海宋Uni, serif">C</font>的简单的程序（好像所有学习<font face="文鼎PL细上海宋Uni, serif">C</font>或者<font face="文鼎PL细上海宋Uni, serif">C++</font>的书都会出现）
</p>
<center>
<table border="0" cellpadding="3" cellspacing="0" width="90%">
    <col width="256*">
    <tbody>
        <tr>
            <td width="100%">
            <p><strong> 代码<font face="文鼎PL细上海宋Uni, serif">:</font></strong> </p>
            </td>
        </tr>
        <tr>
            <td width="100%">
            <p><font face="文鼎PL细上海宋Uni, serif"><br></font>＃<font face="文鼎PL细上海宋Uni, serif">include
            &lt;stdio.h&gt; <br>int main() <br>{ <br>&nbsp; &nbsp;
            printf("Hello,World!\n"); <br>&nbsp; &nbsp; return 0;
            <br>} </font>
            </p>
            </td>
        </tr>
    </tbody>
</table>
</center>
<p style="margin-bottom: 0cm;"><font face="文鼎PL细上海宋Uni, serif"><br></font>现在存盘为<font face="文鼎PL细上海宋Uni, serif">Hello.c</font>，打开你的终端，并在文件当前目录输入：
</p>
<center>
<table border="0" cellpadding="3" cellspacing="0" width="90%">
    <col width="256*">
    <tbody>
        <tr>
            <td width="100%">
            <p><strong> 代码<font face="文鼎PL细上海宋Uni, serif">:</font></strong> </p>
            </td>
        </tr>
        <tr>
            <td width="100%">
            <p><font face="文鼎PL细上海宋Uni, serif"><br>gcc Hello.c -o
            hello&nbsp; &nbsp; </font>
            </p>
            </td>
        </tr>
    </tbody>
</table>
</center>
<p style="margin-bottom: 0cm;"><font face="文鼎PL细上海宋Uni, serif"><br></font>编译时可能会出现如下警告：<font face="文鼎PL细上海宋Uni, serif">no
newline at and of file </font>，只有在文件结尾添加一个新行就好了。
<font face="文鼎PL细上海宋Uni, serif"><br></font>然后在终端中输入
<font face="文鼎PL细上海宋Uni, serif">./hello
</font>，你就能在终端中看到程序运行结果了。
<font face="文鼎PL细上海宋Uni, serif"><br><br></font>下面来说下<font face="文鼎PL细上海宋Uni, serif">C++</font>是如何编译的
<font face="文鼎PL细上海宋Uni, serif"><br></font>写程序（不用我多说了吧）
</p>
<center>
<table border="0" cellpadding="3" cellspacing="0" width="90%">
    <col width="256*">
    <tbody>
        <tr>
            <td width="100%">
            <p><strong> 代码<font face="文鼎PL细上海宋Uni, serif">:</font></strong> </p>
            </td>
        </tr>
        <tr>
            <td width="100%">
            <p><font face="文鼎PL细上海宋Uni, serif"><br>#include
            &lt;iostream&gt; <br>using namespace std; <br>int main() <br>{ <br>&nbsp;
            &nbsp; cout&lt;&lt;"Hello,World!\n"&lt;&lt;endl; <br>&nbsp;
            &nbsp; return 0; <br>} </font>
            </p>
            </td>
        </tr>
    </tbody>
</table>
</center>
<p style="margin-bottom: 0cm;"><font face="文鼎PL细上海宋Uni, serif"><br></font>存盘为<font face="文鼎PL细上海宋Uni, serif">Hello.cpp
<br></font>使用<font face="文鼎PL细上海宋Uni, serif">gcc</font>编译？？？
不对，这里我们使用<font face="文鼎PL细上海宋Uni, serif">g++</font>来编译<font face="文鼎PL细上海宋Uni, serif">C++</font>程序
</p>
<center>
<table border="0" cellpadding="3" cellspacing="0" width="90%">
    <col width="256*">
    <tbody>
        <tr>
            <td width="100%">
            <p><strong> 代码<font face="文鼎PL细上海宋Uni, serif">:</font></strong> </p>
            </td>
        </tr>
        <tr>
            <td width="100%">
            <p><font face="文鼎PL细上海宋Uni, serif"><br>g++ Hello.cpp
            -o hello </font>
            </p>
            </td>
        </tr>
    </tbody>
</table>
</center>
<p style="margin-bottom: 0cm;"><font face="文鼎PL细上海宋Uni, serif"><br><br></font>编译多个文件我们怎么办？？？
来看下面出了三个文件<font face="文鼎PL细上海宋Uni, serif">Hello.h,
Hello.cpp, MyFirst.cpp </font>
</p>
<center>
<table border="0" cellpadding="3" cellspacing="0" width="90%">
    <col width="256*">
    <tbody>
        <tr>
            <td width="100%">
            <p><strong> 代码<font face="文鼎PL细上海宋Uni, serif">:</font></strong> </p>
            </td>
        </tr>
        <tr>
            <td width="100%">
            <p><font face="文鼎PL细上海宋Uni, serif"><br>//file_NO1:Hello.h
            <br>class Hello { <br>&nbsp; &nbsp; &nbsp;Hello(); <br>&nbsp; &nbsp;
            &nbsp;void Display(); <br>} <br>//file_NO2:Hello.cpp <br>#include
            &lt;iostream&gt; <br>#include "Hello.h" <br>using
            namespace std; <br>Hello::Hello() <br>{ <br>} <br>Hello::Display()
            <br>{ <br>&nbsp; &nbsp; cout&lt;&lt;"Hello,World!\n"&lt;&lt;endl;
            <br>} <br>//file_NO3:MyFirst.cpp <br>#include &lt;iostram&gt;
            <br>#include "Hello.cpp" <br>int main() <br>{ <br>&nbsp;
            &nbsp; Hello theHello; <br>&nbsp; &nbsp; theHello-&gt;Display();
            <br>&nbsp; &nbsp; return 0; <br>} </font>
            </p>
            </td>
        </tr>
    </tbody>
</table>
</center>
<p style="margin-bottom: 0cm;"><font face="文鼎PL细上海宋Uni, serif"><br></font>在<font face="文鼎PL细上海宋Uni, serif">g++</font>中有一个参数<font face="文鼎PL细上海宋Uni, serif">-c
</font>可以只编译不连接，那么我们就可以按如下顺序编译文件，
</p>
<center>
<table border="0" cellpadding="3" cellspacing="0" width="90%">
    <col width="256*">
    <tbody>
        <tr>
            <td width="100%">
            <p><strong> 代码<font face="文鼎PL细上海宋Uni, serif">:</font></strong> </p>
            </td>
        </tr>
        <tr>
            <td width="100%">
            <p><font face="文鼎PL细上海宋Uni, serif"><br>g++ -c
            Hello.cpp -o Hello.o <br>g++ -c MyFirst.cpp -o MyFirst.o <br>g++
            MyFirst.o hello.o -o MyFirst </font>
            </p>
            </td>
        </tr>
    </tbody>
</table>
</center>
<p><font face="文鼎PL细上海宋Uni, serif"><br></font>你是否会问，如果是一个项目的话，可能会有上百个文件，这样的编译法，人不是要累死在电脑前吗，或者等到你编译成功了，岂不是头发都白了，呵呵，所以我们要把上述的编译过程写进以下一个文本文件中：
<font face="文鼎PL细上海宋Uni, serif"><br>Linux</font>下称之为<font face="文鼎PL细上海宋Uni, serif">makefile
<br>[code] <br>#</font>这里可以写一些文件的说明 <font face="文鼎PL细上海宋Uni, serif"><br>MyFirst:
MyFirst.o hello.o <br>g++ MyFirst.o hello.o -o MyFirst
<br>Hello.o:Hello.cpp <br>g++ -c Hello.cpp -o Hello.o
<br>MyFirst.o:MyFirst.cpp <br>g++ -c MyFirst.cpp -o MyFirst.o
<br>[\code] <br></font>存盘为<font face="文鼎PL细上海宋Uni, serif">MyFirst</font>，在终端输入：<font face="文鼎PL细上海宋Uni, serif">make
MyFist
</font>，程序出现了错误可是所有程序员共同的敌人，在编写程序时我们应该尽量的去避免错误的出现，不过编写的时候再怎么都不可避免的出现这样那样的错误，对程序
进行必要的调试是一个好主意，那我们怎么来调试程序呢，看下面：
<font face="文鼎PL细上海宋Uni, serif"><br>[code] <br>gdb ./</font>文件名
<font face="文鼎PL细上海宋Uni, serif">////////////////</font>在这里我修改下要想下面可以调试，在上面编译的<font face="文鼎PL细上海宋Uni, serif">						</font>时候必须加上参数<font face="文鼎PL细上海宋Uni, serif">g</font>，<font face="文鼎PL细上海宋Uni, serif">g++
-g hello.cpp -o hello<br>[/code]
<br></font>以下为调试状态下的可以用到的命令（可以仅输入单词的输入，如<font face="文鼎PL细上海宋Uni, serif">break</font>可简为<font face="文鼎PL细上海宋Uni, serif">b</font>），尖括号中为说明
<font face="文鼎PL细上海宋Uni, serif"><br>[code] <br>list
&lt;</font>显示源代码<font face="文鼎PL细上海宋Uni, serif">&gt;
<br>break </font>行号 <font face="文鼎PL细上海宋Uni, serif">&lt;</font>设置断点<font face="文鼎PL细上海宋Uni, serif">&gt;
<br>run &lt;</font>运行程序<font face="文鼎PL细上海宋Uni, serif">&gt;
<br>continue &lt;</font>继续从断点处执行<font face="文鼎PL细上海宋Uni, serif">&gt;
<br>print </font>变量 <font face="文鼎PL细上海宋Uni, serif">&lt;</font>调试时查看变量的值<font face="文鼎PL细上海宋Uni, serif">&gt;
<br>del </font>行号 <font face="文鼎PL细上海宋Uni, serif">&lt;</font>删除断点<font face="文鼎PL细上海宋Uni, serif">&gt;
<br>step &lt;</font>单步执行，可跟踪到函数内部<font face="文鼎PL细上海宋Uni, serif">&gt;
<br>next &lt;</font>单步执行，不可跟踪到函数内部<font face="文鼎PL细上海宋Uni, serif">&gt;
<br>quit &lt;</font>退出<font face="文鼎PL细上海宋Uni, serif">&gt;
<br>[/code] </font>
</p>
<br><img src ="http://www.cppblog.com/heidaizx/aggbug/33582.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-05 23:51 <a href="http://www.cppblog.com/heidaizx/articles/33582.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>解决scim于open-office冲突的问题</title><link>http://www.cppblog.com/heidaizx/articles/33520.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Fri, 05 Oct 2007 09:56:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/33520.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/33520.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/33520.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/33520.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/33520.html</trackback:ping><description><![CDATA[转贴于：<a href="http://forum.ubuntu.org.cn/weblog_entry.php?e=4396&amp;sid=3824aa1cc14ea5a4d322e0b9488cde32">http://forum.ubuntu.org.cn/weblog_entry.php?e=4396&amp;sid=3824aa1cc14ea5a4d322e0b9488cde32</a><br><br>
方法编辑/etc/gtk-2.0/gtk.immodules
<br>
把下面两行注释掉。
<br>
代码:
<br>
<br>
[code]"/usr/lib/gtk-2.0/2.4.0/immodules/im-scim.so"
<br>
"scim" "SCIM Input Method" "scim" "/usr/share/locale" ""
<br><br>解决eva不能输入中文的问题<br>将qti-mm改为xim<br><br><br> <img src ="http://www.cppblog.com/heidaizx/aggbug/33520.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-05 17:56 <a href="http://www.cppblog.com/heidaizx/articles/33520.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>linux编译c/c++</title><link>http://www.cppblog.com/heidaizx/articles/33518.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Fri, 05 Oct 2007 09:19:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/33518.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/33518.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/33518.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/33518.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/33518.html</trackback:ping><description><![CDATA[转贴于：<a  href="http://forum.ubuntu.org.cn/viewtopic.php?t=38309">http://forum.ubuntu.org.cn/viewtopic.php?t=38309</a><br><br>在编译之前我们需要在系统里安装G++ GCC，它们就是Linux下的C++/C的编译器。代码如下
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">
            <br>
            sudo apt-get install build-essential
            <br>
            </td>
        </tr>
    </tbody>
</table>
<br>
好，现在我们在文本编辑器里写一个C的简单的程序（好像所有学习C或者C++的书都会出现）
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">
            <br>
            ＃include &lt;stdio.h&gt;
            <br>
            int main()
            <br>
            {
            <br>
            &nbsp; &nbsp; printf("Hello,World!\n");
            <br>
            &nbsp; &nbsp; return 0;
            <br>
            }
            <br>
            </td>
        </tr>
    </tbody>
</table>
<br>
现在存盘为Hello.c，打开你的终端，并在文件当前目录输入：
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">
            <br>
            gcc Hello.c -o hello&nbsp; &nbsp;
            <br>
            </td>
        </tr>
    </tbody>
</table>
<br>
编译时可能会出现如下警告：no newline at and of file ，只有在文件结尾添加一个新行就好了。
<br>
然后在终端中输入 ./hello ，你就能在终端中看到程序运行结果了。
<br>
<br>
下面来说下C++是如何编译的
<br>
写程序（不用我多说了吧）
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">
            <br>
            #include &lt;iostream&gt;
            <br>
            using namespace std;
            <br>
            int main()
            <br>
            {
            <br>
            &nbsp; &nbsp; cout&lt;&lt;"Hello,World!\n"&lt;&lt;endl;
            <br>
            &nbsp; &nbsp; return 0;
            <br>
            }
            <br>
            </td>
        </tr>
    </tbody>
</table>
<br>
存盘为Hello.cpp
<br>
使用gcc编译？？？ 不对，这里我们使用g++来编译C++程序
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">
            <br>
            g++ Hello.cpp -o hello
            <br>
            </td>
        </tr>
    </tbody>
</table>
<br>
<br>
编译多个文件我们怎么办？？？ 来看下面出了三个文件Hello.h, Hello.cpp, MyFirst.cpp
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">
            <br>
            //file_NO1:Hello.h
            <br>
            class Hello {
            <br>
            &nbsp; &nbsp; &nbsp;Hello();
            <br>
            &nbsp; &nbsp; &nbsp;void Display();
            <br>
            }
            <br>
            //file_NO2:Hello.cpp
            <br>
            #include &lt;iostream&gt;
            <br>
            #include "Hello.h"
            <br>
            using namespace std;
            <br>
            Hello::Hello()
            <br>
            {
            <br>
            }
            <br>
            Hello::Display()
            <br>
            {
            <br>
            &nbsp; &nbsp; cout&lt;&lt;"Hello,World!\n"&lt;&lt;endl;
            <br>
            }
            <br>
            //file_NO3:MyFirst.cpp
            <br>
            #include &lt;iostram&gt;
            <br>
            #include "Hello.cpp"
            <br>
            int main()
            <br>
            {
            <br>
            &nbsp; &nbsp; Hello theHello;
            <br>
            &nbsp; &nbsp; theHello-&gt;Display();
            <br>
            &nbsp; &nbsp; return 0;
            <br>
            }
            <br>
            </td>
        </tr>
    </tbody>
</table>
<br>
在g++中有一个参数-c 可以只编译不连接，那么我们就可以按如下顺序编译文件，
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">
            <br>
            g++ -c Hello.cpp -o Hello.o
            <br>
            g++ -c MyFirst.cpp -o MyFirst.o
            <br>
            g++ MyFirst.o hello.o -o MyFirst
            <br>
            </td>
        </tr>
    </tbody>
</table>
<br>
你是否会问，如果是一个项目的话，可能会有上百个文件，这样的编译法，人不是要累死在电脑前吗，或者等到你编译成功了，岂不是头发都白了，呵呵，所以我们要把上述的编译过程写进以下一个文本文件中：
<br>
Linux下称之为makefile
<br>
[code]
<br>
#这里可以写一些文件的说明
<br>
MyFirst: MyFirst.o hello.o
<br>
g++ MyFirst.o hello.o -o MyFirst
<br>
Hello.o:Hello.cpp
<br>
g++ -c Hello.cpp -o Hello.o
<br>
MyFirst.o:MyFirst.cpp
<br>
g++ -c MyFirst.cpp -o MyFirst.o
<br>
[\code]
<br>
存盘为MyFirst，在终端输入：make MyFist
，程序出现了错误可是所有程序员共同的敌人，在编写程序时我们应该尽量的去避免错误的出现，不过编写的时候再怎么都不可避免的出现这样那样的错误，对程序
进行必要的调试是一个好主意，那我们怎么来调试程序呢，看下面：
<br>
[code]
<br>
gdb  ./文件名
<br>
[/code]
<br>
以下为调试状态下的可以用到的命令（可以仅输入单词的输入，如break可简为b），尖括号中为说明
<br>
[code]
<br>
list &lt;显示源代码&gt;
<br>
break  行号 &lt;设置断点&gt;
<br>
run &lt;运行程序&gt;
<br>
continue &lt;继续从断点处执行&gt;
<br>
print 变量 &lt;调试时查看变量的值&gt;
<br>
del 行号 &lt;删除断点&gt;
<br>
step &lt;单步执行，可跟踪到函数内部&gt;
<br>
next &lt;单步执行，不可跟踪到函数内部&gt;
<br>
quit &lt;退出&gt;
<br>
[/code]
<br>
<br><br><img src ="http://www.cppblog.com/heidaizx/aggbug/33518.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-05 17:19 <a href="http://www.cppblog.com/heidaizx/articles/33518.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[推荐]速度最快的电驴——mldonkey 07/08/21 更新</title><link>http://www.cppblog.com/heidaizx/articles/33457.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Thu, 04 Oct 2007 13:58:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/33457.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/33457.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/33457.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/33457.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/33457.html</trackback:ping><description><![CDATA[转贴于：<a  href="http://forum.ubuntu.org.cn/viewtopic.php?t=42337">http://forum.ubuntu.org.cn/viewtopic.php?t=42337</a><br><br>主页： <a href="http://mldonkey.sourceforge.net/Main_Page" target="_blank">http://mldonkey.sourceforge.net/Main_Page</a>
<br>
图形界面sancho主页： <a href="http://sancho-gui.sourceforge.net/" target="_blank">http://sancho-gui.sourceforge.net/</a>
<br>
<br>
优点：实在太强大了，支持各种下载协议，包括ed2k、bittorrent、http、ftp&#8230;&#8230;，而且在继续扩充。
<br>
我主要说一下ed2k功能，它有一个最最奇特的地方就是，可以同时连接任意多个emule服务器，而不像其他我所用过的emule-mod那样只能连一
个。因此，其速度可以快好几倍（可以很容易的达到带宽上限哦，是我所用过的最快的电驴）。另外，他还有众多图形界面（其本身只是一个命令行的东西），可以
用浏览器控制（推荐），甚至telnet。而sancho是所有图形界面中最优秀的一个（基于java，功能最复杂，你一定有眩晕的感觉）。
<br>
<br>
缺点：那就是设置有些复杂，而且都是英文的，但有一个比较好的设计就是，把鼠标移到每个选项上会有英文提示。
<br>
<br>
安装：
<br>
1. sancho:
<br>
图形界面sancho地址：
<br>
<a href="http://sancho-gui.sourceforge.net/files/zrdaebj5bjqa/sancho-0.9.4-58-linux-gtk-java.sh" target="_blank">http://sancho-gui.sourceforge.net/files/zrdaebj5bjqa/sancho-0.9.4-58-linux-gtk-java.sh</a>
<br>
这个是需要系统安装java的，推荐，速度快。如果你不装java，那么请下载另外一个自带java的版本。
<br>
下载的sancho是一个脚本，请不要用编辑器打开！先右键单击他，找到属性-权限部分，钩上&#8220;可执行&#8221;，然后双击他并选择用终端运行。
<br>
<br>
2. mldonkey:
<br>
源里有，但是版本低。我推荐直接在主页下载可执行压缩包。地址： <a href="http://sourceforge.net/project/showfiles.php?group_id=156414&amp;package_id=174487" target="_blank">http://sourceforge.net/project/showfiles.php?group_id=156414&amp;package_id=174487</a> 页面下的
<br>
<a href="http://downloads.sourceforge.net/mldonkey/mldonkey-2.9.0.static.i386-Linux_glibc-2.3.2.tar.bz2?modtime=1185537554&amp;big_mirror=0" target="_blank">http://downloads.sourceforge.net/mldonkey/mldonkey-2.9.0.static.i386-Linux_glibc-2.3.2.tar.bz2?modtime=1185537554&amp;big_mirror=0</a>
<br>
下载完毕后，解压mldonkey，先运行mldonkey文件夹下的mlnet（鼠标双击选择用运行，或者终端下执行
./mlnet），然后运行sancho文件夹下的sancho（鼠标双击选择运行或者命令行下./sancho），刚开始会有配置向导，照做即可。其实
在sancho里面可以设置mlnet的运行路径，在首选项-&gt;sancho:主要-&gt;可选的可执行core
那里填上你的mlnet路径。这样以后就可以直接启动sancho了，不必分两步进行。
<br>
<br>
在适当设置过之后，所有的server都可以是high id，我这里是通过端口设置实现的（adsl路由上网）。如果你有windows下的emule，最好把他们的端口(tcp的)设成一样。有些路由器有记忆功能，导致windows下的端口在重启后仍然保留。
<br>
<br>
初步设置：
<br>
1. 先把bandwidth那里按照实际情况改一下，根据实际情况修改下载最大带宽和最大连接数，后者可以调至最高924，最大上传速率默认即可，如果感觉慢，可以适当调高，最多20吧。一般你分的再多也只有几K到几十K，很省的<img src="http://forum.ubuntu.org.cn/images/smiles/icon_biggrin.gif" alt="Very happy" border="0">。
然后在all那里找到 max connected servers，修改大一点，比如50，当然最后稳定保留的只有几个而已；另外把
Ed2k-force_client_high_id钩上。最后，如果你需要修改下载目录和temp目录的话，修改
~/.mldonkey/downloads.ini，找到&#8220;section: path&#8221;，然后修改第一段和倒数第二段的路径，如修改成：
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>引用:</strong></td>
        </tr>
        <tr>
            <td class="quote">(* The directory where temporary files should be put *)
            <br>
            temp_directory = "/media/disk/temp"</td>
        </tr>
    </tbody>
</table>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>引用:</strong></td>
        </tr>
        <tr>
            <td class="quote">{     dirname = "/media/disk/downloads"
            <br>
            strategy = incoming_files
            <br>
            priority = 0
            <br>
            };</td>
        </tr>
    </tbody>
</table>
这些路径请改成你想要的目录。
<br>
<br>
2.
安装firefox扩展，以关联ed2k、bt等。解压后的mldoneky-distrib-xxx/ed2k_mozilla/文件夹下有个
mldonkey_protocol_handler-xx.xpi，把它拖到fx窗口选择安装。重启后就可以双击MLdonkey Protocal
Handler这个扩展设置关联了，顺便说一下，这个扩展也可以关联到amule。
<br>
<br>
具体使用方法（像如何导入emule下载的文件等）还请参见他们的主页文档（英文），自己瞎摸索当然也是可以的。 <img src="http://forum.ubuntu.org.cn/images/smiles/icon_biggrin.gif" alt="Very happy" border="0">
<br>
<br>
p.s. 你也可以用浏览器控制和观察mldonkey，地址是 <a href="http://localhost:4080/" target="_blank">http://localhost:4080/</a>
<br>
其实我现在比较推崇用这个，不占额外资源（不必一直开着客户端，毕竟java的东西会占不少内存和cpu），设置一样方便甚至更强——前提是你懂基本英文，不懂的可以查stardict。
<br>
<br>
如果想用中文界面的sancho，我汉化了一个（如果是最近从官方下载的sancho，那么就已经包含了我的汉化文件），请参见： <a href="http://forum.ubuntu.org.cn/viewtopic.php?t=46105" target="_blank">http://forum.ubuntu.org.cn/viewtopic.php?t=46105</a>
<br><br><img src ="http://www.cppblog.com/heidaizx/aggbug/33457.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-04 21:58 <a href="http://www.cppblog.com/heidaizx/articles/33457.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>IEs4linux+微软雅黑效果图(07.05.07更新，解决中文输入＋乱码)</title><link>http://www.cppblog.com/heidaizx/articles/33455.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Thu, 04 Oct 2007 13:56:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/33455.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/33455.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/33455.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/33455.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/33455.html</trackback:ping><description><![CDATA[转贴于：<a  href="http://forum.ubuntu.org.cn/viewtopic.php?t=52397&amp;highlight=">http://forum.ubuntu.org.cn/viewtopic.php?t=52397&amp;highlight=</a><br><br><br>折腾了一天终于折腾好了，对话框按钮和输入中文问题也解决了。
<br>
<br>
安装方法很简单，见
<br>
<br>
<a href="http://www.tatanka.com.br/ies4linux/page/Installation:Ubuntu" target="_blank" class="postlink">http://www.tatanka.com.br/ies4linux/page/Installation:Ubuntu</a>
<br>
<br>
安装之后，下载雅黑字体文件，copy到目录
<br>
~/.ies4linux/ie6/drive_c/windows/fonts
<br>
<br>
这时运行桌面上的IE6图标，使用后有2个问题：
<br>
1.不能用scim输入中文
<br>
2.对话框的按钮文字是乱码
<br>
<br>
解决办法
<br>
1.
<br>
去掉scim设置的 前端－&gt;全局设置－&gt;将预编辑字符串嵌入到客户端中 前的勾
<br>
去掉scim设置的 面板-&gt;gtk-&gt;嵌入式候选词标
<br>
<br>
见
<br>
<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=51420&amp;postdays=0&amp;postorder=asc&amp;start=0" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=51420&amp;postdays=0&amp;postorder=asc&amp;start=0</a>
<br>
<br>
2.
<br>
到windows下copy一个simsun.ttc放到
<br>
~/.ies4linux/ie6/drive_c/windows/fonts
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">
            <br>
            gedit ~/.ies4linux/ie6/system.reg
            <br>
            </td>
        </tr>
    </tbody>
</table>
<br>
<br>
找到这两行
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">
            <br>
            &nbsp;"MS Sans Serif"="sserife.fon"
            <br>
            &nbsp;"MS Serif"="serife.fon"
            <br>
            </td>
        </tr>
    </tbody>
</table>
<br>
<br>
替换为
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">
            <br>
            "MS Sans Serif"="SIMSUN.TTC"
            <br>
            &nbsp;"MS Serif"="SIMSUN.TTC"
            <br>
            </td>
        </tr>
    </tbody>
</table>
<br>
<br>
另外修改
<br>
其中如下部分
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">
            <br>
            [Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes] 1144897563
            <br>
            "MS Shell Dlg"="SimSun"
            <br>
            "MS Shell Dlg 2"="SimSun"
            <br>
            </td>
        </tr>
    </tbody>
</table>
<br>
<br>
保存退出，OK了
<br>
<br>
见
<br>
<a href="http://forum.ubuntu.org.cn/viewtopic.php?p=283867#283867" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?p=283867#283867</a>
<br>
<a href="http://forum.ubuntu.org.cn/viewtopic.php?p=283865#283865" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?p=283865#283865</a>
<br><br><img src ="http://www.cppblog.com/heidaizx/aggbug/33455.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-04 21:56 <a href="http://www.cppblog.com/heidaizx/articles/33455.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ubuntu7.04下ATIX300（驱动＋XGL＋Beryl） 的安装心得分享 A卡用户可以参考</title><link>http://www.cppblog.com/heidaizx/articles/33453.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Thu, 04 Oct 2007 13:51:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/33453.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/33453.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/33453.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/33453.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/33453.html</trackback:ping><description><![CDATA[转贴于<a  href="http://forum.ubuntu.org.cn/about55521.html&amp;sid=d08793b86b21338d426688919242d095">http://forum.ubuntu.org.cn/about55521.html&amp;sid=d08793b86b21338d426688919242d095</a><br>主要参考了：
<br>
<a href="http://wiki.beryl-project.org/wiki/Install_Beryl_on_Ubuntu_Feisty_with_XGL" target="_blank">http://wiki.beryl-project.org/wiki/Install_Beryl_on_Ubuntu_Feisty_with_XGL</a>
<br>
<a href="http://lhansen.blogspot.com/2006/10/3d-desktop-beryl-and-xgl-on-ubuntu-edgy.html" target="_blank">http://lhansen.blogspot.com/2006/10/3d-desktop-beryl-and-xgl-on-ubuntu-edgy.html</a>
<br>
感觉上和610的区别不大，我也是个新人，有什么不对的地方希望前辈们予以指正
<br>
<br>
1.添加源与获取钥匙
<br>
<br>
在终端里输入
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo gedit /etc/apt/sources.list </td>
        </tr>
    </tbody>
</table>
<br>
添加下面的源
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">deb http://ubuntu.beryl-project.org/ feisty main</td>
        </tr>
    </tbody>
</table>
<br>
获取钥匙
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -</td>
        </tr>
    </tbody>
</table>
<br>
更新
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get update</td>
        </tr>
    </tbody>
</table>
<br>
<br>
2.下载相关的软件
<br>
<br>
系统-&gt;系统管理-&gt;新立得软件包管理器 ，搜索并标记安装以下软件包
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">xserver-xgl</td>
        </tr>
    </tbody>
</table>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">emerald-themes</td>
        </tr>
    </tbody>
</table>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">beryl&nbsp; </td>
        </tr>
    </tbody>
</table>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">xorg-driver-fglrx</td>
        </tr>
    </tbody>
</table>
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">beryl-manager</td>
        </tr>
    </tbody>
</table>
<br>
<br>
3.安装显卡驱动
<br>
<br>
没有置顶贴里那么复杂，但是我觉得也还好用
<br>
ALT＋F2输入
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">gksudo gedit /etc/X11/xorg.conf</td>
        </tr>
    </tbody>
</table>
<br>
将 "ati"（或者 "radeon"，"vesa"）修改成"fglrx"，类似下面这个样子就可以了
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">Section "Device"
            <br>
            Identifier "ATI Technologies, Inc. M22 [Radeon Mobility M300]"
            <br>
            Driver "fglrx"
            <br>
            BusID "PCI:1:0:0"
            <br>
            EndSection</td>
        </tr>
    </tbody>
</table>
<br>
然后在末尾添加这样一段
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">Section "Extensions"
            <br>
            Option "Composite" "false"
            <br>
            EndSection</td>
        </tr>
    </tbody>
</table>
<br>
<br>
4.使XGL可运行
<br>
<br>
ALT＋F2
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">gksudo gedit /usr/bin/startxgl</td>
        </tr>
    </tbody>
</table>
<br>
在新文件中添加以下这段脚本并保存退出
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">#!/bin/sh
            <br>
            Xgl :1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer &amp;
            <br>
            DISPLAY=:1
            <br>
            cookie="$(xauth -i nextract - :0 | cut -d ' ' -f 9)"
            <br>
            xauth -i add :1 . "$cookie"
            <br>
            exec dbus-launch --exit-with-session gnome-session</td>
        </tr>
    </tbody>
</table>
<br>
<br>
接着按ALT＋F2输入
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">gksudo nautilus /usr/bin</td>
        </tr>
    </tbody>
</table>
<br>
找到startxgl 右键属性-&gt;权限-&gt;勾选&#8220;允许以程序执行文件&#8221;
<br>
<br>
<br>
接着ALT＋F2输入
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">gksudo gedit /usr/share/xsessions/xgl.desktop</td>
        </tr>
    </tbody>
</table>
<br>
添加以下一段
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">
            <br>
            &nbsp; &nbsp; [Desktop Entry]
            <br>
            &nbsp; &nbsp; Encoding=UTF-8
            <br>
            &nbsp; &nbsp; Name=Xgl
            <br>
            &nbsp; &nbsp; Comment=Start an Xgl Session
            <br>
            &nbsp; &nbsp; Exec=/usr/bin/startxgl
            <br>
            &nbsp; &nbsp; Icon=
            <br>
            &nbsp; &nbsp; Type=Application</td>
        </tr>
    </tbody>
</table>
<br>
<br>
5.Downgrading beryl-core to 0.2.0
<br>
<br>
在终端里运行
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">gksudo gedit /etc/apt/preferences</td>
        </tr>
    </tbody>
</table>
<br>
<br>
输入以下内容并保存
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">Package: *
            <br>
            Pin: release o=lupine
            <br>
            Pin-Priority: 1000</td>
        </tr>
    </tbody>
</table>
<br>
<br>
然后
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get update</td>
        </tr>
    </tbody>
</table>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install beryl-core=0.2.0~0beryl1</td>
        </tr>
    </tbody>
</table>
<br>
<br>
接下来，重启，在登录界面选择会话成XGL,你可以顺便检查一下你的显卡驱动,在终端里输入:
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">fglrxinfo</td>
        </tr>
    </tbody>
</table>
<br>
<br>
要是像下面这样,就基本没什么问题了
<br>
hp@hp-desktop:~$ fglrxinfo
<br>
display: :0.0  screen: 0
<br>
OpenGL vendor string: ATI Technologies Inc.
<br>
OpenGL renderer string: RADEON X300/X550/X1050 Series
<br>
OpenGL version string: 2.0.6334 (8.34.<img src="http://forum.ubuntu.org.cn/images/smiles/icon_cool.gif" alt="Cool" border="0">
<br>
<br>
hp@hp-desktop:~$
<br>
<br>
<br>
<br>
在应用程序系统工具里找到beryl-manager运行就可以了,当然你也可以在系统-&gt;首选项-&gt;会话 里设置为开机自启动
<br><br>PS：选择xgl进入会话，然后右击右上角的Beryl管理器，在高级选项里的渲染途径里选择复制，这时候再在选择窗口管理器里选择Beryl<br><br><img src ="http://www.cppblog.com/heidaizx/aggbug/33453.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-04 21:51 <a href="http://www.cppblog.com/heidaizx/articles/33453.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>64位系统完美运行wine</title><link>http://www.cppblog.com/heidaizx/articles/33387.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Wed, 03 Oct 2007 15:10:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/33387.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/33387.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/33387.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/33387.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/33387.html</trackback:ping><description><![CDATA[<br><br><br><br>更新opengl的设置，优化系统性能，见文章末尾红字部分］
<br>
本文章针对ubuntu 7.04 和wine－0.9.43（可能会随着7.10和wine的新版本的发布进行更新）
<br>
确保你的显卡已经安装合适的驱动，并且开启3D支持，也就是opengl的支持。
<br>
我不推荐在xgl或者是compiz fusion的环境下运行游戏，可能会导致系统性能的急剧下降，游戏不顺畅。
<br>
不推荐使用窗口模式，如果你在使用窗口模式的时候，把鼠标移开窗口，再回来时可能找不到鼠标。
<br>
转贴于<a  href="http://forum.ubuntu.org.cn/post-406118.html&amp;sid=c6150c2d1309847b3fb30f3e7ffbcb4e">http://forum.ubuntu.org.cn/post-406118.html&amp;sid=c6150c2d1309847b3fb30f3e7ffbcb4e</a><br>
<br>
1、安装wine－0.9.43&nbsp;&nbsp;&nbsp;&nbsp; //参见
<a  href="http://www.winehq.org/site/download-deb">http://www.winehq.org/site/download-deb</a>是英文网站，耐心看能看懂<br>
编译安装wine－0.9.43
<br>
要顺利的完成编译，你需要安装下面的包：
<br>
fakeroot
<br>
libglib1.2-dev
<br>
libglib2.0-dev
<br>
libltdl3-dev
<br>
libmad0-dev
<br>
libmng-dev
<br>
libodbcinstq1c2
<br>
libogg-dev
<br>
libpng12-dev
<br>
libqt3-headers
<br>
libqt3-mt-dev
<br>
libvorbis-dev
<br>
libxft-dev
<br>
libxi-dev
<br>
libxinerama-dev
<br>
libxmu-dev
<br>
libxmu-headers
<br>
libxmuu-dev
<br>
libxpm-dev
<br>
libxtrap-dev
<br>
libxtst-dev
<br>
libxv-dev
<br>
libxxf86dga-dev
<br>
qt3-dev-tools
<br>
render-dev
<br>
unixodbc-dev
<br>
x-dev
<br>
x11proto-record-dev
<br>
x11proto-trap-dev
<br>
x11proto-video-dev
<br>
x11proto-xf86dga-dev
<br>
xlibs-dev
<br>
flex
<br>
bison
<br>
fontforge
<br>
你可以使用信立得软件包管理器安装，也可以使用apt-get install命令安装，具体方法可以自己搜索。
<br>
<br>
2、配置wine
<br>
打开终端，输入winecfg，
<br>
<br>
（1）选择application标签，在下面的windows下拉列表里选择win2000或winxp。
<br>
（否则会检测不到原版CD。除非你用免CD补丁，没经过测试）
<br>
<br>
（2）选择Drivers标签，
<br>
点击Add，会出现一个新的盘符，一般情况下会出现D:。选择D:，点击下面的Show Advanced
<br>
在type这里选择CD－ROM，然后在Path这里输入/media/cdrom0。
<br>
如果/media/cdrom0不存在，就在终端下输入sudo mkdir /media/cdrom0
<br>
<br>
（3）选择Audio标签，在下面选择OSS（较好，但不绝对），或者Alsa，由于目前wine的声音做得还不是很完善，选择什么并不要紧。因为每个人
用的声卡都不一样，到时候运行游戏的时候，可以一个个试，选择最合适的。在Hardware
Acceleration处选择full，在下面的Default Sample选择44100（较好），旁边的选择16。
<br>
<br>
打开终端，输入regedit
<br>
<br>
（1）根据以下的设置注册表：
<br>
<br>
显示设置
<br>
REGEDIT4
<br>
<br>
[HKEY_CURRENT_USER\Software\Wine\Direct3D]
<br>
"DirectDrawRenderer"="opengl"
<br>
"OffscreenRenderingMode"="fbo"
<br>
"PixelShaderMode"="disabled"
<br>
"RenderTargetLockMode"="readtex"
<br>
"UseGLSL"="enabled"
<br>
"VideoMemorySize"="128"（这个根据你的显卡的显存调整）
<br>
<br>
<br>
<br>
REGEDIT4
<br>
<br>
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
<br>
"ClientSideAntiAliasWithCore"="N"
<br>
"ClientSideAntiAliasWithRender"="N"
<br>
"ClientSideWithRender"="N"
<br>
"DXGrab"="Y"
<br>
"ScreenDepth"="32"（wine程序的色深，也可以设置成16，取决你的显卡能力）
<br>
"UseXRandR"="N"
<br>
"UseXVidMode"="Y"
<br>
<br>
<br>
字体设置
<br>
REGEDIT4
<br>
<br>
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
<br>
"Arial"="simsun"
<br>
"Arial CE,238"="simsun"
<br>
"Arial CYR,204"="simsun"
<br>
"Arial Greek,161"="simsun"
<br>
"Arial TUR,162"="simsun"
<br>
"Courier New"="simsun"
<br>
"Courier New CE,238"="simsun"
<br>
"Courier New CYR,204"="simsun"
<br>
"Courier New Greek,161"="simsun"
<br>
"Courier New TUR,162"="simsun"
<br>
"FixedSys"="simsun"
<br>
"Helv"="simsun"
<br>
"Helvetica"="simsun"
<br>
"MS Sans Serif"="simsun"
<br>
"MS Shell Dlg"="simsun"
<br>
"MS Shell Dlg 2"="simsun"
<br>
"System"="simsun"
<br>
"Tahoma"="simsun"
<br>
"Times"="simsun"
<br>
"Times New Roman CE,238"="simsun"
<br>
"Times New Roman CYR,204"="simsun"
<br>
"Times New Roman Greek,161"="simsun"
<br>
"Times New Roman TUR,162"="simsun"
<br>
"Tms Rmn"="simsun"
<br>
<br>
最后把simsun.ttc复制到/home/user/.wine/drive_c/windows/fonts里面（user是你的用户名）。这个字体设置是最重要的，进行这个设置后，可以完美支持一切的中文显示（包括其他windows程序，如CS系列）。
<br>
这些设置是从cedega里&#8220;学&#8221;来的。
<br>
<br>
说明：由于7.04安装后，会把ATA的硬盘认成是SATA的硬盘，如hda会变成sda，hdc（光驱）会变成送scd0。而且当你放进光盘后，ubuntu会帮你自动挂载，挂载点一般是/media/光盘名。
<br>
wine不能自动识别光盘的挂载点，所以即使安装了需要CD运行的游戏，也会说是没有CD。
<br>
按照上面的设置，
<br>
当你放进魔兽3的CD后，ubuntu会帮你自动挂载，因为我们不需要，按照下面挂载步骤：
<br>
<br>
sudo umount /dev/scd0 （这个是对于ubuntu把hdc认成送scd0的，如果不是，用hdc替换scd0）
<br>
sudo mount /dev/scd0 /media/cdrom0
<br>
安装游戏时记得一定要进行这个设置，而且以后每次运行魔兽之前，放进光盘之后都要进行这个设置。
<br>
如果想找一劳永逸的办法，google一下。（其实我不懂）
<br>
<br>
3、安装游戏
<br>
按照在windows下一样的步骤进行安装，先是混乱之治，然后是资料篇冰封王座
<br>
放进混乱之治光盘，进行上面的挂载步骤，然后：
<br>
cd /media/cdrom0
<br>
wine install.exe
<br>
安装完后可以建立桌面快捷方式，不要运行。
<br>
接下来安装冰封王座，记得进行挂载步骤。
<br>
安装完后也不要运行。
<br>
<br>
4、配置游戏
<br>
打开regedit，找到HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III，选择 Warcraft III，在右边点击右键建立一个DWORD值，名字是Gfx OpenGL，
<br>
Value data设置为1。这样就是使用opengl来进行加速，否则用d3d会很慢。
<br>
<br>
进入/home/user/.wine/drive_c/Program Files/Warcraft III，把Movies文件夹改名，
<br>
比如改成_Movies，预防有些人的电脑在游戏启动时卡在开始的黑屏。
<br>
其实这是放开头动画的，剧情的过场动画不会消失。
<br>
<br>
5、运行游戏
<br>
可以双击程序自己创建的桌面快捷方式运行，也可以在终端运行。
<br>
终端 wine "C:\Program Files\Warcraft III\Frozen Throne.exe"
<br>
<br>
如果你是64位的操作系统，进入魔兽的安装目录，用下面的命令运行
<br>
setarch i386 -X wine "Warcraft III.exe"
<br>
<br>
另外，有正版序列号的支持者帮我测试一下在线升级。
<br>
也顺便测试一下局域网游戏。
<br>
<br>
参考资料：
<br>
<a href="http://appdb.winehq.org/appview.php?iVersionId=3126" target="_blank">http://appdb.winehq.org/appview.php?iVersionId=3126</a>
<br>
<a href="http://wiki.winehq.org/UsefulRegistryKeys" target="_blank">http://wiki.winehq.org/UsefulRegistryKeys</a>
<br>
<br>
本人机器配置：
<br>
CD 325 2.53G
<br>
1G DDR400
<br>
Geforce FX5200
<br>
10G 希捷 5400转
<br>
声卡SiS7012
<br>
<br>
可以流畅运行，但本人不太会玩，大场面，长时间的游戏稳定性测试还要靠大家。
<br>
<br>
时间仓促，难免疏漏，欢迎挑错。
<br>
<br>
［更新1］
<br>
打开注册表（终端regedit）
<br>
找到HKEY_CURRENT_USER\Software\Wine\
<br>
点击wine使他反色显示，右键点击wine，在出现的菜单里选择NEW--&gt;Key
<br>
出现"New Key #1"后，重命名为OpenGL（注意大小写）
<br>
然后在右边窗口右击，NEW--&gt;String Value
<br>
出现"New Value #1"后，重命名为DisabledExtensions（注意大小写）
<br>
双击DisabledExtensions，在出现的窗口输入GL_ARB_vertex_buffer_object
<br>
重新启动游戏测试一下，对低配电脑效果显著。
<br><img src ="http://www.cppblog.com/heidaizx/aggbug/33387.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-03 23:10 <a href="http://www.cppblog.com/heidaizx/articles/33387.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ubuntu新手提高贴汇总</title><link>http://www.cppblog.com/heidaizx/articles/33385.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Wed, 03 Oct 2007 14:31:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/33385.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/33385.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/33385.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/33385.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/33385.html</trackback:ping><description><![CDATA[转贴于
<a  href="http://forum.ubuntu.org.cn/about67235.html&amp;sid=f6e579c55c0e79ab784dd096f79f2eea">http://forum.ubuntu.org.cn/about67235.html&amp;sid=f6e579c55c0e79ab784dd096f79f2eea</a><br><br>一、初来乍到：
<br>
<br>
Ubuntu简介
<br>
Ubuntu 是一个由社区开发的、基于 Linux 的操作系统，适用于笔记本电脑、桌上电脑和服务器。它包含了您所需要的所有程序：网页浏览器、演示文稿、文字处理、电子表格、即时通讯等等。这是<a href="http://www.ubuntu.org.cn/" target="_blank" class="postlink">www.ubuntu.org.cn</a>上说的。详细点的介绍看这里：《Ubuntu简介》（<a href="http://blog.chinaunix.net/u/19755/showart_162620.html" target="_blank" class="postlink">http://blog.chinaunix.net/u/19755/showart_162620.html</a>），注意，最新版已经是7.04了。更多内容看<a href="http://baike.baidu.com/view/4236.htm" target="_blank" class="postlink">http://baike.baidu.com/view/4236.htm</a>。
<br>
<br>
Ubuntu与Linux什么关系？
<br>
Ubuntu是Linux的一个发行版，至于Linux更多的资料，你有兴趣可以看看《]Linux爱好者入门教程》（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=18360" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=18360</a>）
<br>
<br>
Ubuntu与其它发行版
<br>
《Linux扫盲篇：各发行版本简介&amp;下载》（<a href="http://softbbs.pconline.com.cn/topic.jsp?tid=7266022" target="_blank" class="postlink">http://softbbs.pconline.com.cn/topic.jsp?tid=7266022</a>）
<br>
<br>
Ubuntu能做什么？（待办，想抓各种应用的图片，放在一个帖子里）
<br>
<br>
<br>
Ubuntu适合你吗？
<br>
不要因为看到酷酷的Linux就盲目地安装，在安装Linux之前，先问一下自己，看看自己是否适合使用，Linux是否适合自己的需求：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=64200&amp;postdays=0&amp;postorder=asc&amp;start=0" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=64200&amp;postdays=0&amp;postorder=asc&amp;start=0</a>
<br>
<br>
学习linux几点忠告
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=739" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=739</a>）
<br>
<br>
Linux不是Windows
<br>
Linux不是Windows，所以不要拿着Windows的概念来卡Linux。也许这篇文章可以让你更好地理解Linux的理念：
<br>
《Linux不是Windows》（<a href="http://wiki.ubuntu.org.cn/index.php?title=Linux%E4%B8%8D%E6%98%AFWindows/zh&amp;variant=zh-cn" target="_blank" class="postlink">http://wiki.ubuntu.org.cn/index.php?title=Linux%E4%B8%8D%E6%98%AFWindows/zh&amp;variant=zh-cn</a>）
<br>
扫盲帖
<br>
（<a href="http://forum.ubuntu.org.cn/about11984.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about11984.html</a>）
<br>
linux不需要磁盘碎片整理！(第二次修改版)
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=27451" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=27451</a>）
<br>
安装 Linux 应知的十件事
<br>
（<a href="http://wiki.ubuntu.org.cn/index.php?title=%E5%AE%89%E8%A3%85_Linux_%E5%BA%94%E7%9F%A5%E7%9A%84%E5%8D%81%E4%BB%B6%E4%BA%8B&amp;variant=zh-cn" target="_blank" class="postlink">http://wiki.ubuntu.org.cn/index.php?title=%E5%AE%89%E8%A3%85_Linux_%E5%BA%94%E7%9F%A5%E7%9A%84%E5%8D%81%E4%BB%B6%E4%BA%8B&amp;variant=zh-cn</a>）
<br>
<br>
<br>
如何使用论坛、wiki、搜索等来获得自己需要的知识
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?p=383863#383863" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?p=383863#383863</a>）
<br>
<br>
二、我要加入Ubuntu世界
<br>
<br>
如何选择Ubuntu版本
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=67545&amp;start=0&amp;postdays=0&amp;postorder=asc&amp;highlight=" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=67545&amp;start=0&amp;postdays=0&amp;postorder=asc&amp;highlight=</a>）
<br>
<br>
有备无患──删除Linux及如何恢复Grub
<br>
（<a href="http://forum.ubuntu.org.cn/about65991.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about65991.html</a>）
<br>
精华: ubuntu的安装与离线升级、跨版升级和备份策略
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=58659&amp;highlight=%E5%88%86%E5%8C%BA" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=58659&amp;highlight=%E5%88%86%E5%8C%BA</a>）
<br>
<br>
要安装了，有两个问题需要解决，一是分区，二是设置网络，最好在安装之前先看一下：
<br>
如何分区
<br>
（<a href="http://wiki.ubuntu.org.cn/index.php?title=%E5%A6%82%E4%BD%95%E5%88%86%E5%8C%BA&amp;variant=zh-cn" target="_blank" class="postlink">http://wiki.ubuntu.org.cn/index.php?title=%E5%A6%82%E4%BD%95%E5%88%86%E5%8C%BA&amp;variant=zh-cn</a>）
<br>
<br>
<br>
Ubuntu安装过程之磁盘分区图文教程（新版见5楼──20070818更新）
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=39777" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=39777</a>）
<br>
<br>
如何使用PPPoEConf连接Internet?
<br>
（<a href="http://wiki.debian.org.hk/w/Connect_Internet_with_PPPoEConf" target="_blank" class="postlink">http://wiki.debian.org.hk/w/Connect_Internet_with_PPPoEConf</a>）
<br>
<br>
如何安装Ubuntu（Live CD安装、Alterate CD安装、硬盘安装、Windows下安装）
<br>
（注意顺序，应该是安装系统（中间以一种硬盘分区方式介绍，同时提供链接介绍其它分区方式）、设置网络（也可以以一种为主介绍，同时提供链接介绍其它）、更新源、安装3D驱动、安装中文包和输入法、其它常用软件安装（快速设置指南））
<br>
<br>
<br>
Ubuntu 7.04 新手指南
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=49382" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=49382</a>）
<br>
中间少了设置网络
<br>
Win-ubuntu----通过Win安装ubuntu！！！适合只有win和dos概念的初学者
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=40930&amp;highlight=Win-ubuntu" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=40930&amp;highlight=Win-ubuntu</a>）
<br>
[图形教学]一步一步跟我学ubuntu7.04 server光盘安装（与alternate类似）
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=49329" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=49329</a>）
<br>
安装 Ubuntu 服务器（LVM）
<br>
（<a href="http://dotclear.org.cn/doku.php?id=dapper:ubuntusys:ch02-ubuntu_install:30-server_installation_with_lvm&amp;rev=" target="_blank" class="postlink">http://dotclear.org.cn/doku.php?id=dapper:ubuntusys:ch02-ubuntu_install:30-server_installation_with_lvm&amp;rev=</a>）
<br>
<br>
用官方文件实现 UBUNTU 7.04 硬盘安装
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=49380&amp;highlight=%E5%88%86%E5%8C%BA" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=49380&amp;highlight=%E5%88%86%E5%8C%BA</a>）
<br>
<br>
驱动安装
<br>
[分享]ati官方驱动（非开源）的安装配置 07/08/14 更新
<br>
(<a href="http://forum.ubuntu.org.cn/about26188.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about26188.html</a>)
<br>
Nvidia 驱动安装资讯收集
<br>
(<a href="http://forum.ubuntu.org.cn/about69241.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about69241.html</a>)
<br>
[原创]Nvidia显卡在Ubuntu超轻松实现双显示器（双头显示）
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=40666" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=40666</a>）
<br>
[转帖] VIA/S3G UniChrome Pro IGP显卡驱动总结(给各位被集成显卡闪烁的眼泪直流的兄弟们)
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=31231" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=31231</a>）
<br>
<br>
<br>
在ubuntu 7.04下驱动黑金2声卡
<br>
（<a href="http://forum.ubuntu.org.cn/about51527.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about51527.html</a>）
<br>
[指南]D-link DWL-G122 无线网卡在Edgy下的安装。
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=40581" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=40581</a>）
<br>
[教学]WiFi网卡用ndiswrapper驱动的问题(解决+总结)
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=2764" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=2764</a>）
<br>
[分享] IBM T系列 指纹识别安装教程
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=66103" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=66103</a>）
<br>
<br>
<br>
安装完系统，设置好网络，第一个要看的，就是：
<br>
FeistyFawn快速设置指南
<br>
（<a href="http://wiki.ubuntu.org.cn/index.php?title=%E9%A6%96%E9%A1%B5&amp;variant=zh-cn" target="_blank" class="postlink">http://wiki.ubuntu.org.cn/index.php?title=%E9%A6%96%E9%A1%B5&amp;variant=zh-cn</a>）
<br>
<br>
提供一个 一步 设置的 工具
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=56819" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=56819</a>）
<br>
概念篇
<br>
源、终端、Grub菜单等
<br>
Linux操作系统下以不同颜色命名的文件类型
<br>
（<a href="http://linux.ccidnet.com/art/302/20070801/1163357_1.html" target="_blank" class="postlink">http://linux.ccidnet.com/art/302/20070801/1163357_1.html</a>）
<br>
新手学堂 Linux系统下各文件目录的含义
<br>
（<a href="http://linux.ccidnet.com/art/302/20070802/1165139_1.html" target="_blank" class="postlink">http://linux.ccidnet.com/art/302/20070802/1165139_1.html</a>）
<br>
Grub
<br>
Grub是多系统引导管理器，对初学者来说，我认为就是知道两样东西：一个是Grub菜单，就是机器启动时你可以选择你的Ubuntu、或其
recovery（恢复）模式、或你机器上的Windows的地方；另一个就是Grub配置文件（/boot/grub/menu.lst)，你可以用
root身份来编辑它，具体请看下面的系统维护部分的《grub配置与使用》或北南南北老大写的《系统引导管理器GRUB，为初学者指南》（<a href="http://www.linuxsir.org/main/?q=node/129" target="_blank" class="postlink">http://www.linuxsir.org/main/?q=node/129</a>）
<br>
源/更新源
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>skyx 写道:</strong></td>
        </tr>
        <tr>
            <td class="quote">可以这样来理解什么是更新源（源）==== 软件仓库网站+系统补丁升级网站
            <br>
            <br>
            这样的站台（服务器）遍及全球，对你来说下载时有快有慢，所以要更改更新源的设定，以达到速度最快和找到合适的软件。
            <br>
            <br>
            <br>
            我们所说的改源或源设定，就是更改更新源的设定</td>
        </tr>
    </tbody>
</table>
<br>
至于更新源如何操作，请见FeistyFawn快速设置指南
<br>
（<a href="http://wiki.ubuntu.org.cn/index.php?title=%E9%A6%96%E9%A1%B5&amp;variant=zh-cn" target="_blank" class="postlink">http://wiki.ubuntu.org.cn/index.php?title=%E9%A6%96%E9%A1%B5&amp;variant=zh-cn</a>）或Gui-软件源（<a href="http://wiki.ubuntu.org.cn/Gui-%E8%BD%AF%E4%BB%B6%E6%BA%90" target="_blank" class="postlink">http://wiki.ubuntu.org.cn/Gui-%E8%BD%AF%E4%BB%B6%E6%BA%90</a>）
<br>
<br>
文件系统
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>引用:</strong></td>
        </tr>
        <tr>
            <td class="quote">术语文件系统 可以在 Linux 文件编制中互换使用，用于指代几个不同但相关的概念。除磁盘分区的具体实例外，文件系统还指代数据结构以及分区中文件的管理方法。
            <br>
            另新手更感困惑的是，该术语还用于指代系统中文件的整体组织形式：目录树。此外，该术语还可以指代目录树中的每个子目录，如在 /home 文件系统中。</td>
        </tr>
    </tbody>
</table>
更多内容，请参考Linux 文件系统精通指南（<a href="http://www.oracle.com/technology/global/cn/pub/articles/calish_filesys.html" target="_blank" class="postlink">http://www.oracle.com/technology/global/cn/pub/articles/calish_filesys.html</a>）
<br>
<br>
<br>
<br>
软件安装
<br>
ubuntu Linux下的软件安装方式
<br>
（<a href="http://hi.baidu.com/longforfreedom/blog/item/a534fe03f207d989d53f7c68.html" target="_blank" class="postlink">http://hi.baidu.com/longforfreedom/blog/item/a534fe03f207d989d53f7c68.html</a>）
<br>
jarlyyn做的Ubuntu图文教程之软件安装wiki
<br>
（<a href="http://wiki.ubuntu.org.cn/Gui-%E5%AE%89%E8%A3%85%E7%A8%8B%E5%BA%8F" target="_blank" class="postlink">http://wiki.ubuntu.org.cn/Gui-%E5%AE%89%E8%A3%85%E7%A8%8B%E5%BA%8F</a>）
<br>
简单地编译安装软件－kinstaller完全图解教程
<br>
（<a href="http://forum.ubuntu.org.cn/about49559.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about49559.html</a>）
<br>
<br>
&#8230;
<br>
<br>
三、常用软件
<br>
<br>
linux下对应的windows软件（非常详细！这个列表和apt-get一样有超级牛力）
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=47493" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=47493</a>）
<br>
一份比较详尽的Ubuntu下的替代WIN软件列表（包括ubuntu和kubuntu）
<br>
(<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=20859" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=20859</a>)
<br>
<br>
&#8230;&#8230;
<br>
6、音频播放器：
<br>
rhythmbox
<br>
audacious
<br>
amarok
<br>
exaile
<br>
mpd 的安装以及相关的播放前端
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=43152&amp;sid=55d88ccedf0b7de68450077d004f13e5" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=43152&amp;sid=55d88ccedf0b7de68450077d004f13e5</a>）
<br>
（每个都指向一个介绍详细的链接，如果某链接内容太多，则指向一个资源列表。）
<br>
7、聊天软件：
<br>
Jabbin：另一个兼容Gtalk的Jabber VOIP客户端
<br>
<br>
<br>
四、系统维护：
<br>
<br>
grub的配置与使用
<br>
（<a href="http://forum.ubuntu.org.cn/about9434.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about9434.html</a>）
<br>
简化一下软件重装的步骤 : )（<a href="http://forum.ubuntu.org.cn/about66591.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about66591.html</a>）
<br>
重装windwos后 无法进入ubuntu 最简单的修复方法！
<br>
（<a href="http://forum.ubuntu.org.cn/about34905.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about34905.html</a>）
<br>
如何做不死的小白，再谈用ghost8x备份ubuntu ext3系统(2007年5月9日更新)
<br>
（<a href="http://forum.ubuntu.org.cn/about37658.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about37658.html</a>）
<br>
善用tar
<br>
（<a href="http://forum.ubuntu.org.cn/about21163.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about21163.html</a>）
<br>
教你看懂/etc/fstab
<br>
（<a href="http://forum.ubuntu.org.cn/about58478.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about58478.html</a>）
<br>
学会理解并编辑fstab
<br>
（<a href="http://forum.ubuntu.org.cn/about58468.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about58468.html</a>）
<br>
自己动手提高ubuntu系统的性能
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=53153" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=53153</a>）
<br>
硬盘操作指北
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=9461" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=9461</a>）
<br>
系统优化新手向导（全文完）
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=52012" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=52012</a>）
<br>
缺少公钥问题的解决方法
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=27006" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=27006</a>）
<br>
<br>
五、命令行
<br>
<br>
[原创]Linux CLI Guide命令行简明教程（3.13 update，只有部分）
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=31408" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=31408</a>）
<br>
Linux文件查找命令find,xargs详述
<br>
（<a href="http://forum.ubuntu.org.cn/about37823.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about37823.html</a>）
<br>
真正的初学者常用命令！
<br>
（<a href="http://forum.ubuntu.org.cn/about7277.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about7277.html</a>）
<br>
apt-get等命令行介绍
<br>
（http://forum.ubuntu.org.cn/viewtopic.php?t=65707）
<br>
大家经常和deb包打交道。总结了一下dpkg，试试平时简单的代替synaptic的某些工作。
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=4427" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=4427</a>）
<br>
<br>
六、深入阅读
<br>
<br>
Ubuntu教程 -06.08.09
<br>
（<a href="http://forum.ubuntu.org.cn/about18740.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about18740.html</a>）
<br>
<br>
Xwindow简介
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=21120" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=21120</a>）
<br>
<br>
ext3 简介
<br>
（<a href="http://forum.ubuntu.org.cn/about7040.html" target="_blank" class="postlink">http://forum.ubuntu.org.cn/about7040.html</a>）
<br>
<br>
关于locale的设定,为什么要设定locale
<br>
（<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=18273" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=18273</a>）
<br>
Ubuntu 6.06 LTS (Dapper Drake) 服务器配置与管理
<br>
（<a href="http://dotclear.org.cn/ubuntubook" target="_blank" class="postlink">http://dotclear.org.cn/ubuntubook</a>）
<br>
<br>
<br><img src ="http://www.cppblog.com/heidaizx/aggbug/33385.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-03 22:31 <a href="http://www.cppblog.com/heidaizx/articles/33385.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>商业品质的自由游戏</title><link>http://www.cppblog.com/heidaizx/articles/33373.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Wed, 03 Oct 2007 08:16:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/33373.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/33373.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/33373.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/33373.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/33373.html</trackback:ping><description><![CDATA[转贴于<a  href="http://forum.ubuntu.org.cn/about78153.html">http://forum.ubuntu.org.cn/about78153.html
</a><br><br>适量游戏益脑,过度游戏伤神. 自己安排时间, 寻找健康生活.
<br>
<br>
有些源里没有
<br>
不要嫌编译麻烦 <img src="http://forum.ubuntu.org.cn/images/smiles/icon_lol.gif" alt="Laughing" border="0">
<br>
<br>
<br>
我推荐的加 *         主要原因是这些不会消耗太多时间
<br>
自由游戏软件:
<br>
<br>
Battle For Wesnoth:韦诺之战     名字好像还不定....    魏  伟
<br>
1.2.6版   回合制六角战棋,简单规则高难度(易于上手难于精通---这是不必要的),另有很多模式的多人游戏,有制作工具
<br>
安装之后   下载安装此字体到font目录 <a href="http://www.wesnoth.cn/wesnoth_cn/download/gkai00mp.zip" target="_blank">http://www.wesnoth.cn/wesnoth_cn/download/gkai00mp.zip</a>   由韦诺之战中文论坛提供        即可显示中文             1.3.8不稳定版  添加很多战役
<br>
<br>
Stellarium: 看星星啦    源里是 教育 那一项
<br>
Photo-realistic universe simulation Gusty Universe <a href="http://www.stellarium.org/" target="_blank">http://www.stellarium.org/</a>
<br>
<br>
Lincity-NG: 模拟城市
<br>
画面不错,管理各方面比较细致
<br>
<br>
Ubuntu自带的所有Gnome小游戏
<br>
暇时乐乐, 首推机器人
<br>
<br>
*Flightgear:
<br>
模拟飞行.
<br>
<br>
Xmoto:越野摩托
<br>
复制了另一个著名游戏Elasto Mania的灵感
<br>
<br>
Frozen-Bubble:泡泡龙
<br>
各方面都不错的休闲游戏
<br>
<br>
Nassp(add-on for ORBITER): NASA universal flight simulator 美国航天局的模拟器http://nassp.sourceforge.net/wiki/Main_Page
<br>
<br>
*Falcon's Eye
<br>
探险RPG游戏, Nethack的图像增强版
<br>
<br>
*Sauerbraten engine:
<br>
一个从cube演变出来的游戏引擎: 原版和Blood Frontier就够玩的了.  	AssaultCube原cube最好的MOD,
<br>
<br>
Alien Arena
<br>
第一人称射击
<br>
<br>
Stepmania
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>stlxv 写道:</strong></td>
        </tr>
        <tr>
            <td class="quote">stepmania支持跳舞机，而且舞曲可以在网上很容易找到</td>
        </tr>
    </tbody>
</table>
<br>
<br>
Flobo Puyo:
<br>
Crack Attack:
<br>
同色消除
<br>
<br>
UFO: Alien Invasion
<br>
3D回合战术
<br>
<br>
*Spring
<br>
Total Annihilation的3D改良, 因此绝对优异, MOD 多得数不清,下载量统计让人惊讶
<br>
<br>
Warzone 2100:
<br>
1999年的3D即时战略
<br>
<br>
*ioquake3: Quake3改良引擎
<br>
和一些基于Q3代码的项目合作有了  Open Arena   /  Tremulous   /   Urban Terror  /   World of Padman
<br>
<br>
battle tanks:
<br>
2D坦克
<br>
<br>
Bzflag:
<br>
3D坦克
<br>
<br>
Nexuiz:
<br>
专注平衡性的死亡竞赛射击游戏, 标志是中文   力
<br>
<br>
*Enigma:
<br>
鼠标控制球,完成撞击任务------好难
<br>
<br>
Neverball:
<br>
平衡 球的另一种形式,更有趣
<br>
<br>
lbreakout2:
<br>
打转块
<br>
<br>
SoulFu:
<br>
Egoboo!成果的作品
<br>
<br>
Egoboo!:
<br>
3D地下城探险游戏
<br>
<br>
*蓝迪游戏:
<br>
棋牌游戏大厅 <a href="http://www.bluedj.com/" target="_blank">www.bluedj.com/</a>
<br>
<br>
*Trigger: Racing Rally Gusty Universe
<br>
拉力赛车
<br>
<br>
不大够资格的:
<br>
<br>
Wing Commander Universe:
<br>
Privateer 重制版
<br>
<br>
Danger from the Deep: 潜艇模拟
<br>
Submarine simulation dangerdeep.sourceforge.net/
<br>
<br>
Neverputt:
<br>
迷你高尔夫
<br>
<br>
GearHead 2
<br>
RPG
<br>
<br>
Excalibur: Morgana's Revenge
<br>
v3.0,3D第一人称动作冒险
<br>
<br>
Globulation 2
<br>
即时战略
<br>
<br>
Pingus:
<br>
lemming like, 画面不错,关卡太少
<br>
<br>
Chromium:
<br>
纵向卷轴空间射击游戏
<br>
<br>
*Wormux:    worms-like 优点是官方提供开机自启动ISO.
<br>
0.81beta还好点 操作性和百战天虫 有较大距离
<br>
<br>
UFO 2000:
<br>
和UFO: Alien Invasion 类似, 爱好者重制的  X-COM: UFO Defense但是2D的联机版
<br>
<br>
*Vega Strike:
<br>
因为还在测试,所以归到此类----优秀的太空游戏
<br>
<br>
Scorched 3D:
<br>
大炮对射,个人觉得作为游戏不是很好
<br>
<br>
Balazar:
<br>
3D探险RPG
<br>
<br>
Boswars: 即时战略
<br>
吸收了stratagus团队 <a href="http://www.boswars.org/" target="_blank">http://www.boswars.org/</a>
<br>
stratagus 即时战略引擎+游戏
<br>
<br>
<br>
<br>
免费
<br>
<br>
Simutrans
<br>
交通模拟
<br>
<br>
*Legends:  像&#8221;部落&#8220;
<br>
多人合作--不必要  tribes-like FPS.  推荐 <a href="http://legendsthegame.net/" target="_blank">http://legendsthegame.net/</a>
<br>
<br>
America's Army: 美国陆军
<br>
多人合作FPS
<br>
<br>
*Savage: The Battle for Newerth:
<br>
类型复杂的 Real-time strategy, First-person shooter
<br><br><img src ="http://www.cppblog.com/heidaizx/aggbug/33373.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-03 16:16 <a href="http://www.cppblog.com/heidaizx/articles/33373.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>新手必读贴</title><link>http://www.cppblog.com/heidaizx/articles/33372.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Wed, 03 Oct 2007 07:54:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/33372.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/33372.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/33372.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/33372.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/33372.html</trackback:ping><description><![CDATA[转贴于<a href="http://forum.ubuntu.org.cn/about35100.html">http://forum.ubuntu.org.cn/about35100.html
<br></a><br>目的：许多新手刚来的时候，会有无数的问题，而这些问题中大部分在本论坛以及wiki都有解答。
<br>
某些问题实在常见，至少看过10000次同样的问题（开玩笑啦<img src="http://forum.ubuntu.org.cn/images/smiles/icon_biggrin.gif" alt="Very happy" border="0">）。
<br>
为方便大家并减少无目的寻找答案的时间，写了这么个帖子，希望对大家有所帮助，以顺利渡过新手期。
<br>
由于个人力量有限，也想不到那么多，请大家一起帮忙补充，谢谢！
<br>
<br>
形式：Q &amp; A，建议使用 ctrl+f 进行关键词搜索。
<br>
<br>
注意：本指南主要针对ubuntu即gnome版本，少部分操作仅限于gnome环境（已用*号标志）。kde环境下的安装命令可以使用adept。
<br>
本指南中出现的&#8220;代码框&#8221;一般是需要在虚拟终端（terminal）／控制台（console）中执行的命令，或是编辑文档时所需添加的部分。
<br>
＝＝＝＝＝＝=＝＝＝=＝＝=========＝＝＝＝＝这是华丽的分割线<img src="http://forum.ubuntu.org.cn/images/smiles/icon_biggrin.gif" alt="Very happy" border="0">＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝=＝====＝=＝
<br>
Q: 什么是Ubuntu？
<br>
A: 中文名&#8220;乌班图&#8221;，是基于debian的一个Gnu/Linux操作系统。理念是&#8220;Humanity to others&#8221;，即&#8220;人道待人&#8221;。我们Ubuntuer都是乐于助人的好兄弟,而且它是永久免费的<img src="http://forum.ubuntu.org.cn/images/smiles/icon_smile.gif" alt="Smile" border="0">。参见<a href="http://www.ubuntu.org.cn/products/whatisubuntu" target="_blank" class="postlink">什么是ubuntu</a>。
<br>
<br>
Q: 它和其他linux发行版有什么区别？
<br>
A: ubuntu基于debian，拥有debian一切的优点，还有debian所不具有的其他长处，如更为方便，更适合桌面应用。
<br>
<br>
Q: 既然这么好，在哪里可以下载？
<br>
A: <a href="http://www.ubuntu.org.cn/getubuntu" target="_blank" class="postlink">获取Ubuntu</a>。
<br>
<br>
Q: 我有好多好多问题哦，谁来帮我？
<br>
A: 首先请看<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=3341" target="_blank" class="postlink">常见问题解答和发帖需知</a>，发觉好多新手都不看就开始发帖问。
<br>
其次，wiki是个非常好的地方，你的问题基本都有解答。我建议从这里看起：
<br>
<a href="http://wiki.ubuntu.org.cn/index.php?title=%E6%96%B0%E6%89%8B%E9%A2%84%E5%A4%87%E7%9F%A5%E8%AF%86&amp;variant=zh-cn" target="_blank" class="postlink">新手预备知识</a>和<a href="http://wiki.ubuntu.org.cn/index.php?title=%E6%96%B0%E6%89%8B%E5%85%A5%E9%97%A8%E6%8C%87%E5%BC%95&amp;variant=zh-cn" target="_blank" class="postlink">新手入门指引</a>。
<br>
<br>
Q: 如何安装ubuntu？
<br>
A: <a href="http://forum.ubuntu.org.cn/viewtopic.php?t=49382" target="_blank" class="postlink">ubuntu7.04新手指南</a>。这个是图形界面的，相信你一定可以照做。另外也可以参见<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=49329/" target="_blank" class="postlink">[图形教学]一步一步跟我学ubuntu7.04 server光盘安装（与alternate类似）</a>。注：64位机型还是建议装i386版本，会省很多麻烦，包括软件、驱动。intel64和amd64都可以装amd64版本。
<br>
<br>
Q: 我一没刻录机，二没光盘，怎么安装？
<br>
A: 可以尝试硬盘安装，不过并不能100%保证装的起来，尤其是新手，而且此方法并不推荐，官方也不作任何支持。请做好足够的心理准备。参见：<a href="http://forum.ubuntu.org.cn/about29437.html" target="_blank" class="postlink">6.10alternate的硬盘安装教程</a>。
<br>
<br>
Q: 如何合理分区？
<br>
A: 一块硬盘最多四个主分区，或三个主分区+一个扩展分区（内含n个逻辑分区）。linux可以安装在主分区或逻辑分区。一般情况下，只需分/
和swap两个区就足够了，另外建议把/home独立分区，以后重装就不必重新设置很多东西。swap是交换分区，如果内存&lt;=256，请在分区时
设置成512MB，内存&gt;=512MB的给个512MB就足够了（如果要休眠，恐怕还是&gt;=内存比较保险）。不建议不划分swap区，某些时
候你还是会需要它的，无论你内存有多大。
<br>
<br>
Q: windows下有好多好软件，我真舍不得，linux下有对应的么？
<br>
A: 基本上都有，而且更好（不一定同名同姓）。如果找不到，可以用wine/vmware/parralles/virturalbox/kvm等虚拟windows安装他们。虚拟机的安装和使用可以到本论坛虚拟机区搜索。参见：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=47493" target="_blank" class="postlink">linux下对应的windows软件</a>和<a href="http://forum.ubuntu.org.cn/viewforum.php?f=95" target="_blank" class="postlink">软件推荐区</a>。
<br>
<br>
Q:
我装完了，如何设置？为什么我的ubuntu/openoffice/firefox是英文的？为什么adobe
reader、openoffice、realplayer等无法启动？源如何设置/我的源好慢？如何安装字典、输入法、java、QQ、多媒体播放器及
解码器（如何播放mp3等格式）、flash、bt软件？如何升级系统、内核？
<br>
A: 参见<a href="http://wiki.ubuntu.org.cn/%E5%BF%AB%E9%80%9F%E8%AE%BE%E7%BD%AE%E6%8C%87%E5%8D%97" target="_blank" class="postlink">快速设置指南</a>。这里有你所渴求的东东。
<br>
<br>
Q: 为什么ubuntu没有root帐号？如何以root权限做一些事情？
<br>
A: ubuntu本来就不推荐用root帐号，危险性比较大，其密码是随机的。如果你需要用root权限，请在命令前输入sudo，会提示你输入密码（注意，此密码即你的用户密码。输入时密码不可见，非*****之类）。
<br>
<br>
Q:如何挂载windows分区？
<br>
A: 参见你的系统帮助。
<br>
<br>
Q: 如何安装显卡驱动？
<br>
A: ati显卡看这里：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=26188" target="_blank" class="postlink">ati官方驱动（非开源）的安装配置</a>。
<br>
nvidia的参见：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=58659&amp;highlight=nvidia" target="_blank" class="postlink">skyx mm所写的教程</a>，<a href="http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_setup_nvidia_drivers_in_7.04" target="_blank" class="postlink">How to setup nvidia drivers in 7.04</a>，以及<a href="http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_install_Beta_Graphics_Driver_.28NVIDIA.29" target="_blank" class="postlink">How to install Beta Graphics Driver (NVIDIA)</a>。
<br>
intel的参见：<a href="http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_Correct_the_Graphics_Resolution_.28Intel.29" target="_blank" class="postlink">How to Correct the Graphics Resolution</a>。
<br>
<br>
Q: 我用livecd装到一半就停住了？
<br>
A: 可能你的内存太小，比如小于256MB。请选择alternate版本并刻盘安装。也可能网络速度很慢，你可以试着把网线拔掉。
<br>
<br>
Q: 哪里可以找到ubuntu的学习资料？
<br>
A: <a href="http://wiki.ubuntu.org.cn/" target="_blank" class="postlink">ubuntu官方中文wiki</a>；<a href="http://ubuntuguide.org/wiki/Main_Page" target="_blank" class="postlink">非官方wiki</a>，很全面，有中文翻译，强烈推荐！<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=18740" target="_blank" class="postlink">很棒的教程一</a>；<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=31408" target="_blank" class="postlink">很棒的教程二</a>；<a href="http://www.howtoforge.com/" target="_blank" class="postlink">HowtoForge</a>，这里有很多linux包括ubuntu的教程。
<br>
其他必看的有本论坛各板块的精华帖、置顶帖，还有千万别忘了你系统自带的帮助（相当全）。另外要学会用man命令去看某命令的手册。比如man apt-get。
<br>
<br>
Q: 为什么我用apt-get的时候会出现这样的情况?
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>引用:</strong></td>
        </tr>
        <tr>
            <td class="quote">E: 无法获得锁 /var/cache/apt/archives/lock - open (11 Resource temporarily unavailable)</td>
        </tr>
    </tbody>
</table>
<br>
A: 你一定把新立得/软件更新/添加删除 等与软件安装相关的程序打开了，请把他们关掉吧。apt-get在同一时刻只能有一个在执行。
<br>
<br>
Q: 为什么我用apt-get xxx的时候说
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>引用:</strong></td>
        </tr>
        <tr>
            <td class="quote">E: 无法找到软件包 xxx</td>
        </tr>
    </tbody>
</table>
或有类似无法安装的提示？
<br>
A: 试着更换其他的源。看<a href="http://wiki.ubuntu.org.cn/index.php?title=%E5%BF%AB%E9%80%9F%E8%AE%BE%E7%BD%AE%E6%8C%87%E5%8D%97&amp;variant=zh-cn" target="_blank" class="postlink">快速设置指南</a>，注意你所对应的系统版本，不同版本的源千万不要混用。另外，要看清提示，比如要你 sudo dpkg --configure -a 什么的，一定要照做。
<br>
<br>
Q: 能不能帮我推荐几个linux站点？
<br>
A: <a href="http://forum.ubuntu.org.cn/index.php" target="_blank" class="postlink">ubuntu官方中文论坛</a>；
<br>
<a href="http://wiki.ubuntu.org.cn/" target="_blank" class="postlink">ubuntu官方中文wiki</a>；
<br>
<a href="https://help.ubuntu.com/" target="_blank" class="postlink">官方英文wiki</a>；
<br>
<a href="http://distrowatch.com/" target="_blank" class="postlink">ditrowatch</a>，几乎所有linux发行版的集中地，有详细介绍和排名；
<br>
<a href="http://www.opendesktop.org/" target="_blank" class="postlink">所有桌面环境的主题、软件联合站点</a>；
<br>
<a href="http://www.linuxsir.org/main/" target="_blank" class="postlink">国内有名的linuxsir论坛</a>；
<br>
<a href="http://linuxtoy.org/" target="_blank" class="postlink">linuxtoy</a>，里面收了很多好玩的东西，包括技巧、软件推荐等；
<br>
<a href="http://ubuntuguide.org/wiki/Main_Page" target="_blank" class="postlink">非官方wiki</a>，英文，非常有针对性，资料新而细，强烈推荐；
<br>
<a href="http://www.compiz-fusion.org/" target="_blank" class="postlink">3D桌面compiz-fusion主站，</a>喜欢炫的朋友切莫错过；
<br>
<a href="http://www.ubuntuforums.org/" target="_blank" class="postlink">ubuntu官方英文论坛</a>；
<br>
<a href="http://packages.ubuntu.com/" target="_blank" class="postlink">官方deb包的集中地</a>，如果你没法上网，可以到这里下载后再安装；
<br>
<a href="http://linux-vbird.3322.org/" target="_blank" class="postlink">鸟哥的私房菜</a>，很有名的linux学习网站，这个是简体版；
<br>
<a href="http://www.getdeb.net/" target="_blank" class="postlink">Get Deb Software</a>，英文站点，是ubuntu软件的deb包下载，非官方，但版本很新，强烈推荐；
<br>
<a href="http://www.fullcirclemagazine.org/" target="_blank" class="postlink">ubuntu magazine</a>，英文杂志；
<br>
<a href="http://www.ubuntugeek.com/" target="_blank" class="postlink">ubuntu geek</a>，英文站点，有不少ubuntu的学习、设置资料；
<br>
<a href="http://www.ubuntuvideo.com/" target="_blank" class="postlink">ubuntu video</a>，各种ubuntu的视频，包括安装设置。
<br>
<a href="http://doc.gwos.org/index.php/Main_Page" target="_blank" class="postlink">Ubuntu Document Storage Facility</a>，英文ubuntu文档。
<br>
<a href="http://linuxcommand.org/index.php" target="_blank" class="postlink">linux命令、脚本学习</a>
<br>
<br>
Q: stardict字典到哪里下载阿？
<br>
A: stardict主页上就有下载，中文源ubuntu-cn里面有一部分，另外ftp上有所有的字典。参见<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=33513" target="_blank" class="postlink">FTP服务器镜像了整个stardict.sourceforge.net站点</a>。
<br>
<br>
Q: vmware安装的ubuntu为什么无法切换至控制台？
<br>
A: 可能和vmare的快捷键冲突了。
<br>
<br>
Q: 在控制台为什么都是一个个的方框？
<br>
A:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install zhcon</td>
        </tr>
    </tbody>
</table>
然后使用的时候，在控制台下输入zhcon --utf8即可。具体用法自己看 man zhcon。切勿在x环境的虚拟终端下执行，容易死机也无必要。
<br>
<br>
*Q: 那个桌面好pp哦，哪里可以下载主题？怎么安装？
<br>
A: 在<a href="http://www.gnome-look.org/" target="_blank" class="postlink">gnome桌面主题站</a>下载，安装很简单，找到 系统－首选项－主题－安装。另外，为了使所有用户包括root帐户都能使用你的主题，装完以后请执行
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo ln -s ~/.themes/* /usr/share/themes
            <br>
            sudo ln -s ~/.icons/* /usr/share/icons</td>
        </tr>
    </tbody>
</table>
否则，像新立得之类界面一定很丑。
<br>
<br>
Q: 3D桌面怎么做的阿？
<br>
A: 这玩意儿叫compiz fusion。本论坛的超酷桌面板块有<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=61686" target="_blank" class="postlink">安装方法</a>。注意还是测试版，请自负风险，并做好备份。注，compiz和beryl已经合并，就叫compiz fusion。不同显卡有不同的设置方式，会牵扯到不少概念，如果不是很清楚的话，新手就不要涉及了。不久应该会有compiz fusion的wiki。<a href="http://www.compiz-fusion.org/" target="_blank" class="postlink">compiz fusion主页（英文）</a>。
<br>
<br>
Q: 我应该装哪个版本的ubuntu？
<br>
A: 这个要看个人喜好咯。喜欢gnome的用ubuntu，喜欢kde的用kubuntu，喜欢xfce的用xubuntu。机器比较老，或者内存小于256MB的，请选择xubuntu（轻量级，很快）或者server版本（无桌面）。如果不清楚我在说什么，先看<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=67545" target="_blank" class="postlink">这里</a>。
<br>
<br>
Q: 如何调节cpu的频率？如何控制风扇速度？
<br>
A: 参见<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=31050" target="_blank" class="postlink">cpu频率调节与硬件监视软件</a>，<a href="http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_detect_CPU_temperature.2C_fan_speeds_and_voltages_.28lm-sensors.29" target="_blank" class="postlink">How to detect CPU temperature, fan speeds and voltages (lm-sensors)及以下部分</a>，以及<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=55438" target="_blank" class="postlink">配置CPU温度.风扇转速,硬盘温度监控(附加Athlon/Duron系统安全度夏指南)</a>
<br>
<br>
Q: 那种分区各式比较好阿？
<br>
A: 个人比较推荐reiserfs，速度快；ext3也可以。
<br>
<br>
Q: windows的分区为什么无法写入，只能读？
<br>
A: 如果是ntfs的分区，ubuntu是不支持写入的。如果需要写入ntfs分区，请安装ntfs-3g。具体参见：<a href="http://forum.ubuntu.org.cn/viewtopic.php?p=197894" target="_blank" class="postlink">可读写ntfs分区的ntfs-3g（正式版）的安装与使用</a>。
<br>
<br>
Q: 字体好难看，怎么美化？
<br>
A: 中文字体确实难看，因为好看的中文字体几乎都有版权的。文泉驿是一个不错的选择。当然我们可以用windows字体来美化，个人比较喜欢方正<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=70240&amp;highlight=" target="_blank" class="postlink">准圆</a>。可以参看本论坛中文区的精华。另外，不推荐那个vera sans yuanti，在新版本的ubuntu上有不少问题。
<br>
注意：拷贝字体后一定要
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo fc-cache -fv</td>
        </tr>
    </tbody>
</table>
并且注意字体的权限。最方便的是把字体放在~/.fonts下。另外给大家两篇文章，比较详细。
<br>
<a href="http://www.linuxsir.org/bbs/showthread.php?t=269312" target="_blank" class="postlink">Linux 字体微调 - Vista 效果版</a>和<a href="http://www.linuxsir.org/bbs/showthread.php?t=266659" target="_blank" class="postlink">Linux 字体微调 - windows 效果版</a>。
<br>
<br>
Q: 重装windows后，ubuntu怎么就没了？
<br>
A: 因为那个自说自话的windows把硬盘的MBR重写了，导致ubuntu无法引导。有多种方法可供选择。参见<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=34905" target="_blank" class="postlink">方法一</a>，<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=9815" target="_blank" class="postlink">方法二</a>，<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=34110" target="_blank" class="postlink">方法三</a>。
<br>
<br>
Q: 怎样把ubuntu装到移动硬盘上？
<br>
A: 参见：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=29692" target="_blank" class="postlink">把ubuntu操作系统装入移动硬盘，并在不同电脑上运行</a>。
<br>
<br>
Q: 怎样修改默认的启动系统？
<br>
A:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
            <br>
            sudo gedit /boot/grub/menu.lst</td>
        </tr>
    </tbody>
</table>
找到 default 0，将0改成你其他系统的位置，位于第X项，就是修改成 X-1（从0开始数）。
<br>
<br>
*Q: 如何去掉/加上桌面上的图标？
<br>
A: 终端输入gconf-editor，找到/apps-nautilus-desktop/volumes_visible，然后该怎么做就怎么做吧。
<br>
<br>
*Q: 如何开机就进入文本模式而不是图形界面？
<br>
A: 把gdm服务关掉即可。在控制台下启动x用 startx 。
<br>
<br>
Q: 刻盘安装怎么无法从光驱启动？
<br>
A: 出现这种情况，恐怕不是光驱的问题，就是你把它刻成镜像了。请重新刻盘。
<br>
<br>
Q: 如何自己编译/安装软件阿（为什么我没有make命令/gcc怎么没有 等）？
<br>
A: 你没有安装编译环境，只需
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install build-essential</td>
        </tr>
    </tbody>
</table>
<br>
<br>
Q: 为什么我更新后，启动界面多出几个内核选项，又如何删除？
<br>
A: 那些是以前的内核，当前系统只能用一个内核，所以不删除也没有关系。可以用新立得将不需要的内核删除，找到以linux-开头的包，小心看过再删除。内核包名是 linux-image-xxx。
<br>
<br>
Q: 如何打开chm文件？
<br>
A: 安装xchm，或chmsee，或kchmviewer（有nokde版本）；或者添加一个firefox的插件，叫chmreader，很好用的，强烈推荐，请到mozilla主页下载。
<br>
<br>
Q: 为什么用源里面的acroreader中文乱码/evince/xpdf乱码？
<br>
A: 最好的解决办法是区adobe主页下载adobe reader（deb包），参见：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=75037&amp;highlight=" target="_blank" class="postlink">Adobe Reader 8.11 for linux (deb)</a>。或者把xpdf的几个中文相关装上，如 xpdf-chinese-simplified 等（不是很完美）。
<br>
<br>
Q: linux下有病毒么，需要安装防火墙吗？
<br>
A: 据我所知，大概有那么200种，比起windows的2000000种（还在与日俱增）少多了。如果你中毒了，恭喜你，可以买彩票了。如果实在要装，个人推荐antivir，是一个免费的杀毒软件，排名很前的哦。<a href="http://www.avira.com/" target="_blank" class="postlink">主页</a>，<a href="http://free-av.com/personal/en/unix/antivir-workstation-pers.tar.gz" target="_blank" class="postlink">下载地址</a>。
<br>
至于防火墙，ubuntu默认并未激活，无特殊需要，根本不必开启，因为远程端口默认是关闭的。换句话说，你完全可以裸奔<img src="http://forum.ubuntu.org.cn/images/smiles/icon_biggrin.gif" alt="Very happy" border="0">。参见：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=46255" target="_blank" class="postlink">windows, osx, linux/unix安全性比较</a>。如果需要开启，请安装firestarter
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install firestarter</td>
        </tr>
    </tbody>
</table>
或者可以手动配置iptables。
<br>
<br>
Q: 为什么无法登录系统，我明明没有设置帐号？
<br>
A: 很有可能你用了oem安装方式，那么用户名就是oem，密码是你安装时设置的那个。
<br>
<br>
Q: 鼠标功能键如何启用？我那么好的罗技、微软鼠标，就和普通鼠标没区别么？
<br>
A: 参见：<a href="http://ubuntuguide.org/wiki/Ubuntu:Feisty#Activate_side-mouse-buttons_in_FireFox" target="_blank" class="postlink">Activate side-mouse-buttons in FireFox</a>和<a href="http://ubuntuguide.org/wiki/Ubuntu:Feisty#Install_.26_Configure_IMWheel" target="_blank" class="postlink">Install &amp; Configure IMWheel</a>。
<br>
另外罗技鼠标还可以安装lomoco来配置分辨率。
<br>
<br>
Q: server版本为什么没有桌面？
<br>
A: 正因为是server版本，本来就没有桌面，不过你可以自己安装。
<br>
gnome
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo aptitude install ubuntu-desktop</td>
        </tr>
    </tbody>
</table>
kde
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo aptitude install kubuntu-desktop</td>
        </tr>
    </tbody>
</table>
xfce
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo aptitude install xubuntu-desktop</td>
        </tr>
    </tbody>
</table>
<br>
<br>
Q: windows下如何访问linux的分区？
<br>
A: 参见：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=5271" target="_blank" class="postlink">常用windows下访问ext3和Reiser分区的工具</a>。
<br>
<br>
Q: linux需要磁盘碎片整理么？
<br>
A: 参见：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=27451" target="_blank" class="postlink">linux不需要磁盘碎片整理</a>。
<br>
<br>
Q: 为什么我的/分区或者/var分区越来越大？能删除么？apt-get或新立得下载的软件包都在哪里？
<br>
A: 当然可以，/var/cache/apt/archieve 下的都是软件的安装缓存，你可以直接删除，或者用命令sudo apt-get
autoclean（只删除低版本的deb包），sudo apt-get
clean（全部删除）。为了以后重装系统方便，可以将这些deb包保存到其他地方。
<br>
<br>
Q: 为什么无法安装？我一见到"loading kernel"就停住了，死活过不去？
<br>
A: 你可以在安装时按F6，然后在启动选项后面添上 acpi=off，也可以尝试noapic。具体请搜索论坛。
<br>
<br>
Q: stardict为什么没有字典？如何安装？
<br>
A: 请到<a href="http://stardict.sourceforge.net/cn/index.php" target="_blank" class="postlink">stardict主页</a>下
载字典，解压后放到/usr/share/stardict/dic。也可直接下载源里的（只是数量有限）。注意，stardict-treedict-
infoBrowse-zh_CN-2.4.2 应该放到/usr/share/stardict/treedict
而非treedic，请自行把该目录更名。
<br>
<br>
Q: 一般软件安装在什么目录？
<br>
A: 一般的deb包（包括新立得或者apt-get下载的）都装在/usr。自己下载的压缩包或者编译的包，有些可以选择安装目录，一般放在/usr/local/，也有在/opt的。如果想知道具体位置，用命令
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">dpkg -L xxx.deb</td>
        </tr>
    </tbody>
</table>
注意，xxx是deb包的名称，也可以用新立得来查看。另参见<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=38906" target="_blank" class="postlink">apt使用参考</a>。
<br>
<br>
Q: 系统从低版本升级到高版本发生问题，怎么办？
<br>
A: 升级不出问题的很少。如果是小问题，那么试着自己解决一下。如果系统出问题，而且不知道该怎么办，建议用高版本的盘重新干净的安装。与其找解决方法还不如重装来的方便快捷。
<br>
<br>
Q: 为什么ubuntu要用那么多内存阿？
<br>
A: 千万别以windows的思路思考问题。这是linux，内存管理机制要比win优秀的多得多，尽量使用内存而不是虚拟内存(swap区)。
<br>
<br>
Q: 为什么我编辑/执行文件的时候说没有这个文件或目录？
<br>
A: 首先，你要在该文件的当前目录进行操作，你需要用到cd命令。另外请注意，linux是分大小写的。常见的问题是，/etc/X11/xorg.conf，请看这里的X11是大写的。补充一点，请多用tab键进行命令／路径补全，你一定会爱上她的。
<br>
<br>
Q: 为什么我用ctrl+alt+Fn进入控制台时花屏/zhcon在控制台下花屏？
<br>
A: 你需要开启内核的frame buffer
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo nano /boot/grub/menu.lst</td>
        </tr>
    </tbody>
</table>
找到kernel一行（是你一直使用的内核，非single那个），在末尾添上vga=数值，数值请看下表（为方便已经把数值换算成十进制）：
<br>
* 色彩      640x400   640x480	800x600    1024x768  1280x1024 1600x1200
<br>
* 4bits	   ?----------?-----------770--------?-----------?-----------?
<br>
* 8bits	   768-------769--------771--------773--------775--------796
<br>
* 15bits  ?---------784--------787--------790--------793--------797
<br>
* 16bits  ?---------785--------788--------791--------794--------798
<br>
* 24bits  ?---------786--------789--------792--------795--------799
<br>
例如，1024*768@16bits就是添上 vga=791
<br>
注意：vga不支持宽屏，只能找相近的值，而且屏幕会被拉扁。
<br><br>Q: 什么是super键？如何设置？
<br>
A: super键就是你的win键，一般在ctrl和alt之间。找到 系统－首选项－键盘－布局选项－Alt/Win键行为，将&#8220;super键被映射到windows键&#8221;钩上。
<br>
<br>
*Q: 为什么我的gmplayer打开时会出现
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>引用:</strong></td>
        </tr>
        <tr>
            <td class="quote">
            <br>
            opening/initializing the selected video-out(-vo)device.</td>
        </tr>
    </tbody>
</table>
<br>
A: 说明你没有选择正确的视频输出驱动。右键单击mplayer窗口，找到Preferences-Video-Available drivers，选择一个合适的即可。
<br>
<br>
Q: 如何解压/创建rar文件？
<br>
A:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install rar unrar</td>
        </tr>
    </tbody>
</table>
<br>
<br>
Q: 如何更改默认打开方式？
<br>
A: 右键单击文件，找到属性－打开方式，然后爱怎么做就怎么做。
<br>
<br>
Q: 有多线程下载工具吗？
<br>
A: d4x、firefox的downthemall插件，另外推荐multiget，速度最快。参见：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=35033" target="_blank" class="postlink">Multiget多线程下载</a>。
<br>
<br>
*Q: 我的添加删除按钮怎么消失了？
<br>
A: 右键单击&#8220;应用程序&#8221;，找到编辑菜单，然后看添加删除有没有钩上。也有可能你把这个软件包给删除了，请执行
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install gnome-app-install</td>
        </tr>
    </tbody>
</table>
<br>
<br>
Q: 如何进入控制台，如何从控制台重新回到x环境？
<br>
A: ctrl+alt+Fx (x=1 2 3 4 5 6)进入控制台，ctrl+alt+F7回到x。
<br>
<br>
*Q: 为什么我的主题那么难看，就像gtk1.x似的？
<br>
A: 大部分情况是因为系统默认没有安装gtk2-engines-pixbuf，而很多主题都要用到pixmap这个引擎。只要
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install gtk2-engines-pixbuf</td>
        </tr>
    </tbody>
</table>
其他的主题可能需要另装引擎，具体问题具体分析。（另外推荐一下<a href="http://murrine.netsons.org/" target="_blank" class="postlink">murrine</a>引擎，很快，也很漂亮 <img src="http://forum.ubuntu.org.cn/images/smiles/icon_biggrin.gif" alt="Very happy" border="0">）
<br>
<br>
Q: 如何在桌面打开终端？
<br>
A:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install nautilus-open-terminal</td>
        </tr>
    </tbody>
</table>
<br>
<br>
*Q: 如何以root权限打开文件（夹）？
<br>
A:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install nautilus-gksu</td>
        </tr>
    </tbody>
</table>
然后右键单击文件或文件夹，选择&#8220;以管理员打开&#8221;。或者可以
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo nautilus 某文件夹</td>
        </tr>
    </tbody>
</table>
如果想让sudo不再输入密码，请参见：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=45049" target="_blank" class="postlink">讓sudo不在輸入密碼</a>。
<br>
<br>
Q: 为什么我的时间比实际的要快／慢？
<br>
A: 因为你有ubuntu以外的系统，非常可能是windows，而windows是不使用utc的。你所需要做的是：
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo nano /etc/default/rcS</td>
        </tr>
    </tbody>
</table>
把UTC设置成no，即UTC=no。
<br>
<br>
Q: 为什么我的音频播放时有爆音/我的音量已经调到最大了，为什么还是很轻？
<br>
A: 很可能你把pcm调到最大了，而主声道的很低。另外如果没声音，看看是不是把某个给静音了（不要笑，这是常有的事）。顺便提一下，如果mic没用，也可能是同样的问题。
<br>
<br>
Q: 为什么升级到7.04我的声卡不出声？
<br>
A: 这个是内核的bug，两种方法，一是自己编译alsa驱动，参见： <a href="http://forum.ubuntu.org.cn/viewtopic.php?t=50865" target="_blank" class="postlink">7。04识别了声卡 喇叭显示正常 没声音的进来</a>，二是经最近内核更新又修正了，请尽量升级到2.6.20-16内核。
<br>
<br>
Q: 为什么升级软件后出现？
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem. </td>
        </tr>
    </tbody>
</table>
<br>
A: 请执行
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo dpkg --configure -a</td>
        </tr>
    </tbody>
</table>
<br>
<br>
Q: 如何开启字体的clear type？
<br>
A: 添加源
<br>
feisty:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">deb http://www.telemail.fi/mlind/ubuntu feisty fonts</td>
        </tr>
    </tbody>
</table>
<br>
edgy:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">deb http://www.telemail.fi/mlind/ubuntu edgy fonts</td>
        </tr>
    </tbody>
</table>
<br>
gpg key:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">gpg --keyserver subkeys.pgp.net --recv-keys 937215FF
            <br>
            gpg --export --armor 937215FF | sudo apt-key add -</td>
        </tr>
    </tbody>
</table>
<br>
<br>
feisty 64位:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">deb http://ubuntu.moshen.de/ feisty experimental</td>
        </tr>
    </tbody>
</table>
<br>
gpg key:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">wget http://ubuntu.moshen.de/2F306651.gpg -O- | sudo apt-key add -</td>
        </tr>
    </tbody>
</table>
<br>
然后
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get update &amp;&amp; sudo apt-get dist-upgrade</td>
        </tr>
    </tbody>
</table>
会提示升级3个包，安装完毕后重启x即可。
<br>
<br>
Q: 如何安装rpm包形式的软件？
<br>
A: 不推荐安装此类包，debian系有更好的包管理方式deb，尽量从源里安装软件（20000+的还不够么？）如果实在没有，那么请安装alien，把rpm包转成deb，具体操作方法参看man alien手册。
<br>
<br>
Q: 如何查看我的系统版本？
<br>
A:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">lsb_release -a</td>
        </tr>
    </tbody>
</table>
<br>
<br>
Q: 如何清理无用的包？
<br>
A:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get autoremove
            <br>
            sudo apt-get install gtkorphan</td>
        </tr>
    </tbody>
</table>
<br>
找到 系统-&gt;系统管理-&gt;Remove orphaned packages，然后清理不需要的包（注意别误删）。
<br>
<br>
Q: 为什么我的azureus不行？
<br>
A: 尽量下载官方主页的3系列版本，解压后直接运行，无须安装。<a href="http://sourceforge.net/project/showfiles.php?group_id=84122&amp;package_id=215453" target="_blank" class="postlink">下载地址</a>。
<br>
<br>
Q: 为什么我的audacious无法播放ape音频？
<br>
A:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install audacious-mac</td>
        </tr>
    </tbody>
</table>
<br>
<br>
Q: 为什么我的mplayer播放时无法全屏？
<br>
A:
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">nano ~/.mplayer/config</td>
        </tr>
    </tbody>
</table>
在开始的地方添上
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">zoom=yes</td>
        </tr>
    </tbody>
</table>
保存。
<br>
或者
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo nano /etc/mplayer/mplayer.conf</td>
        </tr>
    </tbody>
</table>
找到zoom=yes那行，把前面的注释#去掉，保存。
<br>
<br>
Q: 为什么我的mplayer无法拖动进度条？
<br>
A:
要么自己编译mplayer，但不推荐。要么就用快捷键，比进度条方便而且精确，这些键包括上下左右和翻页键，也可以自己修改这些键的跳跃程度（时间）。
可以把/etc/mplayer/input.conf这个文件cp到~/.mplayer，然后修改所需要的部分。
<br>
<br>
Q: 为什么无法登录QQ？
<br>
A: 这个得问万恶的X讯，把除其本家的QQ外的其他QQ程序给咔嚓掉了。最可靠的方法是用wine虚拟，其他的程序似乎有的可以，有的不行。
<br>
<br>
Q: 为什么播放视频时每隔20分钟会自动黑屏／启用屏保？
<br>
A: 这个是bug，参见：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=61280&amp;highlight=" target="_blank" class="postlink">看视频时每隔20分钟就启用屏保的解决方法</a>。
<br>
<br>
Q: linux下有如ghost一样的备份工具么？
<br>
A: 当然有，一个是ghost，个人不推荐，因为支持格式少，二来速度也不咋的。强烈推荐clonezilla，参见：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=58659" target="_blank" class="postlink">ubuntu的安装与离线升级、跨版升级和备份策略</a>。
<br>
<br>
Q: ubuntu需要优化么？
<br>
A: 一般来说不需要，但可以进行适当调整，让你过把DIY的瘾。注意，强烈不建议新新手作这么危险的事情，至少做好备份。参见：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=52012" target="_blank" class="postlink">系统优化新手向导</a>。
<br><br>WIKI里发现的一句话技巧
<br>
<br>
查看软件xxx安装内容
<br>
<br>
*
<br>
<br>
dpkg -L xxx
<br>
<br>
查找软件
<br>
<br>
*
<br>
<br>
apt-cache search 正则表达式
<br>
<br>
查找文件属于哪个包
<br>
<br>
*
<br>
<br>
dpkg -S filename
<br>
apt-file search filename
<br>
<br>
查询软件xxx依赖哪些包
<br>
<br>
*
<br>
<br>
apt-cache depends xxx
<br>
<br>
查询软件xxx被哪些包依赖
<br>
<br>
*
<br>
<br>
apt-cache rdepends xxx
<br>
<br>
增加一个光盘源
<br>
<br>
*
<br>
<br>
sudo apt-cdrom add
<br>
<br>
系统升级
<br>
<br>
*
<br>
<br>
sudo apt-get update
<br>
sudo apt-get upgrade
<br>
sudo apt-get dist-upgrade
<br>
<br>
清除所以删除包的残余配置文件
<br>
<br>
*
<br>
<br>
dpkg -l |grep ^rc|awk '{print $2}' |tr ["\n"] [" "]|sudo xargs dpkg -P  -
<br>
<br>
编译时缺少h文件的自动处理
<br>
<br>
*
<br>
<br>
sudo auto-apt run ./configure
<br>
<br>
查看安装软件时下载包的临时存放目录
<br>
<br>
*
<br>
<br>
ls /var/cache/apt/archives
<br>
<br>
备份当前系统安装的所有包的列表
<br>
<br>
*
<br>
<br>
dpkg --get-selections | grep -v deinstall &gt; ~/somefile
<br>
<br>
从上面备份的安装包的列表文件恢复所有包
<br>
<br>
*
<br>
<br>
dpkg --set-selections &lt; ~/somefile
<br>
sudo dselect
<br>
<br>
清理旧版本的软件缓存
<br>
<br>
*
<br>
<br>
sudo apt-get autoclean
<br>
<br>
清理所有软件缓存
<br>
<br>
*
<br>
<br>
sudo apt-get clean
<br>
<br>
删除系统不再使用的孤立软件
<br>
<br>
*
<br>
<br>
sudo apt-get autoremove
<br>
<br>
系统
<br>
<br>
查看内核
<br>
<br>
*
<br>
<br>
uname -a
<br>
<br>
查看Ubuntu版本
<br>
<br>
*
<br>
<br>
cat /etc/issue
<br>
<br>
查看内核加载的模块
<br>
<br>
*
<br>
<br>
lsmod
<br>
<br>
查看PCI设备
<br>
<br>
*
<br>
<br>
lspci
<br>
<br>
查看USB设备
<br>
<br>
*
<br>
<br>
lsusb
<br>
<br>
查看网卡状态
<br>
<br>
*
<br>
<br>
sudo ethtool eth0
<br>
<br>
查看CPU信息
<br>
<br>
*
<br>
<br>
cat /proc/cpuinfo
<br>
<br>
显示当前硬件信息
<br>
<br>
*
<br>
<br>
lshw
<br>
<br>
硬盘
<br>
<br>
查看硬盘的分区
<br>
<br>
*
<br>
<br>
sudo fdisk -l
<br>
<br>
查看IDE硬盘信息
<br>
<br>
*
<br>
<br>
sudo hdparm -i /dev/hda
<br>
<br>
查看STAT硬盘信息
<br>
<br>
*
<br>
<br>
sudo hdparm -I /dev/sda
<br>
或
<br>
sudo apt-get install blktool
<br>
sudo blktool /dev/sda id
<br>
<br>
查看硬盘剩余空间
<br>
<br>
*
<br>
<br>
df -h
<br>
df -H
<br>
<br>
查看目录占用空间
<br>
<br>
*
<br>
<br>
du -hs 目录名
<br>
<br>
优盘没法卸载
<br>
<br>
*
<br>
<br>
sync
<br>
fuser -km /media/usbdisk
<br>
<br>
内存
<br>
<br>
查看当前的内存使用情况
<br>
<br>
*
<br>
<br>
free -m
<br>
<br>
进程
<br>
<br>
查看当前有哪些进程
<br>
<br>
*
<br>
<br>
ps -A
<br>
<br>
中止一个进程
<br>
<br>
*
<br>
<br>
kill 进程号(就是ps -A中的第一列的数字)
<br>
或者  killall 进程名
<br>
<br>
强制中止一个进程(在上面进程中止不成功的时候使用)
<br>
<br>
*
<br>
<br>
kill -9 进程号
<br>
或者  killall -9 进程名
<br>
<br>
图形方式中止一个程序
<br>
<br>
*
<br>
<br>
xkill 出现骷髅标志的鼠标，点击需要中止的程序即可
<br>
<br>
查看当前进程的实时状况
<br>
<br>
*
<br>
<br>
top
<br>
<br>
查看进程打开的文件
<br>
<br>
*
<br>
<br>
lsof -p
<br>
<br>
ADSL
<br>
<br>
配置 ADSL
<br>
<br>
*
<br>
<br>
sudo pppoeconf
<br>
<br>
ADSL手工拨号
<br>
<br>
*
<br>
<br>
sudo pon dsl-provider
<br>
<br>
激活 ADSL
<br>
<br>
*
<br>
<br>
sudo /etc/ppp/pppoe_on_boot
<br>
<br>
断开 ADSL
<br>
<br>
*
<br>
<br>
sudo poff
<br>
<br>
查看拨号日志
<br>
<br>
*
<br>
<br>
sudo plog
<br>
<br>
网络
<br>
<br>
根据IP查网卡地址
<br>
<br>
*
<br>
<br>
arping IP地址
<br>
<br>
查看当前IP地址
<br>
<br>
*
<br>
<br>
ifconfig eth0 |awk '/inet addr/ {split($2,x,":");print x[2]}'
<br>
<br>
查看当前外网的IP地址
<br>
<br>
*
<br>
<br>
w3m -no-cookie -dump <a href="http://www.ip138.com/" target="_blank">www.ip138.com</a>|grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'
<br>
w3m -no-cookie -dump ip.loveroot.com|grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'
<br>
<br>
查看当前监听80端口的程序
<br>
<br>
*
<br>
<br>
lsof -i :80
<br>
<br>
查看当前网卡的物理地址
<br>
<br>
*
<br>
<br>
arp -a | awk '{print $4}'
<br>
ifconfig eth0 | head -1 | awk '{print $5}'
<br>
<br>
立即让网络支持nat
<br>
<br>
*
<br>
<br>
sudo echo 1 &gt; /proc/sys/net/ipv4/ip_forward
<br>
sudo iptables -t nat -I POSTROUTING -j MASQUERADE
<br>
<br>
查看路由信息
<br>
<br>
*
<br>
<br>
netstat -rn
<br>
sudo route -n
<br>
<br>
手工增加删除一条路由
<br>
<br>
*
<br>
<br>
sudo route add -net 192.168.0.0 netmask 255.255.255.0 gw 172.16.0.1
<br>
sudo route del -net 192.168.0.0 netmask 255.255.255.0 gw 172.16.0.1
<br>
<br>
修改网卡MAC地址的方法
<br>
<br>
*
<br>
<br>
sudo ifconfig eth0 down #关闭网卡
<br>
sudo ifconfig eth0 hw ether 00:AA:BB:CC:DD:EE #然后改地址
<br>
sudo ifconfig eth0 up #然后启动网卡
<br>
<br>
统计当前IP连接的个数
<br>
<br>
*
<br>
<br>
netstat -na|grep ESTABLISHED|awk '{print $5}'|awk -F: '{print $1}'|sort|uniq -c|sort -r -n
<br>
netstat -na|grep SYN|awk '{print $5}'|awk -F: '{print $1}'|sort|uniq -c|sort -r -n
<br>
<br>
统计当前20000个IP包中大于100个IP包的IP地址
<br>
<br>
*
<br>
<br>
tcpdump -tnn -c 20000 -i eth0 | awk -F "." '{print $1"."$2"."$3"."$4}' | sort | uniq -c | sort -nr | awk ' $1 &gt; 100 '
<br>
<br>
屏蔽IPV6
<br>
<br>
*
<br>
<br>
echo "blacklist ipv6" | sudo tee /etc/modprobe.d/blacklist-ipv6
<br>
<br>
服务
<br>
<br>
添加一个服务
<br>
<br>
*
<br>
<br>
sudo update-rc.d 服务名 defaults 99
<br>
<br>
删除一个服务
<br>
<br>
*
<br>
<br>
sudo update-rc.d 服务名 remove
<br>
<br>
临时重启一个服务
<br>
<br>
*
<br>
<br>
/etc/init.d/服务名 restart
<br>
<br>
临时关闭一个服务
<br>
<br>
*
<br>
<br>
/etc/init.d/服务名 stop
<br>
<br>
临时启动一个服务
<br>
<br>
*
<br>
<br>
/etc/init.d/服务名 start
<br>
<br>
设置
<br>
<br>
配置默认Java使用哪个
<br>
<br>
*
<br>
<br>
sudo update-alternatives --config java
<br>
<br>
修改用户资料
<br>
<br>
*
<br>
<br>
sudo chfn userid
<br>
<br>
给apt设置代理
<br>
<br>
*
<br>
<br>
export http_proxy=http://xx.xx.xx.xx:xxx
<br>
<br>
修改系统登录信息
<br>
<br>
*
<br>
<br>
sudo vim /etc/motd
<br>
<br>
中文
<br>
<br>
转换文件名由GBK为UTF8
<br>
<br>
*
<br>
<br>
sudo apt-get install convmv
<br>
convmv -r -f cp936 -t utf8 --notest --nosmart *
<br>
<br>
转换文件内容由GBK为UTF8
<br>
<br>
*
<br>
<br>
iconv -f gbk -t utf8 $i &gt; newfile
<br>
<br>
转换 mp3 标签编码
<br>
<br>
*
<br>
<br>
sudo apt-get install python-mutagen
<br>
find . -iname &#8220;*.mp3&#8221; -execdir mid3iconv -e GBK {} \;
<br>
<br>
控制台下显示中文
<br>
<br>
*
<br>
<br>
sudo apt-get install zhcon
<br>
使用时，输入zhcon即可
<br>
<br>
文件
<br>
<br>
快速查找某个文件
<br>
<br>
*
<br>
<br>
whereis filename
<br>
<br>
*
<br>
<br>
find 目录 -name 文件名
<br>
<br>
查看文件类型
<br>
<br>
*
<br>
<br>
file filename
<br>
<br>
显示xxx文件倒数6行的内容
<br>
<br>
*
<br>
<br>
tail -n 6 xxx
<br>
<br>
让tail不停地读地最新的内容
<br>
<br>
*
<br>
<br>
tail -n 10 -f /var/log/apache2/access.log
<br>
<br>
查看文件中间的第五行（含）到第10行（含）的内容
<br>
<br>
*
<br>
<br>
sed -n '5,10p' /var/log/apache2/access.log
<br>
<br>
查找包含xxx字符串的文件
<br>
<br>
*
<br>
<br>
grep -l -r xxx .
<br>
<br>
查找关于xxx的命令
<br>
<br>
*
<br>
<br>
apropos xxx
<br>
man -k xxx
<br>
<br>
通过ssh传输文件
<br>
<br>
*
<br>
<br>
scp -rp /path/filename username@remoteIP:/path  #将本地文件拷贝到服务器上
<br>
scp -rp username@remoteIP:/path/filename /path  #将远程文件从服务器下载到本地
<br>
<br>
查看某个文件被哪些应用程序读写
<br>
<br>
*
<br>
<br>
lsof 文件名
<br>
<br>
把所有文件的后辍由rm改为rmvb
<br>
<br>
*
<br>
<br>
rename 's/.rm$/.rmvb/' *
<br>
<br>
把所有文件名中的大写改为小写
<br>
<br>
*
<br>
<br>
rename 'tr/A-Z/a-z/' *
<br>
<br>
删除特殊文件名的文件，如文件名：--help.txt
<br>
<br>
*
<br>
<br>
rm -- --help.txt 或者 rm ./--help.txt
<br>
<br>
查看当前目录的子目录
<br>
<br>
*
<br>
<br>
ls -d */. 或 echo */.
<br>
<br>
将当前目录下最近30天访问过的文件移动到上级back目录
<br>
<br>
*
<br>
<br>
find . -type f -atime -30 -exec mv {} ../back \;
<br>
<br>
将当前目录下最近2小时到8小时之内的文件显示出来
<br>
<br>
*
<br>
<br>
find . -mmin +120 -mmin -480 -exec more {} \;
<br>
<br>
删除修改时间在30天之前的所有文件
<br>
<br>
*
<br>
<br>
find . -type f -mtime +30 -mtime -3600 -exec rm {} \;
<br>
<br>
查找guest用户的以avi或者rm结尾的文件并删除掉
<br>
<br>
*
<br>
<br>
find . -name '*.avi' -o -name '*.rm' -user 'guest' -exec rm {} \;
<br>
<br>
查找的不以java和xml结尾,并7天没有使用的文件删除掉
<br>
<br>
*
<br>
<br>
find . ! -name *.java ! -name &#8216;*.xml&#8217; -atime +7 -exec rm {} \;
<br>
<br>
统计当前文件个数
<br>
<br>
*
<br>
<br>
ls /usr/bin|wc -w
<br>
<br>
显示当前目录下2006-01-01的文件名
<br>
<br>
*
<br>
<br>
ls -l |grep 2006-01-01 |awk '{print $8}'
<br>
<br>
压缩
<br>
<br>
解压缩 xxx.tar.gz
<br>
<br>
*
<br>
<br>
tar -zxvf xxx.tar.gz
<br>
<br>
解压缩 xxx.tar.bz2
<br>
<br>
*
<br>
<br>
tar -jxvf xxx.tar.bz2
<br>
<br>
压缩aaa bbb目录为xxx.tar.gz
<br>
<br>
*
<br>
<br>
tar -zcvf xxx.tar.gz aaa bbb
<br>
<br>
压缩aaa bbb目录为xxx.tar.bz2
<br>
<br>
*
<br>
<br>
tar -jcvf xxx.tar.bz2 aaa bbb
<br>
<br>
Nautilus
<br>
<br>
显示隐藏文件
<br>
<br>
*
<br>
<br>
Ctrl+h
<br>
<br>
显示地址栏
<br>
<br>
*
<br>
<br>
Ctrl+l
<br>
<br>
特殊 URI 地址
<br>
<br>
*
<br>
<br>
* <a href="computer:///" target="_blank">computer:///</a> - 全部挂载的设备和网络
<br>
* <a href="network:///" target="_blank">network:///</a> - 浏览可用的网络
<br>
* <a href="burn:///" target="_blank">burn:///</a> - 一个刻录 CDs/DVDs 的数据虚拟目录
<br>
* <a href="smb:///" target="_blank">smb:///</a> - 可用的 windows/samba 网络资源
<br>
* x-nautilus-desktop:/// - 桌面项目和图标
<br>
* <a href="file:///" target="_blank">file:///</a> - 本地文件
<br>
* <a href="trash:///" target="_blank">trash:///</a> - 本地回收站目录
<br>
* <a href="ftp:///" target="_blank">ftp://</a> - FTP 文件夹
<br>
* <a href="ssh://" target="_blank">ssh://</a> - SSH 文件夹
<br>
* <a href="fonts:///" target="_blank">fonts:///</a> - 字体文件夹，可将字体文件拖到此处以完成安装
<br>
* <a href="themes:///" target="_blank">themes:///</a> - 系统主题文件夹
<br>
<br>
查看已安装字体
<br>
<br>
*
<br>
<br>
在nautilus的地址栏里输入&#8221;fonts:///&#8220;，就可以查看本机所有的fonts
<br>
<br>
程序
<br>
<br>
详细显示程序的运行信息
<br>
<br>
*
<br>
<br>
strace -f -F -o outfile &lt;cmd&gt;
<br>
<br>
日期和时间
<br>
<br>
设置日期
<br>
<br>
*
<br>
<br>
#date -s mm/dd/yy
<br>
<br>
设置时间
<br>
<br>
*
<br>
<br>
#date -s HH:MM
<br>
<br>
将时间写入CMOS
<br>
<br>
*
<br>
<br>
hwclock --systohc
<br>
<br>
读取CMOS时间
<br>
<br>
*
<br>
<br>
hwclock --hctosys
<br>
<br>
从服务器上同步时间
<br>
<br>
*
<br>
<br>
sudo ntpdate time.nist.gov
<br>
<br>
控制台
<br>
<br>
不同控制台间切换
<br>
<br>
*
<br>
<br>
Ctrl + ALT + &#8592;
<br>
Ctrl + ALT + &#8594;
<br>
<br>
指定控制台切换
<br>
<br>
*
<br>
<br>
Ctrl + ALT + Fn(n:1~7)
<br>
<br>
控制台下滚屏
<br>
<br>
*
<br>
<br>
SHIFT + pageUp/pageDown
<br>
<br>
控制台抓图
<br>
<br>
*
<br>
<br>
setterm -dump n(n:1~7)
<br>
<br>
数据库
<br>
<br>
mysql的数据库存放在地方
<br>
<br>
*
<br>
<br>
/var/lib/mysql
<br>
<br>
从mysql中导出和导入数据
<br>
<br>
*
<br>
<br>
mysqldump 数据库名 &gt; 文件名  #导出数据库
<br>
mysqladmin create 数据库名 #建立数据库
<br>
mysql 数据库名 &lt; 文件名 #导入数据库
<br>
<br>
忘了mysql的root口令怎么办
<br>
<br>
*
<br>
<br>
sudo /etc/init.d/mysql stop
<br>
sudo mysqld_safe --skip-grant-tables &amp;
<br>
sudo mysqladmin -u user password 'newpassword''
<br>
sudo mysqladmin flush-privileges
<br>
<br>
修改mysql的root口令
<br>
<br>
*
<br>
<br>
sudo mysqladmin -uroot -p password '你的新密码'
<br>
<br>
其它
<br>
<br>
下载网站文档
<br>
<br>
*
<br>
<br>
wget -r -p -np -k <a href="http://www.21cn.com/" target="_blank">http://www.21cn.com</a>
<br>
&#183; -r：在本机建立服务器端目录结构；
<br>
&#183; -p: 下载显示HTML文件的所有图片；
<br>
&#183; -np：只下载目标站点指定目录及其子目录的内容；
<br>
&#183; -k: 转换非相对链接为相对链接。
<br>
<br>
如何删除Totem电影播放机的播放历史记录
<br>
<br>
*
<br>
<br>
rm ~/.recently-used
<br>
<br>
如何更换gnome程序的快捷键
<br>
<br>
*
<br>
<br>
点击菜单，鼠标停留在某条菜单上，键盘输入任意你所需要的键，可以是组合键，会立即生效；
<br>
如果要清除该快捷键，请使用backspace[/url]
<br><br> <img src ="http://www.cppblog.com/heidaizx/aggbug/33372.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-03 15:54 <a href="http://www.cppblog.com/heidaizx/articles/33372.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>安装完后对ubuntu的简单配置</title><link>http://www.cppblog.com/heidaizx/articles/33371.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Wed, 03 Oct 2007 07:47:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/33371.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/33371.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/33371.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/33371.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/33371.html</trackback:ping><description><![CDATA[转贴于<a href="http://forum.ubuntu.org.cn/post-443289.html">http://forum.ubuntu.org.cn/post-443289.html
</a><br><br>不知道这篇文章是什么时候的了，好像有点老了，有做修改的地方，我在后面用//提示<br><br>一些基本的东西：
<br>
GCC、C&amp;C++编译器：很奇怪的是Ubuntu并没有默认安装这些东西
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install gcc libc6-dev
            <br>
            sudo&nbsp; apt-get install build-essential </td>
        </tr>
    </tbody>
</table>
<br>
<br>
GTK：很多带有GUI的程序需要这个
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo&nbsp; apt-get install gnome-core-devel
            <br>
            sudo&nbsp; &nbsp;apt-get install libgtk2.0-dev </td>
        </tr>
    </tbody>
</table>
<br>
<br>
中文化
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo&nbsp; apt-get install language-pack-zh</td>
        </tr>
    </tbody>
</table>
<br>
<br>
scim输入法安装及设置
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo gedit /etc/X11/xinit/xinput.d/default
            <br>
            XIM=SCIM
            <br>
            XIM_PROGRAM=/usr/bin/scim
            <br>
            XIM_ARGS="-d"
            <br>
            GTK_IM_MODULE=scim
            <br>
            QT_IM_MODULE=scim
            <br>
            DEPENDS="scim,scim-gtk2-immodule | scim-qtimm" </td>
        </tr>
    </tbody>
</table>
<br>
重启Gnome以后生效。
<br>
<br>
修改root用户密码:
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo passwd root </td>
        </tr>
    </tbody>
</table>
<br>
<br>
字体缓存刷新
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo fc-cache -fv </td>
        </tr>
    </tbody>
</table>
<br>
<br>
备份XORG和menu
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo cp /etc/X11/xorg.conf&nbsp; &nbsp;/etc/X11/xorg.conf.backup
            <br>
            sudo cp /boot/grub/menu.lst&nbsp; &nbsp;/boot/grub/menu.lst.backup</td>
        </tr>
    </tbody>
</table>
<br>
<br>
添加源:
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo gedit /etc/apt/sources.list </td>
        </tr>
    </tbody>
</table>
<br>
论坛上收集的大学源
<br>
<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=38756" target="_blank" class="postlink">http://forum.ubuntu.org.cn/viewtopic.php?t=38756</a><span class="postlink"></span>
<br>
<br>
更新相关命令：
<br>
apt-cache search package 搜索包
<br>
apt-cache show package 获取包的相关信息，如说明、大小、版本等
<br>
sudo apt-get install package 安装包
<br>
sudo apt-get install package - - reinstall 重新安装包
<br>
sudo apt-get -f install 修复安装"-f = --fix-missing"
<br>
sudo apt-get remove package 删除包
<br>
sudo apt-get remove package - - purge 删除包，包括删除配置文件等
<br>
sudo apt-get update 更新源
<br>
sudo apt-get upgrade 更新已安装的包
<br>
sudo apt-get dist-upgrade 升级系统
<br>
sudo apt-get build-dep package 安装相关的编译环境
<br>
apt-get source package 下载该包的源代码
<br>
sudo apt-get clean &amp;&amp; sudo apt-get autoclean 清理无用的包
<br>
sudo apt-get check 检查是否有损坏的依赖
<br>
<br>
系统apt安装的软件包通常都是下载到如下文件夹：
<br>
/var/cache/apt
<br>
<br>
安装Java环境：
<br>
建议安装JDK，反正也不比JRE多用很多空间。
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install sun-java6-jdk
            <br>
            sudo update-alternatives --config java</td>
        </tr>
    </tbody>
</table>
<br>
////////////////////////////这个贴子确实有点老了在7.04中执行完上面的就会让你选择，选那个带java的选&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 项就可以了<br>
<br>
<br>配置JAVA环境变量:
&nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp; <br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo gedit /etc/environment</td>
        </tr>
    </tbody>
</table>
<br>
<br>
CLASSPATH=/usr/lib/jvm/java-6-sun/lib
<br>
JAVA_HOME=/usr/lib/jvm/java-6-sun
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo gedit /etc/jvm</td>
        </tr>
    </tbody>
</table>
<br>
将
<br>
/usr/lib/jvm/java-6-sun
<br>
移到顶部
<br>
<br>
<br>
ntfs读写:
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install ntfs-3g
            <br>
            sudo apt-get install ntfs-config </td>
        </tr>
    </tbody>
</table>
<br>
<br>
如果装上后不能显示中文那是下面红色的部分没有的缘故
<br>
/dev/sda1 /media/MyDisk ntfs-3g defaults,locale=zh_CN.UTF-8,umask=007,gid=1000 0 2
<br>
<br>
分区图形化：
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install gparted </td>
        </tr>
    </tbody>
</table>
<br>
<br>
<br>
硬盘性能测试：
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo hdparm -tT /dev/hda </td>
        </tr>
    </tbody>
</table>
<br>
设置硬盘传输模式可搜索此命令相关用法
<br>
<br>
<br>
在右键菜单中加入打开终端:
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install nautilus-open-terminal </td>
        </tr>
    </tbody>
</table>
<br>
<br>
系统图标目录：
<br>
usr/share/icons/hicolor/scalable/apps
<br>
/usr/share/pixmaps/
<br>
<br>
安装rar支持:
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install rar unrar </td>
        </tr>
    </tbody>
</table>
<br>
<br>
桌面图标Gnome显示或者隐藏：
<br>
gconf-editor
<br>
/apps/nautilus/desktop
<br>
<br>
配置字体sudo fontconfig-voodoo -f -s zh_CN
<br>
安装文泉驿字体：
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install xfonts-wqy </td>
        </tr>
    </tbody>
</table>
<br>
<br>
不过我还是觉得宋体好看，字体安装可到论坛搜索，不过kde中好像本来就有一个字体安装程序，很方便。
<br>
<br>
<br>
<br>
<br>
关闭IPV6：
<br>
<br>
1.在终端下输入
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo gedit /etc/modprobe.d/aliases</td>
        </tr>
    </tbody>
</table>
<br>
<br>
2.    注释掉这一行                          alias net-pf-10 ipv6
<br>
3.    存盘
<br>
4.    在终端下输入
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">&nbsp; &nbsp;sudo gedit /etc/modprobe.d/blacklist</td>
        </tr>
    </tbody>
</table>
<br>
5.    加入这一行                                blacklist ipv6
<br>
6.    保存文件＆从起电脑
<br>
必须从起电脑才生效。
<br>
做完以上这些後，打开一个终端并输入：
<br>
ip a | grep inet6
<br>
如果没有任何输出就说明 ipv6 确实关闭了。
<br>
<br>
<br>
并行启动程序，不过在我电脑上似乎没什么效果：
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo kate /etc/init.d/rc </td>
        </tr>
    </tbody>
</table>
<br>
CONCURRENCY=none为:CONCURRENCY=shell
<br>
用gedit打开是乱码～
<br>
<br>
将localhost化名为主机名
<br>
sudo gedit /etc/hosts
<br>
127.0.0.1 localhost yourhost
<br>
127.0.1.1 yourhost
<br>
<br>
swappiness：
<br>
虚拟内存相关的，
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo sysctl vm.swappiness=5</td>
        </tr>
    </tbody>
</table>
<br>
如果你想永久得改变这一值，你需要更改 sysctl.conf 文件：
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo gedit /etc/sysctl.conf </td>
        </tr>
    </tbody>
</table>
<br>
添加：vm.swappiness=5
<br>
<br>
<br>
服务优化：sysv-rc-conf
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install sysv-rc-conf </td>
        </tr>
    </tbody>
</table>
<br>
然后:
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo sysv-rc-conf </td>
        </tr>
    </tbody>
</table>
<br>
<br>
<br>
下面开工，
<br>
1.acpi-support
<br>
- 在S运行等级你最好使其处于&#8220;X&#8221;状态。
<br>
2.acpid
<br>
- acpi守护程序.这两个用于电源管理，对于笔记本和台式电脑很重要，所以让它们开启。
<br>
3.alsa
<br>
- 如果你使用alsa声音子系统，是的，开启它。
<br>
4.alsa-utils
<br>
-在我系统里，此服务取代了alsa，所以我关闭了alsa并在S运行等级将此服务开启。**注意**，我所说的&#8220;关闭&#8221;是指在所有运行等级里面去除所有&#8220;X&#8221;。如果在你系统里没有它，没问题。让我们继续。
<br>
5.anacron
<br>
-
一个cron子系统，当时间到达时用于执行任何没有被执行的cron作业。当某种cron作业时间准备好时，很可能你或许已经关闭了你的计算机。打个比
方，updatedb被计划在每天2点执行，但是在那个时候，你的计算机是关闭的，然后如果ananron服务如果是开启的话，它将设法抓起那个
updatedbcron&#8230; 我将它关闭是因为我不经常关闭我的笔记本，但是是否开启此服务完全取决于你。 <br>
6.apmd
<br>
-这是十分困惑我的一个服务。我已经开启了acpid服务，那同时开启apmd有啥好处呢？如果你的计算机不是那么老，甚至不能支持acpi，然后你可以设法关闭它。无论如何，我是关闭它的。
<br>
#apmd是电源管理，acpi也一样
<br>
7.atd
<br>
- 就像cron，一个作业调度程序。我把它关了
<br>
8.binfmt-support
<br>
- 核心支持其他二进制的文件格式。我让它开着
<br>
9.bluez-utiles
<br>
- 我把它关了因为我没有任何蓝牙设备
<br>
10.bootlogd
<br>
- 开启它
<br>
11.cron
<br>
&#8211; 开启它
<br>
12.cupsys
<br>
&#8211; 管理打印机的子系统。我没有打印机所以我关闭它了，如果你有打印机，开启他。
<br>
13.dbus
<br>
&#8211; 消息总线系统(message bus system)。非常重要，开启它。
<br>
14.dns-clean
<br>
&#8211; 当使用拨号连接，主要用于清除dns信息。我不用拨号，所以我关闭它。
<br>
15.evms
<br>
&#8211; 企业卷管理系统（Enterprise Volumn Management system）.我关闭它。
<br>
16.fetchmail
<br>
&#8211; 一个邮件接受守护进程，我关闭它。
<br>
17.gdm
<br>
&#8211; gnome桌面管理器。
<br>
无论如何我关闭它了，因为我将系统用终端引导。如果你想直接引导到图形用户界面，这取决于你。
<br>
18.gdomap
<br>
&#8211;事实上我也不知道为什么此服务必需开启。我没有在其他系统看见这个守护程序，所以我将其关闭并且我没觉得我失去了什么。开启它对笔记本或者台式机由任何好处吗？
<br>
#这个叫&#8220;GNUstep 分布式对象映射器&#8221;
<br>
19. gpm
<br>
&#8211; 终端鼠标支持。如果你觉得你在终端使用鼠标更好，那么在运行等级1和2开启它。那是你所需要的。
<br>
20.halt
<br>
- 别更改它。
<br>
21.hdparm
<br>
&#8211; 调整硬盘的脚本。我在运行等级2，3，4，5去除了它但是在S运行等级添加了它。我觉得早点打开DMA，32bit
I/O等等将对其余过程有益。我自己也将原来的脚本精简了一下。如果我知道我正做什么，我觉得做过多的检查没用。相应配置文件是
/etc/hdparm.conf。 <br>
#论坛上有
<br>
22.hibernate
<br>
&#8211; 如果你的系统支持休眠，把它打开，否则他对你没用。
<br>
23.hotkey-setup
<br>
&#8211; 此守护进程为你的笔记本建立一些热键映射。支持的制造商包括：HP,Acer, ASUS, Sony, Dell, 和IBM。如果你有那些品牌的笔记本，你可以打开它，否则它或许对你没有任何好处。
<br>
24.hotplug and hotplug-net
<br>
-激活热插拔系统是费时的。我将考虑关掉它们。我在我的/etc/network/interfaces文件作了很多更改，并将其设置为自动运
行，而不是在热插拔进程期间映射我的无线网卡。所以我可以将它们关掉。我已经测试过了，甚至我将它们关闭，ubuntu仍旧可以检测到我的usb驱动器，
我的数码相机，等等。所以我认为关掉它们是很安全的**注意**如果在关闭热插拔服务以后发现你的声卡部工作了，你可以将服务打开，或者编辑
/etc/modules文件并添加声卡驱动模块。经测试，后者比较快。 <br>
25.hplip
<br>
&#8211; HP打印机和图形子系统，我将其关闭。
<br>
26.ifrename
<br>
&#8211; 网络接口重命名（network interface rename）脚本。听上去很酷但是我把它关掉了。主要用于管理多网络接口名称。虽然我有无线网卡和以太网卡，两者被内核标识为eth0和ath0，所以此服务对我不是很有用。
<br>
27.ifupdown and ifupdown-clean
<br>
&#8211; 打开它，它们是开机时网络及口激活脚本。
<br>
28.inetd or inetd.real
<br>
&#8211; 查看文件/etc/inetd.conf 注释掉所有你不需要的服务。如果该文件不包含任何服务，那关闭它是很安全的。
<br>
29.klogd
<br>
&#8211; 打开它。
<br>
30.linux-restricted-modules-common
<br>
&#8211; 你应该去查看下是否你的系统装载有任何受限制的模块。既然我需要madwifiath_pci模块，所以我将其开启。受限制的模块可以从
/lib/linux-restricted-modules查看到。如果你发现你没有使用任何受限制的模块，那关掉这个服务没事。 <br>
31.lvm
<br>
&#8211; 我没有使用逻辑卷所以我将此服务关闭。让它开启如果你*确实*有lvm（lvm是逻辑卷管理器在此不再扩充）.
<br>
#如果你有八个硬盘，要让某一分区横跨两块硬盘就要用到这个东西，不过估计没人这么变态
<br>
32.makedev
<br>
&#8211; 打开它。
<br>
33.mdamd
<br>
&#8211; Raid管理工具。不使用Raid所以我将此服务关闭。
<br>
#磁盘阵列，如果你有八个硬盘...
<br>
34.module-init-tools
<br>
&#8211;从/etc/modules加载扩展模块。你可以研究/etc/modules文件查看是否有一些你不需要的模块。通常我们将此服务开启。
<br>
35.networking
<br>
&#8211;在启动期间通过扫描/etc/network/interfaces文件增加网络接口和配置dns信息。让它开着。
<br>
36.ntpdate
<br>
&#8211; 通过ubuntu时间服务器同步时间。在开机的时候我不需要它，故我关掉了此服务。
<br>
37.nvidia-kernel
<br>
&#8211; 我自己编译了nvidia驱动，所以此服务对我没用。如果你从受限制模块中使用nvidia驱动，那打开此服务。
<br>
38.pcmcia
<br>
&#8211;激活pcmica设备。我将此服务打开在S运行等级而不是分别在2，3，4，5运行等级打开此服务，因为我觉得起先让硬件设备准备更好。如果你在使用没有pcmica卡的台式机的话，请关闭此服务。
<br>
39.portmap
<br>
&#8211; 管理像nis，nfs等等之类服务的守护程序。如果你的笔记本或台式机是纯粹的客户端，那么关闭此服务。
<br>
40.powernowd
<br>
&#8211; 管理CPU频率的客户端程序。主要用于支持CPU speed stepping技术的笔记本。通常如果你在配置一台笔记本，你应该开启此服务。如果是台式机，那此服务应该没有用。
<br>
41.ppp and ppp-dns
<br>
- 对我没用，我不使用拨号。
<br>
42.readahead
<br>
- **感谢mr_pouit!**
<br>
readahead似乎是一种&#8220;预加载程序&#8221;。在开机时它将一些库文件加载到内存，以便一些程序启动的更快。但是它给启动时间增加了3-4秒。所
以，你可以留着它&#8230;或者不。**更新**，经我测试我觉得加载程序没有什么不同。所以我决定关闭此服务。如果你有打开此服务的理由，那就打开它。 <br>
43.reboot
<br>
- 别更改它。
<br>
44.resolvconf
<br>
&#8211; 按照你的网络状态自动配置DSN信息，我将它打开着。
<br>
45.rmnologin
<br>
&#8211; 如果发现nologin，那么去除它。此情况不会在笔记本上面发生，所以我摆脱它。
<br>
46.rsync
<br>
&#8211; rsync守护程序.
<br>
我不打算在我的笔记本上使用rsync协议，所以我将其关闭
<br>
47.sendsigs
<br>
&#8211; 在重启和关机期间发送信号。顺其自然。
<br>
48.single
<br>
&#8211; 激活单用户模式。顺其自然。
<br>
49.ssh
<br>
&#8211; ssh守护程序。
<br>
我需要ssh，所以我将此服务打开。
<br>
50.stop-bootlogd
<br>
&#8211; 从2，3，4，5运行等级停止bootlogd。顺其自然。
<br>
51.sudo
<br>
&#8211; 检查sudo状态。我没在一台笔记本或者台式机客户端上看到任何使用sudo的好处，因此我关闭了它。
<br>
52.sysklogd
<br>
- 顺其自然。
<br>
53.udev and udev-mab
<br>
&#8211; 用户空间dev文件系统（userspace dev filesystem）。好东西，我将它们打开。
<br>
54.umountfs
<br>
- 顺其自然。
<br>
55.urandom
<br>
&#8211; 随机数生成器。可能没什么用处，但是我留着它。
<br>
56.usplash
<br>
- 嗯，如果你想看到漂亮的开机画面，顺其自然。
<br>
无论如何沃关闭此服务了。如果你想关闭它，你也可以编辑/boot/grub/menu.lst文件注释掉splashimage行，除去开机splash核心选项。
<br>
57.vbesave
<br>
&#8211; 显卡BIOS配置工具。它能保存你显卡的状态。我将其开启。
<br>
58.xorg-common
<br>
&#8211; 设置X服务ICE socket。我将其从在S运行等级开启移动到2，3，4，5，运行等级。如果我引导到单用户模式，那我不需要此服务。在最初引导期间这种方法将不占用时间。
<br>
59.adjtimex
<br>
&#8211;这也是调整核心hw时钟的工具。通常你不会在开机列表中看见它。在非常少有的情况如果你确实在开机进程中看见它了，事出有因，因此最好顺其自然。在我的情况里，它是关闭的。
<br>
60.dirmngr
<br>
&#8211; 证书列表管理工具（certification lists management tool）。和gnupg一起工作。你必须看看你是否需要它。在我的情况里，我是关掉它的。
<br>
61.hwtools
<br>
&#8211; 一个优化irqs的工具。不确定打开它的好处。在我的情况里，我是关掉它的。
<br>
62.libpam-devperm
<br>
- 在系统崩溃之后用于修理设备文件许可的一个守护程序。听起来不错，因此我打开它了。
<br>
63.lm-sensors
<br>
&#8211;如果你的主板内建一些传感芯片，通过用户空间（userspace）查看hw状态可能是有帮助的。我运行了它，但是它提示&#8220;没有发现传感器&#8221;，因此我关闭了此服务。
<br>
64.mdadm-raid
<br>
&#8211; 作用和mdadm服务相同。用来管RAID设备。如果你没有此类设备，那尽管关掉它好了。
<br>
65.screen-cleanup
<br>
&#8211; 一个用来清除开机屏幕的脚本。嗯，是否关闭它有你决定。在我的情况里，我打开它了。
<br>
66.xinetd
<br>
&#8211; 用来管理其他守护进程的一个inetd超级守护程序。在我的系统里，xinetd管理chargen,daytime, echo和time
<br>
<br>
<br>
Grub以及lilo：
<br>
grub不能安装在xfs分区中。
<br>
lilo配置：
<br>
etc/lilo.conf
<br>
lilo修改后要执行sudo lilo
<br>
grub配置：
<br>
/boot/grub/menu.lst
<br>
启动时不要显示grub那个好看的图形界面：
<br>
在menu.lst启动参数中去掉splash，如果把quiet也一并去掉的话开机显示的信息会更详细。
<br>
<br>
字体优先级调节：
<br>
/etc/fonts/local.conf，具体设置可去搜索。
<br>
<br>
<br>
<br>
gtk2安装
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">apt-get install libgtk2.0-dev </td>
        </tr>
    </tbody>
</table>
<br>
curl-config
<br>
名为 'curl-config' 的程序可以在下列包中找到
<br>
* libcurl3-openssl-dev
<br>
* libcurl3-gnutls-dev
<br>
<br>
<br>
bootchat：
<br>
如果发现系统启动很慢，可以安装bootchart仔细看看系统过程：
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-cache search bootchart </td>
        </tr>
    </tbody>
</table>
<br>
安装好后重启之后在/var/log/bootchart生成系统详细启动过程的图片。
<br>
<br>
<br>
<br>
软件：
<br>
<br>
安装mplayer播放器
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install mplayer-fonts mplayer mplayer-skins mozilla-mplayer</td>
        </tr>
    </tbody>
</table>
<br>
在开始用它进行视频播放前还需要进行以下设置（先启动它），然后右键弹出主菜单 -&gt; Preferences/属性 -&gt;
Video/视频，在"Available drivers/可用驱动"中选择"x11"或"xv"，在同一窗口下半部份钩上"允许掉帧/Enable
frame dropping"。
<br>
<br>
<br>
<br>
Firefox后台打开标签
<br>
<br>
在浏览器地址栏里输入 about:config
<br>
<br>
browser.tabs.loadBookmarksInBackground 允许firefox从后台打开书签（true）
<br>
<br>
browser.tabs.loadDivertedinbackground 选择标签页打开方式 True=在后台打开连接； False=在前台打开连接
<br>
<br>
browser.tabs.loadFolderAndReplace   书签菜单的在标签中打开是否替换掉原来已经打开的标签 true=替换,默认值;false=
<br>
<br>
<br>
安装StarDict，星际译王：
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install stardict stardict-common
            <br>
            sudo apt-get install stardict-cdict-gb stardict-cedict-gb stardict-hanzim stardict-langdao-ce-gb stardict-langdao-ec-gb </td>
        </tr>
    </tbody>
</table>
stardict-oxford-gb stardict-xdict-ce-gb stardict-xdict-ec-gb
<br>
字典文件目录/usr/share/stardict/dic
<br>
或者是/home/yourname/.stardict/dic，放在这个下面似乎还要好点，毕竟是home下面方便备份下来。 ////////////////////////////////////////////////////////////////////////////我的cn99和台大源里已经找不到词典了，可以去星际译王的网站下个词典，而且我的用户文件夹下面也没有.stardict文件，只能放到上面提供的路径下了 ／／／／／／／／后来知道了用户文件下没有可以建一个嘛<br>
<br>
tvtime:
<br>
sudo apt-get install tvtime
<br>
添加如下的到etc/init.d/rc.local中：
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo gedit /etc/init.d/rc.local</td>
        </tr>
    </tbody>
</table>
<br>
sudo rmmod saa7134_alsa
<br>
sudo rmmod saa7134
<br>
sudo modprobe saa7134 card=3
<br>
权限问题
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo&nbsp; chown yourname ~/.tvtime/
            <br>
            sudo&nbsp; chmod -R 777 ~/.tvtime/</td>
        </tr>
    </tbody>
</table>
<br>
显卡驱动安装后打不开：
<br>
/etc/X11/xorg.conf的selection device
<br>
Option "VideoOverlay" "on"
<br>
快捷键设置：/etc/tvtime/tvtime.xml
<br>
<br>
<br>
<br>
<br>
<br>
amarok中文mp3标签乱码：
<br>
实际上应该是mp3文件标签自己编码问题，
<br>
安装python-mutagen
<br>
音乐目录下：sudo find . -iname "*.mp3" -execdir mid3iconv -e GBK {} \;
<br>
<br>
<br>
<br>
xmms乱码：
<br>
cd /etc/gtk
<br>
ln -s gtkrc.zh_CN gtkrc.zh_CN.utf-8
<br>
ln -s gtkrc.zh_CN gtkrc.zh_CN.gbk
<br>
xmms 首选项-》音频输入输出插件 -》 libmpg123-ja -》配置 -》标题,禁用标签
<br>
后面的字体可分别改成如下的：
<br>
-adobe-helvetica-medium-r-normal--10-*-*-*-*-*-iso8859-1,-*-*-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0,*-r-*
<br>
-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-1,-*-*-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0,*-r-*
<br>
皮肤文件目录：usr/share/xmms/Skins/
<br>
皮肤权限chmod 0644 /usr/share/xmms/Skins/*
<br>
<br>
<br>
<br>
<br>
mondkey + sancho:
<br>下载可直接运行的mondkey，先运行mldonkey文件夹下的mlnet，bash
*.sh然后运行sancho文件夹下的sancho（鼠标双击或者命令行下./sancho），如果你需要修改下载目录和temp目录的话，修改
~/.mldonkey/downloads.ini，403行，下载目录地址，还有354行是temp目录。具体设置哪些可以去搜索一下。 <br>
<br>
<br>
<br>
swift中文化：
<br>
sudo cp -r /usr/lib/firefox/extensions/langpack-zh-CN@firefox.mozilla.org /usr/lib/swiftfox/extensions
<br>
然后再修改浏览器以下的：
<br>
about:config
<br>
general.useragent.locale 改成 zh-CN
<br>
<br>
<br>
<br>
本地的DNS服务器不是很稳定，正好看到这篇文章。
<br>
<br>
（Firefox解析DNS很慢，严重影响其上网速度，有人建议禁言IPv6,但效果不是很好，我上网找了找，决定装个本地DNS服务器当缓存用，速度明显快多了）
<br>
<br>
首先安装：
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install dnsmasq</td>
        </tr>
    </tbody>
</table>
<br>
<br>
然后编辑/etc/dnsmasq.conf，搜索&#8220;listen-address&#8221;把注释号去掉，并修改为：
<br>
<br>
listen-address=127.0.0.1
<br>
<br>
编辑/etc/dhcp3/dhclient.conf，修改为：
<br>
#supersede domain-name &#8220;fugue.com home.vix.com&#8221;;
<br>
prepend domain-name-servers 127.0.0.1;
<br>
request subnet-mask, broadcast-address, time-offset, routers,
<br>
domain-name, domain-name-servers, host-name,
<br>
netbios-name-servers, netbios-scope;
<br>
<br>
编辑/etc/resolv.conf，在第一行添加
<br>
<br>
nameserver 127.0.0.1
<br>
<br>
示例
<br>
<br>
nameserver 127.0.0.1
<br>
nameserver 210.77.69.1
<br>
nameserver 210.77.68.240
<br>
nameserver 210.77.69.2
<br>
<br>
重启服务：
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo /etc/init.d/dnsmasq restart</td>
        </tr>
    </tbody>
</table>
<br>
<br>
<br>
<br>
调节cpu频率并且对其进行监视
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install cpufrequtils</td>
        </tr>
    </tbody>
</table>
<br>
<br>
监视cpu频率的系统就有，右键单击面板，选择&#8220;添加到面板&#8221;，里面找到&#8220;cpu频率范围监视器&#8221;
<br>
另外，如果嫌命令行麻烦，可以这么做
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">
            <br>
            sudo chmod +s /usr/bin/cpufreq-selector</td>
        </tr>
    </tbody>
</table>
<br>
<br>
然后，cpu频率范围监视器的首选项里就会多出一个&#8220;频率选择器&#8221;，显示菜单选择&#8220;频率和调速器&#8221;。鼠标左键单击cpu频率范围监视器，会发现&#8220;频率&#8221;和&#8220;调速器&#8221;两个菜单，就可以随便调了。在这里特别感谢Vstar。
<br>
<br>
powersave，是无论如何都只会保持最低频率的所谓&#8220;省电&#8221;模式；
<br>
userspace，是自定义频率时的模式，这个是当你设定特定频率时自动转变的；
<br>
ondemand，一有cpu计算量的任务，就会立即达到最大频率运行，等执行完毕就立即回到最低频率；
<br>
conservative，翻译成保守的，也就是默认的模式，一般选择这个，会自动在频率上下限调整；
<br>
performance，顾名思义只注重效率，无论如何一直保持以最大频率运行。
<br>
<br>
监视温度的需要自己安装
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install sensors-applet</td>
        </tr>
    </tbody>
</table>
<br>
<br>
然后也是这样添加到面板，名字叫&#8220;Hardware sensors monitor&#8221;
<br><br><br>今天一开电脑发现GRUB挂了，后来想了一下原来是昨天晚上在windows下分区了。
<br>
<br>
grub&gt;
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">root&nbsp; (hd0,7)</td>
        </tr>
    </tbody>
</table>
<br>
这个命令将Grub的根分区定位为 &#8220;(hd0,7)&#8221;
<br>
grub&gt;
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">setup&nbsp; (hd0)</td>
        </tr>
    </tbody>
</table>
<br>
这个命令表示将Grub安装在&#8220;(hd0)&#8221;，因为没有指定安装的分区，所以安装位置为MBR
<br>
<br>
<br>
OpenOffice里有个Java的选项，一般可以禁用掉。
<br>
<br>
Firefox地址栏输入 about:config 回车
<br>
<br>
browser.sessionhistory.max_entries 设置为5
<br>
browser.sessionhistory.max_total_viewers 设置为1
<br>
network.http.max-connections-per-server 设置为10
<br>
network.http.pipelining.maxrequests 设置为10
<br>
network.dns.disableIPv6 设置为true
<br>
network.dnsCacheEntries 设置为9999
<br>
network.dnsCacheExpiration 设置为9999
<br>
browser.cache.disk.capacity 设置为512000
<br>
browser.cache.memory.capacity 设置为102400(内存小的人可以设置小一些)
<br>
<br>
如何关闭用Firefox下载完软件后右下角弹出的完成提示？
<br>
<br>
在地址栏输入 about:config，找到
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">browser.download.manager.showalertOnComplete</td>
        </tr>
    </tbody>
</table>
并将其设置为 false 。
<br>
<br>
<br>
如何自定义 Firefox 的缓存（临时文件）位置？
<br>
<br>
打开firefox，地址栏输入about:config
<br>
右键新建一个字符串，名为
<br>
browser.cache.disk.parent_directory
<br>
然后输入新的临时文件的路径即可。比如
<br>
D:\Temporary Internet Files
<br>
<br>
<br>
哇，我5点20的时候网速在15M／s
<br>
<br>
<br>
<br>
一些简单的备份
<br>
<br>
<br>
以备份/home/yourname为例
<br>
<br>
备份/home/yourname
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">tar -zcvpPf /media/sdaX/home.tar.gz --exclude=/home/name/Desktop /home/name</td>
        </tr>
    </tbody>
</table>
<br>
<br>
--exclude= 需要排除的文件夹
<br>
<br>
<br>
更新/home/name中比 '2007/05/05'新的文件到home.tar.gz中
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">tar -N '2002/07/05' -zcvpPf /media/sdaX/home.tar.gz --exclude=/home/name/Desktop /home/name</td>
        </tr>
    </tbody>
</table>
<br>
<br>
恢复/home/name（还原备份文件）
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">tar -zxvpPf /media/sdaX/home.tar.gz</td>
        </tr>
    </tbody>
</table>
<br>
<br>
备份/home/name（自动以当前时间命名备份文件，例如：home.2007-05-05.tar.gz）
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">tar -zcvpPf /media/sdaX/home.`date +%Y-%m-%d`.tar.gz --exclude=/home/name/Desktop /home/name</td>
        </tr>
    </tbody>
</table>
<br>
<br>
<br>
UBUNTU安装完之后，默认把WIN的磁盘全部挂接上去了，这时候桌面是全部是磁盘图标，在UBUNTU下掉桌面的磁盘图标，其实很简单的：
<br>
<br>
就是在终端输入：
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">gconf-editor</td>
        </tr>
    </tbody>
</table>
<br>
<br>
依次展开：apps -&gt; nautilus -&gt; desktop
<br>
<br>
然后如果想在桌面显示下面的图标请分别勾选这几个键值：
<br>
computer_icon_visible (计算机图标)
<br>
home_icon_visible (主文件夹图标)
<br>
trash_icon_visible (回收站图标)
<br>
vomules_visible (自动挂载的磁盘)
<br>
<br>
<br>
系统启动流程相关：
<br>
启动流程
<br>
Linux系统主要通过以下步骤启动：
<br>
1、读取MBR的信息，启动Boot Manager
<br>
Windows使用NTLDR作为Boot Manager，如果您的系统中安装多个版本的Windows，您就需要在NTLDR中选择您要进入的系统。
<br>
Linux通常使用功能强大，配置灵活的GRUB或者lilo作为Boot Manager
<br>
2、加载系统内核，启动init进程
<br>
init进程是Linux的根进程，所有的系统进程都是它的子进程。
<br>
3、init进程读取&#8220;/etc/inittab&#8221;文件中的信息，并进入预设的运行级别，按顺序运行该运行级别对应文件夹下的脚本。脚本通常以&#8220;start&#8221;参数启动，并指向一个系统中的程序。
<br>
通常情况下，&#8220;/etc/rcS.d/&#8221;目录下的启动脚本首先被执行，然后是&#8220;/etc/rcN.d/&#8221;目录。例如您设定的运行级别为3,那么它对应的启动目录为&#8220;/etc/rc3.d/&#8221;。
<br>
4、根据&#8220;/etc/rcS.d/&#8221;文件夹中对应的脚本启动Xwindow服务器&#8220;xorg&#8221;
<br>
Xwindow为Linux下的图形用户界面系统。
<br>
5、启动登录管理器，等待用户登录
<br>
Ubuntu系统默认使用GDM作为登录管理器，kde则是kdm，您在登录管理器界面中输入用户名和密码后，便可以登录系统。（您可以在&#8220;/etc/rc3.d/&#8221;文件夹中找到一个名为&#8220;S13gdm&#8221;的链接）
<br>
* 更改运行级别*
<br>
在&#8220;/etc/inittab&#8221;文件中找到如下内容：
<br>
# The default runlevel.
<br>
id:2:initdefault:
<br>
这一行中的数字2,为系统的运行级别，默认的运行级别涵义如下：
<br>
0 关机
<br>
1 单用户维护模式
<br>
2~5 多用户模式
<br>
6 重启
<br>
* 服务管理
<br>
更改启动服务
<br>
在运行级别对应的文件夹中，您可以看到许多文件名以&#8220;S##&#8221;和&#8220;K##&#8221;起始的启动脚本链接。
<br>
例如：
<br>
/etc/rcS.d/S35mountall.sh 挂载文件系统
<br>
/etc/rcS.d/S40networking 启用网络支持
<br>
/etc/rc2.d/S13gdm 启动登录管理器
<br>
/etc/rc2.d/S20makedev 创建设备文件
<br>
/etc/rc2.d/S23xinetd 启动超级进程
<br>
init进程将以&#8220;start&#8221;为参数，按文件名顺序执行所有以&#8220;S##&#8221;起始的脚本。脚本名称中的数字越小，它将被越早执行。例如在
&#8220;/etc/rc2.d/&#8221;文件夹中，&#8220;S13gdm&#8221;文件名中的数字小于&#8220;S23xinetd&#8221;,&#8220;S13gdm&#8221;将比&#8220;S23xinetd&#8221;先执行。
<br>
如果一个脚本链接，以&#8220;K##&#8221;起始，表示它将以&#8220;stop&#8221;参数被执行。如果相应服务没有启动，则不执行该脚本。
<br>
例如：
<br>
/etc/rc2.d/K20powernowd 针对某种硬件的电源管理支持
<br>
如果您想禁止某一服务在启动时自动运行，您可以将相应运行级别中的脚本由&#8220;S##xxx&#8221;重命名为&#8220;K##xxx&#8221;。
<br>
手动控制服务
<br>
您也可以手动运行带有以下参数的启动脚本，来控制系统服务。
<br>
start 启动
<br>
stop 停止
<br>
restart 重启
<br>
例如：
<br>
/etc/rc2.d/K20powernowd start
<br>有时您并不清楚当前运行级别，该运行级别下未必有相应脚本；而且此类脚本的前三位字符并不固定，不便于记忆。这时，您可以直接使用
&#8220;/etc/init.d/&#8221;文件夹中的启动脚本（&#8220;/etc/rcX.d/&#8221;中的启动脚本链接到&#8220;/etc/init.d/&#8221;文件夹下相应脚本），这也
是我们向您推荐的方式。 <br>
例如：
<br>
/etc/init.d/powernowd start
<br>
Tips：以上命令的位置并没有包含在环境变量的搜索路径中，所以要输入完整路径。
<br>
<br>
系统重要配置文件：
<br>
！无论任何情况下，在修改配置文件之前，请您先备份它！
<br>
建议您使用这个命令：&#8220;sudo cp xxx xxx_`date +%y%m%d_%H:%M`&#8221;。
<br>
当然这很麻烦，您可以新建一个名为&#8220;bak&#8221;的文件，内容如下：
<br>
#!/bin/bash
<br>
sudo cp $1 $1_`date +%y%m%d_%H:%M`
<br>
把它放在您能够记住的目录下，比如&#8220;/home&#8221;，执行命令&#8220;sh /home/bak xxx&#8221;，就可以将当前文件夹下的文件&#8220;xxx&#8221;另存为&#8220;xxx_yymmdd_HH:MM&#8221;的格式了
<br>
全局配置文件：
<br>
系统初始化
<br>
/etc/inittab 运行级别、控制台数量,7.04中貌似没有。
<br>
/etc/timezone 时区
<br>
/etc/inetd.conf 超级进程
<br>
文件系统
<br>
/etc/fstab 开机时挂载的文件系统
<br>
/etc/mtab 当前挂载的文件系统
<br>
用户系统
<br>
/etc/passwd 用户信息
<br>
/etc/shadow 用户密码
<br>
/etc/group 群组信息
<br>
/etc/gshadow 群组密码
<br>
/etc/sudoers Sudoer列表（请使用&#8220;visudo&#8221;命令修改此文件，而不要直接编辑）
<br>
Shell
<br>
/etc/shell 可用Shell列表
<br>
/etc/inputrc ReadLine控件设定
<br>
/etc/profile 用户首选项
<br>
/etc/bash.bashrc bash配置文件
<br>
系统环境
<br>
/etc/environment 环境变量
<br>
/etc/updatedb.conf 文件检索数据库配置信息
<br>
/etc/issue 发行信息
<br>
/etc/issue.net
<br>
/etc/screenrc 屏幕设定
<br>
网络
<br>
/etc/iftab 网卡MAC地址绑定
<br>
/etc/hosts 主机列表
<br>
/etc/hostname 主机名
<br>
/etc/resolv.conf 域名解析服务器地址
<br>
/etc/network/interfaces 网卡配置文件
<br>
用户配置文件
<br>
&#8220;/etc/&#8221;目录下的所有文件，只有root用户才有修改权限。应用软件的全局配置文件，普通用户也不能够修改，如果您想配置软件，以适应您的需求，您可以修改它的用户配置文件。
<br>
用户配置文件通常为全局配置文件的同名隐藏文件，放在您的$HOME目录下，例如：
<br>
/etc/inputrc /home/user/.inputrc
<br>
/etc/vim/vimrc /home/user/.vim/vimrc
<br>
也有少数例外，通常是系统程序
<br>
/etc/bash.bashrc /home/user/.bashrc
<br><br><br>ubuntu 7.04编译内核的过程如下：
<br>
<br>
系统：ubuntu 7.04
<br>
内核：kernel2.6.22.5
<br>
<br>
编译之前要安装好下面的编译器：
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install build-essential bin86 kernel-package
            <br>
            sudo apt-get install libqt3-headers libqt3-mt-dev
            <br>
            sudo apt-get install bootcd-mkinitramfs</td>
        </tr>
    </tbody>
</table>
<br>
<br>
下载linux最新内核
<br>
<br>
1. 到<a href="http://www.kernel.org/" target="_blank" class="postlink">www.kernel.org</a>下载当前最新版的源代码。下载的分类有p，f等区别，要下f类型的连接，不要下补丁。下好的源代码应该有40多M。然后把源代码解包到 /usr/src 目录下，命令:
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">&nbsp;sudo tar -zxvf linux-2.6.22.5.tar.gz</td>
        </tr>
    </tbody>
</table>
<br>
2. 进入到编译目录中，此后的所有操作均在该目录下进行。
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">&nbsp;cd /usr/src/linux-2.6.22.5/</td>
        </tr>
    </tbody>
</table>
<br>
配置内核，推荐使用xconfig，非常直观，图形界面，需要Qt，非常稳定.推荐新手使用这个。
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">&nbsp;sudo make xconfig</td>
        </tr>
    </tbody>
</table>
<br>
选项很多，不明白的，默认就可以了，可参考文章：
<br>
<a href="http://lamp.linux.gov.cn/Linux/kernel_options.html" target="_blank" class="postlink">http://lamp.linux.gov.cn/Linux/kernel_options.html</a>
<br>
配置好了，保存，在目录中会创建.config文件，编译的时候是根据此文件进行。
<br>
如果不想太麻烦可以把你现在用的配置文件拷贝过来在那个基础上配置
<br>
sudo cp /boot/config2.*.*(你现在用的内核)   /usr/src/linux-2.6.22.5/
<br>
开始编译：
<br>
先要确认你在/usr/src/linux-2.6.22.5/目录下面
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">&nbsp; &nbsp; sudo make&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sudo make modules_install
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sudo make install</td>
        </tr>
    </tbody>
</table>
<br>
编译过程中，可能有什么警告之类的，先不要管它，只要不出什么错误就行了。
<br>
<br>
生成initrd.img文件
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo mkinitramfs -o /boot/initrd.img-2.6.22.5-generic 2.6.22.5</td>
        </tr>
    </tbody>
</table>
<br>
注意：其中的：o不是零（0），是字母（o）。
<br>
<br>
<br>
<br>
编译后修改/boot/grub/menu.lst
<br>
title        Ubuntu, kernel 2.6.22.5-generic
<br>
root        (hd0,7)
<br>
kernel        /vmlinuz-2.6.22.5 root=UUID=ec8c8633-d344-488a-9c73-cf9766fc2d1d ro quiet splash locale=zh_CN
<br>
initrd        /initrd.img-2.6.22.5-generic
<br>
savedefault
<br>
这里你要确认vmlinuz-2.6.22.5跟你的/boot/下面产生的vmlinuz-2.6.22.＊一样，还有initrd.img-2.6.22.5-generic跟你的/boot/下面产生的initrd.img-2.6.22.＊一样
<br>
<br>
<br>
重新启动，就可以进入新核心的系统了,不成功就来多几次。哈哈&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;
<br>
<br>
因为我的电脑装NVIDIA驱动没什么啥用，就没有介绍。这里提一下，在装的时候最好关闭GDM,切换到控制台下
<br>
<br>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><strong>代码:</strong></td>
        </tr>
        <tr>
            <td class="code">sudo /etc/init.d/gdm stop
            <br>
            sudo apt-get install nvidia-glx-new</td>
        </tr>
    </tbody>
</table>
<br>
<br>
然后重启就可以了～～<br>
<br><br>    <img src ="http://www.cppblog.com/heidaizx/aggbug/33371.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-03 15:47 <a href="http://www.cppblog.com/heidaizx/articles/33371.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>64位机安装flash插件的过程</title><link>http://www.cppblog.com/heidaizx/articles/33354.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Wed, 03 Oct 2007 01:56:00 GMT</pubDate><guid>http://www.cppblog.com/heidaizx/articles/33354.html</guid><wfw:comment>http://www.cppblog.com/heidaizx/comments/33354.html</wfw:comment><comments>http://www.cppblog.com/heidaizx/articles/33354.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heidaizx/comments/commentRss/33354.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heidaizx/services/trackbacks/33354.html</trackback:ping><description><![CDATA[<span class="postbody">
通过nspluginwrapper使64位的firefox调用32位的flash  player 9以实现flash显示，这是迄今为止最完美的flash解决方案。
<br>
废话完毕。
<br>
<br>
</span>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><span class="genmed"><strong>代码:</strong></span></td>
        </tr>
        <tr>
            <td class="code">sudo apt-get install ia32-libs ia32-libs-gtk linux32 lib32asound2</td>
        </tr>
    </tbody>
</table>
<span class="postbody">或许你可以冒险少装一个。
<br>
<br>
1 去<a href="http://gwenole.beauchesne.info/projects/nspluginwrapper/" style="color: #ff0000;" target="_blank" class="postlink">nspluginwrapper主页</a>下载rpm自己转或者从附件下载alien装好的deb包并安装。
<br>
<br>
2 去adobe那下载flash player 9。
<br>
<br>
3 将libflashplayer.so复制到~/.mozilla/plugins/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//若没有这个文件夹则自己新建一个<br>
<br>
4 </span>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><span class="genmed"><strong>代码:</strong></span></td>
        </tr>
        <tr>
            <td class="code">nspluginwrapper -i ~/.mozilla/plugins/libflashplayer.so</td>
        </tr>
    </tbody>
</table>
<span class="postbody">
<br>
<br>
5 </span>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
    <tbody>
        <tr>
            <td><span class="genmed"><strong>代码:</strong></span></td>
        </tr>
        <tr>
            <td class="code">nspluginwrapper -l</td>
        </tr>
    </tbody>
</table>
<span class="postbody">
<br>
若返回
<br>
</span>
<table style="width: 983px; height: 101px;" align="center" border="0" cellpadding="3" cellspacing="1">
    <tbody>
        <tr>
            <td><span class="genmed"><strong>代码:</strong></span></td>
        </tr>
        <tr>
            <td class="code">/home/'whoami'/.mozilla/plugins/npwrapper.libflashplayer.so
            <br>
            &nbsp; Original plugin: .mozilla/plugins/libflashplayer.so
            <br>
            &nbsp; Wrapper version string: 0.9.91.2</td>
        </tr>
    </tbody>
</table>
<span class="postbody">
</span>  <br>在源里有Gnash
可以支持64位机，安装这个也可<br> <img src ="http://www.cppblog.com/heidaizx/aggbug/33354.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-03 09:56 <a href="http://www.cppblog.com/heidaizx/articles/33354.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>