﻿<?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++博客-超越无限的博客</title><link>http://www.cppblog.com/lidaibin/</link><description>做好你想做的－－其它的都不重要。。。</description><language>zh-cn</language><lastBuildDate>Wed, 08 Apr 2026 11:59:31 GMT</lastBuildDate><pubDate>Wed, 08 Apr 2026 11:59:31 GMT</pubDate><ttl>60</ttl><item><title>常用的iptables应用</title><link>http://www.cppblog.com/lidaibin/archive/2006/06/23/8937.html</link><dc:creator>超越无限</dc:creator><author>超越无限</author><pubDate>Fri, 23 Jun 2006 15:17:00 GMT</pubDate><guid>http://www.cppblog.com/lidaibin/archive/2006/06/23/8937.html</guid><wfw:comment>http://www.cppblog.com/lidaibin/comments/8937.html</wfw:comment><comments>http://www.cppblog.com/lidaibin/archive/2006/06/23/8937.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lidaibin/comments/commentRss/8937.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lidaibin/services/trackbacks/8937.html</trackback:ping><description><![CDATA[1、网内机器共享上网<br />iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o ppp+ -j MASQUERADE<br /><br />2、开放网内服务<br />iptables -t nat -A PREROUTING -p tcp --dport 8000 -i ppp+ -j DNAT --to-destination 192.168.0.20:8000(如果转发端口不变可省略端口号)<br /><br />3、端口重定向<br />iptables -t nat -A PREROUTING -p tcp --dport 8000 -i ppp+ -j redirect 80<img src ="http://www.cppblog.com/lidaibin/aggbug/8937.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lidaibin/" target="_blank">超越无限</a> 2006-06-23 23:17 <a href="http://www.cppblog.com/lidaibin/archive/2006/06/23/8937.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于P2P应用中NAT穿透技术的资料</title><link>http://www.cppblog.com/lidaibin/archive/2006/06/23/8932.html</link><dc:creator>超越无限</dc:creator><author>超越无限</author><pubDate>Fri, 23 Jun 2006 15:04:00 GMT</pubDate><guid>http://www.cppblog.com/lidaibin/archive/2006/06/23/8932.html</guid><wfw:comment>http://www.cppblog.com/lidaibin/comments/8932.html</wfw:comment><comments>http://www.cppblog.com/lidaibin/archive/2006/06/23/8932.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/lidaibin/comments/commentRss/8932.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lidaibin/services/trackbacks/8932.html</trackback:ping><description><![CDATA[
		<ol>
				<li>STUN - Simple Traversal of User Datagram Protocol (UDP)<br />           Through Network Address Translators (NATs)<br /><a href="http://www.ietf.org/rfc/rfc3489.txt">http://www.ietf.org/rfc/rfc3489.txt</a></li>
				<li>Protocol Complications with the IP Network Address Translator<br /><a href="http://rfc.net/rfc3027.html">http://rfc.net/rfc3027.html</a></li>
				<li>Peer-to-Peer communication across Middleboxes<br /><a href="http://midcom-p2p.sourceforge.net/draft-ford-midcom-p2p-00.txt">http://midcom-p2p.sourceforge.net/draft-ford-midcom-p2p-00.txt</a> (and 01.txt)</li>
				<li>STUN - Simple Traversal of UDP Through NATs<br /><a href="http://www.jdrosen.net/papers/draft-rosenberg-midcom-stun-00.txt">http://www.jdrosen.net/papers/draft-rosenberg-midcom-stun-00.txt</a> (and 01.txt)</li>
				<li>关于双层NAT、双层Firewall、双层proxy的穿越的P2P通信技术<br /><a href="http://www.vchelp.net/cndevforum/subject_view.asp?subject_id=116101&amp;page=1">http://www.vchelp.net/cndevforum/subject_view.asp?subject_id=116101&amp;page=1</a></li>
				<li>STUN Client and Server Library<br /><a href="http://sourceforge.net/projects/stun/">http://sourceforge.net/projects/stun/</a></li>
				<li>P2P技术文章列表<br /><a href="http://epan.cnblogs.com/archive/2005/01/27/98414.html">http://epan.cnblogs.com/archive/2005/01/27/98414.html</a></li>
		</ol>
<img src ="http://www.cppblog.com/lidaibin/aggbug/8932.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lidaibin/" target="_blank">超越无限</a> 2006-06-23 23:04 <a href="http://www.cppblog.com/lidaibin/archive/2006/06/23/8932.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>改变wine那默认的呆板界面</title><link>http://www.cppblog.com/lidaibin/archive/2006/06/23/8925.html</link><dc:creator>超越无限</dc:creator><author>超越无限</author><pubDate>Fri, 23 Jun 2006 14:23:00 GMT</pubDate><guid>http://www.cppblog.com/lidaibin/archive/2006/06/23/8925.html</guid><wfw:comment>http://www.cppblog.com/lidaibin/comments/8925.html</wfw:comment><comments>http://www.cppblog.com/lidaibin/archive/2006/06/23/8925.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lidaibin/comments/commentRss/8925.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lidaibin/services/trackbacks/8925.html</trackback:ping><description><![CDATA[现在wine已经完全可以使用新版windows的桌面主题，不用再忍受wine默认的丑陋界面：<br /><ol><li>mkdir -p ~/.wine/drive_c/windows/Resources/Themes。</li><li>cp -R /mnt/win_c/WINDOWS/Resources/LE4* ~/.wine/driver_c/windows/Resources/Themes(我喜欢LE4主题，/mnt/win_c请使用你挂载windows的系统盘的挂载目录)</li><li>使用 winecfg 的Appearance标签来选择新主题。</li></ol><a target="_blank" class="" title="EasyWine论坛里一篇关于wine非常好的帖子" href="http://www.easywine.org/bbs/viewthread.php?tid=858">http://www.easywine.org/bbs/viewthread.php?tid=858</a><br /><img src ="http://www.cppblog.com/lidaibin/aggbug/8925.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lidaibin/" target="_blank">超越无限</a> 2006-06-23 22:23 <a href="http://www.cppblog.com/lidaibin/archive/2006/06/23/8925.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>mplayer使用技巧</title><link>http://www.cppblog.com/lidaibin/archive/2006/05/07/8926.html</link><dc:creator>超越无限</dc:creator><author>超越无限</author><pubDate>Sat, 06 May 2006 16:00:00 GMT</pubDate><guid>http://www.cppblog.com/lidaibin/archive/2006/05/07/8926.html</guid><wfw:comment>http://www.cppblog.com/lidaibin/comments/8926.html</wfw:comment><comments>http://www.cppblog.com/lidaibin/archive/2006/05/07/8926.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lidaibin/comments/commentRss/8926.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lidaibin/services/trackbacks/8926.html</trackback:ping><description><![CDATA[在Linux下视频文件我一般都关联使用mplayer打开，~/.mplayer/config配置就显得非常重要了，先看看我的config文件内容吧：
<pre><font color="#0000ff"># Write your default config options here!</font><font color="#005229"><b><br />ao</b></font>=alsa
<font color="#005229"><b>vo</b></font>=xv
<font color="#005229"><b>stop-xscreensaver</b></font>=yes
<font color="#005229"><b>monitoraspect</b></font>=<font color="#00f0ff">1280</font>:<font color="#00f0ff">800<br /></font><font color="#005229"><b>font</b></font>=/usr/share/fonts/zh_CN/simsun.ttf
<font color="#005229"><b>subcp</b></font>=GB18030
<font color="#005229"><b>subfont-autoscale</b></font>=<font color="#00f0ff">2</font><font color="#005229"><b><br />subfont-text-scale</b></font>=<font color="#00f0ff">4</font><font color="#005229"><b><br />sub-fuzziness</b></font>=<font color="#00f0ff">1</font><font color="#005229"><b><br />cache</b></font>=<font color="#00f0ff">8192</font></pre>
常见的ao和vo我就不介绍了，参考manual即可。<br /><br />
如果你在使用宽屏如1280x800、1280x768之类的分辨率时，你会发现按默认配置播放时图像变形了（不过mplayer的GUI版本gmplayer好象能自适应这个，但我不喜欢gmplayer另外再打开着一个控制窗口且非常难用，因此纯洁的mplayer就成了我的首选），monitoraspect参数就很重要了，配置方法就使用你的分辨率做比率就可以了。<br /><br />
字幕问题又来了，在播放带字幕文件的DVDRip格式的电影时按默认配置是不是又乱码了，那么接下来的几个参数就可以让你舒服地看到汉字，font配置字体文件的路径，字幕文件一般是由国人在windows下制作的，所以一般文件内容编码都是GBK(CP936)，所以你可以设置成GBK或CP936，关于字符集编码的名称你可以使用iconv -l看看你的系统都支持些什么<br /><br />
到此为止你应该可以看到汉字了，不过字体有点太大，多行字体可能有点影响你看电影了，subfont-autoscale参数用来设置按什么方法来进行自动缩放（0－不自动缩放，1      －按电影高度缩放，2－按电影宽度缩放，3－按电影对角线缩放(默认值)），subfont-text-scale参数用来设置字幕文本的自动缩放系数(屏幕尺寸的百分比)，值范围为0～100，默认值为5。<br /><br />
mplayer是可以自动加载字幕文件的，但是这只是在字幕文件名跟媒体文件名相同时才起作用（后缀不同）
例如这样的：<br /><br />
单刀直入<br />
单刀直入-CD1.avi<br />
单刀直入-CD1.srt<br />
单刀直入-CD2.avi<br />
单刀直入-CD2.srt<br /><br />
这样的就能自动加载字幕，通过j键切换。但像这种的就不行了：<br /><br />
单刀直入<br />
单刀直入-CD1.avi<br />
单刀直入-CD1.Chs.srt<br />
单刀直入-CD1.Eng.srt<br />
单刀直入-CD2.avi<br />
单刀直入-CD2.Chs.srt<br />
单刀直入-CD2.Eng.srt<br /><br />
这种情况下要使用参数具体指定一个字幕文件，其实mplayer还有一个聪明的参数可以使用的，就是<br />
-sub-fuzziness &lt;mode&gt;<br />Adjust matching fuzziness when searching for subtitles:<br />
0 exact match<br />
1 load all subs containing movie name<br />
2 load all subs in the current directory<br />
可以使用-sub-fuzziness 1来让mplayer加载目录下的所有与电影文件相关的字幕文件，播放时可以通过j键切换。<br /><br />
最后这个cache主要是设置播放流媒体文件时使用的缓存大小，可以根据你机器的配置进行调整。<img src ="http://www.cppblog.com/lidaibin/aggbug/8926.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lidaibin/" target="_blank">超越无限</a> 2006-05-07 00:00 <a href="http://www.cppblog.com/lidaibin/archive/2006/05/07/8926.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Gentoo小技巧</title><link>http://www.cppblog.com/lidaibin/archive/2006/02/20/8927.html</link><dc:creator>超越无限</dc:creator><author>超越无限</author><pubDate>Sun, 19 Feb 2006 16:00:00 GMT</pubDate><guid>http://www.cppblog.com/lidaibin/archive/2006/02/20/8927.html</guid><wfw:comment>http://www.cppblog.com/lidaibin/comments/8927.html</wfw:comment><comments>http://www.cppblog.com/lidaibin/archive/2006/02/20/8927.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lidaibin/comments/commentRss/8927.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lidaibin/services/trackbacks/8927.html</trackback:ping><description><![CDATA[1、自动更新gnome菜单及nautilus窗口内容<br /><ul><li>修改/etc/fam.conf，去掉idle_timeout = 5前面的#</li><li>rc-update add portmap default</li><li>rc-update add famd default
</li></ul><br />
2、从stage1安装bootstrap时gcc与glibc并不参考/etc/make.conf中的USE flag，需要export USE="mmx sse sse2 cjk nls unicode nptl nptlonly userlocales"，定制locales修改/etc/locales.build即可，加入自己需要用到的就行了。
<br /><br />
3、不想安装某非必要组件时可在/etc/portage/profile/package.provided中加入，如gnome-extra/gnome-games-2.12.3
<br /><br />
4、双系统下的时间设置，修改/etc/conf.d/clock中CLOCK="local"，ln -sf /usr/share/zoneinfo/Asian/Chongqing /etc/localtime
<br /><br />
5、Nautilus中按住Ctrl键然后拖动文件或目录时为复制操作、按住Shift键拖动时为移动、同时按住Ctrl和Shift时为创建链接（相当于ln -s）。<img src ="http://www.cppblog.com/lidaibin/aggbug/8927.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lidaibin/" target="_blank">超越无限</a> 2006-02-20 00:00 <a href="http://www.cppblog.com/lidaibin/archive/2006/02/20/8927.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Gentoo下配置16:9的宽屏(1280x800)</title><link>http://www.cppblog.com/lidaibin/archive/2006/02/06/8928.html</link><dc:creator>超越无限</dc:creator><author>超越无限</author><pubDate>Sun, 05 Feb 2006 16:00:00 GMT</pubDate><guid>http://www.cppblog.com/lidaibin/archive/2006/02/06/8928.html</guid><wfw:comment>http://www.cppblog.com/lidaibin/comments/8928.html</wfw:comment><comments>http://www.cppblog.com/lidaibin/archive/2006/02/06/8928.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lidaibin/comments/commentRss/8928.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lidaibin/services/trackbacks/8928.html</trackback:ping><description><![CDATA[刚买的12寸液晶16:9宽屏笔记本安装Gentoo之后默认只支持到1024x768的分辨率(我一般配置X都比较简单，直接X -configure然后修改一下xorg.conf.new，将其中的鼠标设备改为/dev/input/mice，然后加上自己的中文字体目录)，使用gtf获取1280x800@60的readline信息，添加到/etc/X11/xorg.conf的Monitor配置部分即可，我的gtf输出如下：
<br /><br />
debianl@ldb ~ $ gtf 1280 800 60 -x
<br /><br />
  # 1280x800 @ 60.00 Hz (GTF) hsync: 49.68 kHz; pclk: 83.46 MHz<br />
  Modeline "1280x800_60.00"  83.46  1280 1344 1480 1680  800 801 804 828  -HSync +Vsync<br /><br />以下是我xorg.conf中的Monitor部分，其它内容就不贴出来了：
<pre><font color="#00522a"><b>Section &lt;Monitor&gt;</b></font><font color="#00e857"><b><br />    Identifier</b></font><font><font color="#00f0ff">    "</font></font><font color="#00f0ff">Monitor0"</font><font color="#00e857"><b><br />    VendorName    </b></font><font color="#00f0ff">"Monitor Vendor"</font><font color="#00e857"><b><br />    ModelName</b></font><font><font color="#00f0ff">     "</font></font><font color="#00f0ff">Monitor Model</font><font><font color="#00f0ff">"<br /></font></font><font color="#00e857"><b>    HorizSync</b></font><font color="#00f0ff">     30</font><font color="#00f0ff">-</font><font color="#00f0ff">64</font><font color="#00e857"><b><br />    VertRefresh</b></font><font color="#00f0ff">   60</font><font color="#00e857"><b><br />    ModeLine</b></font><font><font color="#00f0ff">      "</font></font><font color="#00f0ff">1280x800</font><font><font color="#00f0ff">"</font></font><font color="#00f0ff"> 83.46 1280 1344 1480 1680 800 801 804 828</font><font color="#00a5cd"> -HSync +VSync</font><font color="#00522a"><b><br />EndSection</b></font></pre><img src ="http://www.cppblog.com/lidaibin/aggbug/8928.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lidaibin/" target="_blank">超越无限</a> 2006-02-06 00:00 <a href="http://www.cppblog.com/lidaibin/archive/2006/02/06/8928.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>通过debootstrap安装Debian Linux</title><link>http://www.cppblog.com/lidaibin/archive/2005/10/20/8930.html</link><dc:creator>超越无限</dc:creator><author>超越无限</author><pubDate>Wed, 19 Oct 2005 16:00:00 GMT</pubDate><guid>http://www.cppblog.com/lidaibin/archive/2005/10/20/8930.html</guid><wfw:comment>http://www.cppblog.com/lidaibin/comments/8930.html</wfw:comment><comments>http://www.cppblog.com/lidaibin/archive/2005/10/20/8930.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lidaibin/comments/commentRss/8930.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lidaibin/services/trackbacks/8930.html</trackback:ping><description><![CDATA[一直不喜欢debian的installer，因为两点：<br /><br />1、installer有点bug，如果用PQ分过区的硬盘debian的installer就挂载不上分区，同时创建文件系统也会失败；<br /><br />2、即使我用sid版本而且选择安装2.6内核默认安装的内核版本也是2.6.8，或许它并不影响什么，但为什么我不用更新版本的内核呢，更何况我喜欢自己编译内核。<br /><br />不过还好，debian的debootstrap给了我最大的灵活性，debootstrap用来下载你的debian的基本系统并解压配置，这其间你可以自己手动干预每个过程。<br /><br /><br /><span style="" bold="" color="" rgb(0,0,192)&quot="">一、准备安装环境</span><br /><hr style="" 100="" height="" 2px&quot="" />
通常我是使用knoppix的Live CD，Gentoo的Live CD不含binutils，也就是说没有ar程序用来解压deb文件，ubuntu的Live CD还行，虽然也有点小问题:)。如果你找到了一个更小的更好的Live CD告诉我一声，最好不用进X，喜欢基于console的Live CD，毕竟我是用来安装的，不希望光驱转得震天响。不过对你的Live CD有这样的要求（是我总结的，不一定标准）：<br /><br />1、包含binutils，如果你不知道binutils是干什么的，你就执行一下ar看看是不是无效的命令，如果是ar的帮助提示就好，提示无效的命令的话那就不行。<br /><br />2、glibc的版本必须是2.3或更高版本，如果你不知道glibc的版本可以让你的Live CD启动起来之后执行一下/lib/libc.so.6看看，它会告诉你版本号的。<br /><br />3、你的Live CD得创建有ramdisk，因为我们需要解压debootstrap，得让我们可以写文件哦。（knoppix直接带有debootstrap工具，不需要这个）<br /><br />好了，启动吧！启动起来之后记得配置好你的网络。<br /><br /><br /><span style="" bold="" color="" rgb(0,0,192)&quot="">二、准备你的分区</span><br /><hr style="" 100="" height="" 2px&quot="" />
这一步我就不好说了，我的Linux一般包含这样几个分区，/boot用的分区、根分区、/home用的分区、再一个用来下载或者保存自己各种数据的分区一般挂载为/data，最好你懂如何分区，如果不了解的话用这种清洁安装的方法可比较危险哦。<br /><br />然后mkdir /mnt/debinst &amp;&amp; mount /dev/hdaX /mnt/debinst，再挂载上你其它的分区。<br /><br /><br /><span style="" bold="" color="" rgb(0,0,192)&quot="">三、准备debootstrap(knoppix带有debootstrap不需要做这一步)</span><br /><hr style="" 100="" height="" 2px&quot="" />
wget http://debian.cn99.com/debian/pool/main/d/debootstrap/debootstrap_0.2.45- 0.1_i386.deb，当然你也可以用其它的镜像站点，不过我喜欢cn99，它的速度够快，下载好debootstrap之后，ar -xf debootstrap_0.2.45-0.1_i386.deb &amp;&amp; tar zxvpf data.tar.gz -C /，到现在为止如果不出意外你的debootstrap已经可以使用了。<br /><br /><br /><span style="" bold="" color="" rgb(0,0,192)&quot="">四、ubuntu Live CD的小bug</span><br /><hr style="" 100="" height="" 2px&quot="" />
debootstrap 在下载解压配置过程中会复制你的/etc/resolv.conf和/etc/hostname，ubuntu Live CD有个问题就是你复制/etc/resolv.conf和/etc/hostname时虽然复制会成功但会出错，这会导致debootstrap的中断，当然你可以多运行几次debootstrap就可解决这个问题，但我喜欢事先就做好准备工作。<br /><br />具体的解决办法便是mkdir /mnt/debinst/etc &amp;&amp; echo 你的机器名 &gt; /mnt/debinst/etc/hostname &amp;&amp; echo "nameserver 你的DNS-IP" &gt;  /mnt/debinst/etc/resolv.conf。<br /><br /><br /><span style="" bold="" color="" rgb(0,0,192)&quot="">五、开始debootstrap吧</span><br /><hr style="" 100="" height="" 2px&quot="" />
debootstrap 的格式如下：debootstrap --arch i386 &lt;版本&gt;  &lt;debian的安装挂载点&gt;  &lt;镜像站点的URL&gt;，我一般用sid，所以就是debootstrap --arch i386 sid /mnt/debinst http://debian.cn99.com/debian。<br /><br /><br /><span style="" bold="" color="" rgb(0,0,192)&quot="">六、配置</span><br /><hr style="" 100="" height="" 2px&quot="" />
等到debootstrap完之后会有三个umount的错误，你不用管它，然后进入我们的debian的环境：chroot /mnt/debinst /bin/bash。<br /><br />1、先把你的fstab内容加上吧，这部分内容你自己得会哦，举个例子吧：<br /><pre>/dev/hda1    /boot     <font color="#2e8b57"><strong>reiserfs</strong></font><font color="#804040"><strong>      notail</strong></font><font color="#804040"><strong>,</strong></font><font color="#804040"><strong>noatime</strong></font><font color="#804040"><strong>,</strong></font><font color="#2e8b57"><strong>noauto</strong></font><font color="#ff00ff">  0 0</font><br />/dev/hda5    /         <font color="#2e8b57"><strong>reiserfs</strong></font><font color="#804040"><strong>      noatime</strong></font><font color="#ff00ff">                0 0</font><br />/dev/hda6    /home     <font color="#2e8b57"><strong>reiserfs      </strong></font><font color="#2e8b57"><strong>defaults </strong></font><font color="#ff00ff">              0 0</font><br /><br />/dev/hda8    <font color="#804040"><strong>none</strong></font><font color="#2e8b57"><strong>      swap</strong></font><font color="#2e8b57"><strong>          sw</strong></font><font color="#ff00ff">                     0 0</font><br /><font color="#008080">none</font>         /proc     <font color="#2e8b57"><strong>proc</strong></font><span style="font-family: mon;"><span style="font-weight: bold;"></span></span><font color="#2e8b57"><strong>          defaults</strong></font><font color="#ff00ff">               0 0</font><br /><br />/dev/cdrom   /mnt/cdrom <span style="font-family: mon;"><span style="font-weight: bold;"></span></span><font color="#2e8b57"><strong>iso9660      </strong></font><font color="#2e8b57"><strong>noauto</strong></font><font color="#804040"><strong>,</strong></font><font color="#2e8b57"><strong>ro</strong></font><font color="#804040"><strong>,</strong></font><font color="#2e8b57"><strong>user</strong></font><font color="#804040"><strong>,</strong></font><font color="#2e8b57"><strong>exec    </strong></font><font color="#ff00ff">0 0</font><br />/dev/fd0     /mnt/floppy <font color="#2e8b57"><strong>auto</strong></font><span style="font-family: mon;"><span style="font-weight: bold;"></span></span><font color="#2e8b57"><strong>        noauto</strong></font><font color="#804040"><strong>,</strong></font><font color="#2e8b57"><strong>rw</strong></font><font color="#804040"><strong>,</strong></font><font color="#2e8b57"><strong>user</strong></font><font color="#804040"><strong>,</strong></font><font color="#2e8b57"><strong>exec</strong></font><font color="#ff00ff">    0 0</font><br /></pre><br />2、配置网络<br /><pre>auto lo<br />iface lo inet loopback<br /><br />auto eth0<br />iface eth0 inet static<br />   address 192.168.0.2<br />   netmask 255.255.255.0<br />   gateway 192.168.0.1<br /></pre><br />3、配置你的APT源，当然你也可以不配用base-config来选择，但base-config默认是testing而且只包含了main，我喜欢一次就把sources.list写好，以下是我的sources.list内容：<br /><pre>deb http://debian.cn99.com/debian/ sid main contrib non-free<br />deb-src http://debian.cn99.com/debian/ sid main contrib non-free<br /><br />deb http://debian.okey.net/debian-uo/ sid firefly marillat misc rareware<br /></pre>然后你apt-get update一下吧。<br /><br />4、执行base-config new，按照提示做吧，不过就别做选择APT源那一步了，直接做后面的"select and install package"，我一般是什么都不选，只安装一个基本的系统，并且安装完之后还会apt-get remove exim* m4，卸载掉与邮件相关的东西，因为我习惯使用webmail，不需要这个。<br /><br /><br /><span style="" bold="" color="" rgb(0,0,192)&quot="">七、安装内核</span><br /><hr style="" 100="" height="" 2px&quot="" />
不喜欢编译内核或不懂如何编译内核的人可以先用apt-cache search kernel-image看看，然后直接安装最新的内核，我一般喜欢自己编译内核，不需要整一大堆驱动模块放机器里。不过要注意的是如果自己编译内核的话就要记得安装一个devfsd和module-init-tools，另外你解压内核源码之后最好在/usr/src里创建一个内核源码目录到 /usr/src/linux的符号连接。<br /><br /><br /><span style="" bold="" color="" rgb(0,0,192)&quot="">八、安装bootloader</span><br /><hr style="" 100="" height="" 2px&quot="" />
bootloader我一般选择grub，这个没什么好说的了^_^。<br /><br /><br /><span style="" bold="" color="" rgb(0,0,192)&quot="">九、安装nvidia驱动（可选）</span><br /><hr style="" 100="" height="" 2px&quot="" />
用nvidia显卡的人才需要做这一步的哈，apt源里的nvidia是for 2.4内核的，你最好从官方下载最新的nvidia驱动，nvidia驱动的安装很简单，你每一步都选OK或Accept就行了。<br /><br /><br /><span style="" bold="" color="" rgb(0,0,192)&quot="">十、配置fontconfig（可选）</span><br style="" bold="" color="" rgb(0,0,192)&quot="" /><hr />
刚才我们不是添加了okey.net的firefly源吗？所以你后面安装fontconfig/xft时会自动安装带firefly补丁的 fontconfig/xft，但我们需要简单配置一下/etc/fonts/local.conf，加上以下内容即可支持粗斜体：<br /><pre><font color="#008080">&lt;</font><font color="#008080">fontconfig</font>&gt;<br /> &lt;<font color="#008080"></font><font color="#008080">match</font><font color="#008080"></font><font color="#2e8b57"><strong>target</strong></font>=<font color="#ff00ff">"font"</font><font color="#008080">&gt;</font><br />   &lt;<font color="#008080"></font><font color="#008080">test</font><font color="#008080"></font><font color="#2e8b57"><strong>target</strong></font>=<font color="#ff00ff">"pattern"</font><font color="#008080"></font><font color="#2e8b57"><strong>name</strong></font>=<font color="#ff00ff">"weight"</font><font color="#008080"></font><font color="#2e8b57"><strong>compare</strong></font>=<font color="#ff00ff">"more"</font><font color="#008080">&gt;</font><br />     &lt;<font color="#008080">const&gt;</font><font color="#008080"></font>medium<font color="#008080">&lt;/const&gt;</font><br />   &lt;<font color="#008080">/test&gt;</font><br />   &lt;<font color="#008080">edit</font><font color="#008080"></font><font color="#2e8b57"><strong>name</strong></font>=<font color="#ff00ff">"weight"</font><font color="#008080"></font><font color="#2e8b57"><strong>mode</strong></font>=<font color="#ff00ff">"assign"</font>&gt;<br />     &lt;<font color="#008080">const&gt;</font><font color="#008080"></font>bold&lt;<font color="#008080">/const&gt;</font><br />   &lt;<font color="#008080">/edit&gt;</font><br /> &lt;<font color="#008080">/match&gt;</font><br /><font color="#008080">&lt;/fontconfig&gt;</font><br /></pre><img src ="http://www.cppblog.com/lidaibin/aggbug/8930.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lidaibin/" target="_blank">超越无限</a> 2005-10-20 00:00 <a href="http://www.cppblog.com/lidaibin/archive/2005/10/20/8930.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>随意定制gtk2程序的菜单快捷键</title><link>http://www.cppblog.com/lidaibin/archive/2005/09/26/8931.html</link><dc:creator>超越无限</dc:creator><author>超越无限</author><pubDate>Sun, 25 Sep 2005 16:00:00 GMT</pubDate><guid>http://www.cppblog.com/lidaibin/archive/2005/09/26/8931.html</guid><wfw:comment>http://www.cppblog.com/lidaibin/comments/8931.html</wfw:comment><comments>http://www.cppblog.com/lidaibin/archive/2005/09/26/8931.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/lidaibin/comments/commentRss/8931.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lidaibin/services/trackbacks/8931.html</trackback:ping><description><![CDATA[为gtk2程序常用的菜单定制快捷键是一个很有用的功能，其实要定制gtk2程序的菜单快捷键很简单，只需要给~/.gtkrc-2.0中加上一行gtk-can-change-accels=1，然后在gtk2程序中随意点开菜单将鼠标停在菜单上直接按键即可定义。<img src ="http://www.cppblog.com/lidaibin/aggbug/8931.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lidaibin/" target="_blank">超越无限</a> 2005-09-26 00:00 <a href="http://www.cppblog.com/lidaibin/archive/2005/09/26/8931.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>