<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ShareItem.org&#187; Archlinux</title>
	<atom:link href="http://shareitem.org/archive/tag/archlinux/feed" rel="self" type="application/rss+xml" />
	<link>http://shareitem.org</link>
	<description>这里记录着我学习 Linux 的点滴</description>
	<lastBuildDate>Fri, 16 Oct 2009 16:03:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>备忘：使用TuxOnIce内核 之一</title>
		<link>http://shareitem.org/archive/using-tuxonice-kernel-on-archlinux-and-gentoo-part1.html</link>
		<comments>http://shareitem.org/archive/using-tuxonice-kernel-on-archlinux-and-gentoo-part1.html#comments</comments>
		<pubDate>Thu, 19 Feb 2009 05:25:26 +0000</pubDate>
		<dc:creator>kaysiness</dc:creator>
				<category><![CDATA[Memo]]></category>
		<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[TuxOnIce]]></category>

		<guid isPermaLink="false">http://shareitem.org/?p=641093</guid>
		<description><![CDATA[<p>TuxOnIce内核是什么？下面是官方的说明
TuxOnIce is most easily described as the Linux equivalent of Windows&#8217; hibernate functionality. It saves the contents of memory to disk and powers down. When the computer is started up again, it rel…</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tuxonice.net/" title="TuxOnIce官方网站">TuxOnIce内核</a>是什么？下面是官方的说明</p>
<blockquote><p>TuxOnIce is most easily described as the Linux equivalent of Windows&#8217; hibernate functionality. It saves the contents of memory to disk and powers down. When the computer is started up again, it reloads the contents and the user can continue from where they left off. No documents need to be reloaded or applications reopened and the process is much faster than a normal shutdown and start up.</p></blockquote>
<p>而我最喜欢TuxOnIce内核的休眠到硬盘的功能了（又称STD，Suspend to Disk），用过Windows休眠功能的应该有所体会，而且还支持FBSplash。</p>
<p>以下是一段官方的从休眠到再启动的视频，长度1分22秒。<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/k_T4ZcPkqVA&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/k_T4ZcPkqVA&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>从视频中可以看到，从休眠到重新启动计算机所花的时间也就1分20秒左右，对于Fedora来说速度还算快的。下面介绍如何在Archlinux和Gentoo上安装TuxOnIce内核</p>
<p><strong>Archlinux</strong><br />
AUR上就有，名字是<a href="http://aur.archlinux.org/packages.php?ID=15224" title="kernel26-ice">kernel26-ice</a>，可以很方便的 yaourt 到。推荐修改 PKGBUILD 文件，反注释掉 make menuconfig 这行，否则会编译出一个臃肿的内核。具体的方法可以浏览《<a href="http://blog.punkid.cn/2008/08/14/compile-tuxonice-kernel-in-archlinux/">在Archlinux下编译TuxOnIce内核</a>》这篇文章。</p>
<p><strong>Gentoo</strong><br />
首先 emerge TuxOnIce内核的源码</p>
<blockquote><p>emerge tuxonice-sources</p></blockquote>
<p>如果需要用到 FBSplash 的还需要为 sys-apps/tuxonice-userui 打开 fbsplash 这个 USE</p>
<blockquote><p>echo &#8220;sys-apps/tuxonice-userui fbsplash&#8221; >> /etc/portage/package.use</p></blockquote>
<p>然后修改 /usr/src/linux 的符号链接可以用下面的方法修改</p>
<blockquote><p>eselect kernel list<br />
eselect kernel set 3 #这里填 TuxOnIce 所在的那行</p></blockquote>
<p>然后就是 make 了，是不是很简单 <img src='http://shareitem.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<hr />
文章地址:<a href="http://shareitem.org/archive/using-tuxonice-kernel-on-archlinux-and-gentoo-part1.html">http://shareitem.org/archive/using-tuxonice-kernel-on-archlinux-and-gentoo-part1.html</a> <br />
<small>本文内容属于<a href="http://shareitem.org/">ShareItem.org</a>，遵循<a href='http://creativecommons.org/licenses/by-nc-nd/2.5/cn/'> CC </a>协议 | 7e6874b3209cf4276e96802080b61256</small>

<p>相关文章<ol><li><a href='http://shareitem.org/archive/install-gentoo-root-pqrtition-on-lvm2.html' rel='bookmark' title='Permanent Link: 将根分区安装到LVM2的一些笔记'>将根分区安装到LVM2的一些笔记</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://shareitem.org/archive/using-tuxonice-kernel-on-archlinux-and-gentoo-part1.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>让 Firefox 在内存上运行</title>
		<link>http://shareitem.org/archive/let-firefox-running-in-memory.html</link>
		<comments>http://shareitem.org/archive/let-firefox-running-in-memory.html#comments</comments>
		<pubDate>Sat, 24 Jan 2009 18:16:51 +0000</pubDate>
		<dc:creator>kaysiness</dc:creator>
				<category><![CDATA[FireFox]]></category>
		<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[tmpfs]]></category>

		<guid isPermaLink="false">http://shareitem.org/?p=641061</guid>
		<description><![CDATA[<p>尽管3.0版firefox有很大进步，但对于我这种firefox重度使用者，仍然是偏慢。在使用了TualatriX介绍的优化方法后，的确好转了很多。但在20个以上的…</p>]]></description>
			<content:encoded><![CDATA[<p>Linux版Firefox的慢算是出名的了，在同一台机器上，windows版的要流畅很多很多……为什么Linux版会这么慢呢？我觉得有下面几点原因。</p>
<ol>
<li>nvidia显卡驱动的问题，这是驱动上有bug导致的，不过在180.22版驱动上已经好转很多了。</li>
<li>用户目录（~/.mozilla/firefox）下的缓存数据过于庞大，这个在windows版也会出现，但我用了2年的windows版firefox，感觉并不明显啊</li>
<li>编译的问题</li>
</ol>
<p>尽管3.0版firefox有很大进步，但对于我这种<abbr title="打开firefox就是20个以上的标签页">firefox重度使用者</abbr>，仍然是偏慢。在<a href="http://linuxdesktop.cn/2008/09/26/optimize-firefox.html">使用了TualatriX介绍的优化方法后</a>，的确好转了很多。但在20个以上的标签页间进行切换，仍然是会出现缓慢的现象。于是狠下心来，将主目录下的 .mozilla 目录搬到内存上，发现切换标签页缓慢的现象还真的消失了！使用了一个多月，现在我打开30个以上的标签页也不会再慢下来了，感觉非常好！</p>
<p>下面介绍如何将 Firefox 运行在内存上。<strong>注意</strong>：下面提到的 /tmp 目录是使用 tmpfs 挂载的，如何使用 tmpfs 可以浏览<a title="tmpfs的使用方法" href="http://shareitem.org/archive/howto-in-some-directory-enabled-tmpfs-filesystem.html">这篇介绍</a>，还有一句废话，你要有足够的内存，我的物理内存是2G。</p>
<p>首先将<abbr title="/home/YOURNAME">用户目录</abbr>下的 .mozilla 目录备份，放到你喜欢的地方，例如放到 /var/local 下。推荐直接用tar打包，不要压缩，下面会说到好处，而放到 /var/local 下是为了配合下面的脚本。</p>
<blockquote><p>cd $HOME &amp;&amp; tar -cpf mozilla.tar .mozilla/*<br />
mv mozilla.tar /var/local</p></blockquote>
<p>在 /tmp 目录下创建一个目录，用于存放 .mozilla 目录下的文件</p>
<blockquote><p>mkdir /tmp/.mozilla</p></blockquote>
<p>然后将<abbr title="/home/YOURNAME">用户目录</abbr>下的 .mozilla 目录链接到刚才创建的目录</p>
<blockquote><p>ln -sf /tmp/.mozilla $HOME/.mozilla</p></blockquote>
<p>解压刚才备份的tar包</p>
<blockquote><p>tar -xpf /var/local/mozilla.tar -C /tmp</p></blockquote>
<p>好了，现在打开 fireofx 看看，切换标签页的速度是不是有所提升了？我记得当时试验的效果是很明星的。如果你也满意，推荐用脚本直接在开机后就解压 tar 文件到 tmpfs 上，关机时就把 tmpfs 上的数据重新打包备份，多方便啊～。这时直接用tar打包的好处是，每当关机时不用等待压缩 .mozilla 目录的文件，我就曾经用7z压缩数据，那速度……</p>
<p>下面是我写的自动脚本，以 daemon 方式运行，能在 Archlinux 上使用，其他发行版可能需要稍加修改，我只有一个 Archlinux，没办法测试。</p>
<p>新建 /etc/rc.d/firefoxpro 文件，贴上下面的内容</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
. <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.conf
. <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>functions
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> $<span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">in</span>
    start<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        stat_busy <span style="color: #ff0000;">&quot;Copying Firefox profile to tmpfs&quot;</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;/tmp/.mozilla&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #000000; font-weight: bold;">then</span>
		<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>.mozilla
		<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mozilla.tar <span style="color: #000000; font-weight: bold;">/</span>tmp
		<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xpf</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>mozilla.tar <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>tmp
		<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>mozilla.tar <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mozilla-old.tar
		<span style="color: #c20cb9; font-weight: bold;">chown</span> clayton:<span style="color: #c20cb9; font-weight: bold;">users</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>.mozilla <span style="color: #666666; font-style: italic;">###注意这里，需要将clayton改为你的用户名</span>
		add_daemon firefoxpro
		stat_done
	<span style="color: #000000; font-weight: bold;">else</span>
		stat_fail
	<span style="color: #000000; font-weight: bold;">fi</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
    stop<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        stat_busy <span style="color: #ff0000;">&quot;Backuping Firefox profile from tmpfs&quot;</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;/tmp/.mozilla/firefox/njgmwi0t.default&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #000000; font-weight: bold;">then</span> <span style="color: #666666; font-style: italic;">###注意这里，要改为你的xxx.default目录名</span>
		<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>tmp <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-cpf</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>mozilla-new.tar .mozilla<span style="color: #000000; font-weight: bold;">/*</span>
		<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>mozilla-new.tar <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mozilla.tar
		<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>.mozilla
		rm_daemon firefoxpro
		stat_done
	<span style="color: #000000; font-weight: bold;">else</span>
		stat_fail
	<span style="color: #000000; font-weight: bold;">fi</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
    restart<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        $<span style="color: #000000;">0</span> stop
        <span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">1</span>
        $<span style="color: #000000;">0</span> start
        <span style="color: #000000; font-weight: bold;">;;</span>
    <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;usage: $0 {start|stop|restart}&quot;</span>
<span style="color: #000000; font-weight: bold;">esac</span>
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></div></div>

<p>别忘了给于执行的权限</p>
<blockquote><p>chmod a+x /etc/rc.d/firefoxpro</p></blockquote>
<p>编辑 /etc/rc.conf ，把上面的脚本添加到 daemons 处，使其开机就执行</p>
<blockquote><p>DAEMONS=( &#8230; @firefoxpro &#8230;)</p></blockquote>
<p>ok，大功告成了。enjoy it 吧！</p>
<p>最后附上2个有用的小技巧。</p>
<ol>
<li>压缩 .mozilla 目录下的sqlite3数据库<br />
首先把 firefox 关了，然后运行下面的命令，详见<a href="http://www.linuxgem.org/posts/6813.html" title="通过压缩数据库加速 Firefox">通过压缩数据库加速 Firefox</a></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">for</span> f <span style="color: #000000; font-weight: bold;">in</span> ~<span style="color: #000000; font-weight: bold;">/</span>.mozilla<span style="color: #000000; font-weight: bold;">/</span>firefox<span style="color: #000000; font-weight: bold;">/*/*</span>.sqlite; <span style="color: #000000; font-weight: bold;">do</span> sqlite3 <span style="color: #007800;">$f</span> <span style="color: #ff0000;">'VACUUM;'</span>; <span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

</li>
<li>分离 Firefox 的临时文件<br />
Firefox 会在 .mozilla 目录下的 Cache 里存储一大堆浏览网页时的临时文件，这些文件基本上可以无需备份，那我们何必还要将这些临时文件打包进tar包里呢？而且还能减少打包的时间。首先打开 about:config ，将 browser.cache.disk.parent_directory 的值改为 /tmp，没有就新建一个。重启 Firefox ，浏览一些网页后你会发现 /tmp 下多了这个 Cache 目录，里面就是这些杂七杂八的临时文件。</li>
</ol>
<p><strong>祝大家新的一年里，身体健康，万事如意！</strong><br />
<strong>Happy 牛 Year！！</strong></p>
<hr />
文章地址:<a href="http://shareitem.org/archive/let-firefox-running-in-memory.html">http://shareitem.org/archive/let-firefox-running-in-memory.html</a> <br />
<small>本文内容属于<a href="http://shareitem.org/">ShareItem.org</a>，遵循<a href='http://creativecommons.org/licenses/by-nc-nd/2.5/cn/'> CC </a>协议 | 7e6874b3209cf4276e96802080b61256</small>

<p>没有相关文章</p>]]></content:encoded>
			<wfw:commentRss>http://shareitem.org/archive/let-firefox-running-in-memory.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>转移系统到Archlinux x86-64</title>
		<link>http://shareitem.org/archive/start-using-archlinux-x86-64-system.html</link>
		<comments>http://shareitem.org/archive/start-using-archlinux-x86-64-system.html#comments</comments>
		<pubDate>Tue, 13 Jan 2009 13:40:55 +0000</pubDate>
		<dc:creator>kaysiness</dc:creator>
				<category><![CDATA[Live]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[Archlinux]]></category>

		<guid isPermaLink="false">http://shareitem.org/?p=641055</guid>
		<description><![CDATA[<p>没错，这次我终于下定决心使用x86-64位系统。断断续续的使用Linux已经有三年的时间了，三年前我装的系统是Ubuntu6.06 i386版，一直到现在我使用的Archlinux都是32位版的，不过自从Adobe发布了64位的…</p>]]></description>
			<content:encoded><![CDATA[<p>没错，这次我终于下定决心使用x86-64位系统。断断续续的使用Linux已经有三年的时间了，三年前我装的系统是Ubuntu6.06 i386版，一直到现在我使用的Archlinux都是32位版的，不过自从<a href="http://linuxtoy.org/archives/flash-player-10-64-bit.html">Adobe发布了64位的flashplugin后</a>，我就有了转移到64位下的想法。虽然，从32位转移到64位现阶段并不能带来多少性能上的提升，而且还会有一些小麻烦，例如普通情况下Archlinux64位版的源里是没有wine，Virtualbox等这些软件的，但64位毕竟是一种趋势，现在64位已经基本上到了实用的阶段了（指桌面），我想就差<a href="http://linuxtoy.org/archives/sun_prerelease_64bit_java_plugin.html">Sun的Java 6 SE Update 12</a>发布了。</p>
<p>有了更多人投身到64位下，才能真正带动64位的普及，不是吗？ : )</p>
<p>PS:不知是64位还是nvidia的180.22驱动在起作用，装上源里的64位版Firefox后，以前缓慢的现象消失了！</p>
<p>最后贴上我的64位Archlinux的一张截图。<br />
<a href="http://s2.photobucket.com/albums/y3/suzeb2/?action=view&#038;current=2009-01-13-212826_1280x1024_scrot.png" title="64位Archlinux截图"><img src="http://i2.photobucket.com/albums/y3/suzeb2/2009-01-13-212826_1280x1024_scrot.png" alt="64位Archlinux截图"></a></p>
<p>链接：<a href="http://wiki.archlinux.org/index.php/Arch64%E9%97%AE%E7%AD%94_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)">Archlinux64位问答</a></p>
<hr />
文章地址:<a href="http://shareitem.org/archive/start-using-archlinux-x86-64-system.html">http://shareitem.org/archive/start-using-archlinux-x86-64-system.html</a> <br />
<small>本文内容属于<a href="http://shareitem.org/">ShareItem.org</a>，遵循<a href='http://creativecommons.org/licenses/by-nc-nd/2.5/cn/'> CC </a>协议 | 7e6874b3209cf4276e96802080b61256</small>

<p>没有相关文章</p>]]></content:encoded>
			<wfw:commentRss>http://shareitem.org/archive/start-using-archlinux-x86-64-system.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>玩Quake4遇到的一些问题及解决方法</title>
		<link>http://shareitem.org/archive/quake4-on-a-number-of-problems-and-solutions.html</link>
		<comments>http://shareitem.org/archive/quake4-on-a-number-of-problems-and-solutions.html#comments</comments>
		<pubDate>Sun, 04 Jan 2009 07:23:34 +0000</pubDate>
		<dc:creator>kaysiness</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Quake4]]></category>

		<guid isPermaLink="false">http://shareitem.org/?p=641033</guid>
		<description><![CDATA[<p>在Archlinux上玩Quake4有一段时间了。为了免得以后忘记，我把我在玩的时候遇到一些问题写下来做个备忘。

在Archlinux上安装Quake4很方便，AUR上就有人提供PKGBUILD，下回来makepkg之即可，但要确保 /t…</p>]]></description>
			<content:encoded><![CDATA[<p>在Archlinux上玩<a href="http://www.quake4game.com/" title="Quake 4官方网站">Quake4</a>有一段时间了。为了免得以后忘记，我把我在玩的时候遇到一些问题写下来做个备忘。</p>
<p><img src="http://i2.photobucket.com/albums/y3/suzeb2/250px-Quake4box.jpg" alt="Quake4游戏封面"></p>
<p>在Archlinux上安装Quake4很方便，<a href="http://aur.archlinux.org/packages.php?ID=2992">AUR上就有人提供PKGBUILD</a>，下回来makepkg之即可，但要确保 /tmp 有足够的剩余空间来解压程序，如果和我一样 /tmp 目录是挂载到 tmpfs 上的，空间不多的情况下需要自行修改解压的路径，下面是我改好的PKGBUILD（还需要配合AUR里的相应文件）。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Contributor: Andrew Simmons &lt;andrew.simmons {[at]} gmail {[dot]} com&gt;</span>
&nbsp;
<span style="color: #007800;">pkgname</span>=quake4
<span style="color: #007800;">pkgver</span>=1.4.2
<span style="color: #007800;">pkgrel</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">pkgdesc</span>=<span style="color: #ff0000;">&quot;Quake 4 Engine. You need the retail .pk4 files to play.&quot;</span>
<span style="color: #007800;">url</span>=<span style="color: #ff0000;">&quot;http://www.quake4game.com/&quot;</span>
<span style="color: #007800;">license</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'custom:&quot;Quake 4&quot;'</span> \
         <span style="color: #ff0000;">'custom:&quot;PunkBuster&quot;'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">depends</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'alsa-lib&gt;=1.0.6'</span> <span style="color: #ff0000;">'sdl&gt;=1.2.0'</span> <span style="color: #ff0000;">'libxext'</span> <span style="color: #ff0000;">'libgl'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'i686'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">install</span></span>=quake4.install
<span style="color: #007800;"><span style="color: #7a0874; font-weight: bold;">source</span></span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.idsoftware.com<span style="color: #000000; font-weight: bold;">/</span>idstuff<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span><span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span>-linux-<span style="color: #007800;">$pkgver</span>.x86.run \
        <span style="color: #007800;">$pkgname</span>.sh <span style="color: #007800;">$pkgname</span>-dedicated.sh <span style="color: #007800;">$pkgname</span>-smp.sh<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">md5sums</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'b186954ab5fbadd57f7ca9519b5b0503'</span>
         <span style="color: #ff0000;">'54f7cdb2aa75c1cee9fcbef2a3af507d'</span>
         <span style="color: #ff0000;">'62137ca958cc8b8d3d42a49a8ada1ec5'</span>
         <span style="color: #ff0000;">'7a70531044dc207a57a3c3cc4ed78336'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
build<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>src
  <span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #007800;">$pkgname</span>-linux-<span style="color: #007800;">$pkgver</span>.x86.run
  <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span> \
           <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin \
           <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>licenses<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span> \
           <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span><span style="color: #000000; font-weight: bold;">/</span>q4base
  .<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span>-linux-<span style="color: #007800;">$pkgver</span>.x86.run <span style="color: #660033;">--target</span> <span style="color: #007800;">$pkgname</span> <span style="color: #660033;">--</span> <span style="color: #660033;">-i</span> <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span> <span style="color: #660033;">-b</span> <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin
  <span style="color: #666666; font-style: italic;"># ncurses &amp; gtk installers don't return 1 when canceled, so check that files are installed</span>
  <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span><span style="color: #000000; font-weight: bold;">/</span>q4base <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span>
&nbsp;
  <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-m755</span> <span style="color: #660033;">-D</span> <span style="color: #007800;">$pkgname</span>.sh           <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span>
  <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-m755</span> <span style="color: #660033;">-D</span> <span style="color: #007800;">$pkgname</span>-dedicated.sh <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span>-dedicated
  <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-m755</span> <span style="color: #660033;">-D</span> <span style="color: #007800;">$pkgname</span>-smp.sh       <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span>-smp
&nbsp;
  <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-sf</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span>           <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span>
  <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-sf</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span>-dedicated <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span>-dedicated
  <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-sf</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span>-smp       <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span>-smp
  <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-sf</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span><span style="color: #000000; font-weight: bold;">/</span>License.txt        <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>licenses<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span><span style="color: #000000; font-weight: bold;">/</span>License.txt
  <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-sf</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span><span style="color: #000000; font-weight: bold;">/</span>pb<span style="color: #000000; font-weight: bold;">/</span>PBEULA.txt      <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>licenses<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$pkgname</span><span style="color: #000000; font-weight: bold;">/</span>PBEULA.txt
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>安装完成后需要将游戏DVD里的 pak001.pk4 到 pak012.pk4 和 zpak_english.pk4 这些文件复制到 /opt/quake4/q4base 下，然后在终端运行 quake4 即可进入游戏。</p>
<p>如果喜欢作弊，只要在游戏中按着 Ctrl+Alt+~ 调出控制台，输入作弊码即可。比如输入 god 就是无敌，输入 give all 能得到所有武器和子弹。但每次子弹用完后又要打开控制台从新输入，太麻烦了，这时可以编辑 “/home/YOURNAME/.quake4/q4base/Quake4Config.cfg“ 这个文件，在里面增加快捷键绑定，比如我添加了</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">bind</span> <span style="color: #ff0000;">&quot;KP_HOME&quot;</span> <span style="color: #ff0000;">&quot;testlight&quot;</span>
<span style="color: #7a0874; font-weight: bold;">bind</span> <span style="color: #ff0000;">&quot;KP_END&quot;</span> <span style="color: #ff0000;">&quot;god&quot;</span>
<span style="color: #7a0874; font-weight: bold;">bind</span> <span style="color: #ff0000;">&quot;KP_DOWNARROW&quot;</span> <span style="color: #ff0000;">&quot;notarget&quot;</span>
<span style="color: #7a0874; font-weight: bold;">bind</span> <span style="color: #ff0000;">&quot;KP_PGDN&quot;</span> <span style="color: #ff0000;">&quot;give all&quot;</span>
<span style="color: #7a0874; font-weight: bold;">bind</span> <span style="color: #ff0000;">&quot;KP_5&quot;</span> <span style="color: #ff0000;">&quot;spawn char_marine_tech_armed&quot;</span></pre></div></div>

<p>以后只要按小键盘上对应的键就能实现这些功能了。</p>
<p>最后说一下，比如我想跳到某一关，例如最后一关，网上说的那些命令我试过了，不行的，但可以使用devmap这个命令。方法是在控制台输入“devmap gmae/地图名”，这个好理解，但地图名怎么知道呢？方法也很简单，同样的控制台，用 dir 这个命令，相信用Linux的人对这个命令不是陌生了。</p>
<hr />
文章地址:<a href="http://shareitem.org/archive/quake4-on-a-number-of-problems-and-solutions.html">http://shareitem.org/archive/quake4-on-a-number-of-problems-and-solutions.html</a> <br />
<small>本文内容属于<a href="http://shareitem.org/">ShareItem.org</a>，遵循<a href='http://creativecommons.org/licenses/by-nc-nd/2.5/cn/'> CC </a>协议 | 7e6874b3209cf4276e96802080b61256</small>

<p>没有相关文章</p>]]></content:encoded>
			<wfw:commentRss>http://shareitem.org/archive/quake4-on-a-number-of-problems-and-solutions.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>[PKGBUILD] opera 中国版 for linux</title>
		<link>http://shareitem.org/archive/pkgbuild-opera-china-qt3-for-linux.html</link>
		<comments>http://shareitem.org/archive/pkgbuild-opera-china-qt3-for-linux.html#comments</comments>
		<pubDate>Fri, 26 Dec 2008 08:41:18 +0000</pubDate>
		<dc:creator>kaysiness</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[pkgbuild]]></category>

		<guid isPermaLink="false">http://shareitem.org/?p=641006</guid>
		<description><![CDATA[<p>在昨天，opera 中国版 for linux 终于发布了，据LinuxToy上的报道，Opera 中国版基于 Opera 9.63，“初步解决了经年来 Linux 上 Opera 中文字体显示混乱的问题”。
更加详细的改进请移步到 Opera 官方中文…</p>]]></description>
			<content:encoded><![CDATA[<p>在昨天，opera 中国版 for linux 终于发布了，据<a href="http://linuxtoy.org/archives/opera-china-edition.html">LinuxToy上的报道</a>，Opera 中国版基于 Opera 9.63，“初步解决了经年来 Linux 上 Opera 中文字体显示混乱的问题”。</p>
<p>更加详细的改进请移步到 <a href="http://bbs.operachina.com/viewtopic.php?t=37713">Opera 官方中文社区</a></p>
<blockquote><p>
<strong>（12月26日21:46）</strong>重要更新：实在抱歉，由于大意，贴上来的并不是最终的PKGBUILD，这个比最终版的少了一行代码，现在已经修改过来了。 如果你在这个时间之前使用过这个PKGBUILD，请使用新的PKGBUILD重新生成安装包并安装之。<br />
<strong>（12月30日01:29）</strong>感谢 oahong 朋友的提醒，现在可以自动修复文件名了，无需手动下载deb包。<br />
<strong>（12月31日12:31）</strong>更新：已经上传到 AUR 上了，地址是 <a href="http://aur.archlinux.org/packages.php?ID=22757">http://aur.archlinux.org/packages.php?ID=22757</a>
</p></blockquote>
<p>好了，回归主题，这次发布的中国版暂时只有 Ubuntu/Debian 的 deb 包和 opernSUSE 的 rpm 包，连一个 tar 的压缩包的都没有，所以只好下载 deb 格式的，而且由于是发布到论坛上的，致使下载地址被隐藏了，<del datetime="2008-12-29T16:54:02+00:00">无法直接用wget下载 deb 包，所以要比较麻烦，<strong>先去 <a href="http://bbs.operachina.com/download/file.php?id=9703">Opera 论坛上下载(x86)</a> 或  <a href="http://bbs.operachina.com/download/file.php?id=9704">Opera 论坛上下载(amd64)</a>，并和 PKGBUILD 文件放在同一目录</strong>，</del>现在不需要了，剩下的只需运行 makepkg 并安装之。</p>
<p>PKGBUILD 文件内容：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Contributor: clayton  &lt;suzebi {[at]} gmail {[dot]} com&gt;</span>
&nbsp;
<span style="color: #007800;">pkgname</span>=opera-china-qt3
<span style="color: #007800;">pkgver</span>=<span style="color: #000000;">9.63</span>
<span style="color: #007800;">pkgrel</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">pkgdesc</span>=<span style="color: #ff0000;">&quot;The Opera web browser&quot;</span>
<span style="color: #007800;">url</span>=<span style="color: #ff0000;">&quot;http://www.operachina.com/linux/&quot;</span>
<span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">arch</span></span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'i686'</span> <span style="color: #ff0000;">'x86_64'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">depends</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'qt3'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">license</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'custom:opera'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">conflicts</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'opera'</span> <span style="color: #ff0000;">'opera-qt3'</span> <span style="color: #ff0000;">'opera-qt4'</span> <span style="color: #ff0000;">'opera-static'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #007800;"><span style="color: #7a0874; font-weight: bold;">source</span></span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'http://bbs.operachina.com/download/file.php?id=9703'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$CARCH</span>&quot;</span> = <span style="color: #ff0000;">&quot;x86_64&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #007800;"><span style="color: #7a0874; font-weight: bold;">source</span></span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'http://bbs.operachina.com/download/file.php?id=9704'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #007800;">md5sums</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'ad89437e22cfb7ee4179ddb8b2a402a4'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$CARCH</span>&quot;</span> = <span style="color: #ff0000;">&quot;x86_64&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #007800;">md5sums</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'87cdf2731c5bc878790a825efaeb7605'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
build<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">### fix the pkgname</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$CARCH</span>&quot;</span> = <span style="color: #ff0000;">&quot;i686&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #007800;">_pkgname</span>=<span style="color: #ff0000;">&quot;opera_9.63.ibis.2474.gcc4.qt3_i386.deb&quot;</span>
    <span style="color: #c20cb9; font-weight: bold;">mv</span> file.php?<span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">id</span></span>=<span style="color: #000000;">9703</span> <span style="color: #007800;">$_pkgname</span>
  <span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #007800;">_pkgname</span>=<span style="color: #ff0000;">&quot;opera_9.63.ibis.2474.gcc4.qt3_amd64.deb&quot;</span>
    <span style="color: #c20cb9; font-weight: bold;">mv</span> file.php?<span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">id</span></span>=<span style="color: #000000;">9704</span> <span style="color: #007800;">$_pkgname</span>
  <span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
  <span style="color: #c20cb9; font-weight: bold;">ar</span> vx <span style="color: #007800;">$_pkgname</span>
  <span style="color: #c20cb9; font-weight: bold;">tar</span> xfz data.tar.gz
&nbsp;
  <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-a</span> <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg
  <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-a</span> <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>etc <span style="color: #007800;">$startdir</span><span style="color: #000000; font-weight: bold;">/</span>pkg
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>下面是我用中国版 Opera 打开 ShareItem.org 的截图。</p>
<p style="text-align: center;"><a href="http://i2.photobucket.com/albums/y3/suzeb2/screenshot4.png"><img class="aligncenter" src="http://i2.photobucket.com/albums/y3/suzeb2/screenshot4.png" alt="中国版 Opera 截图" /></a></p>
<hr />
文章地址:<a href="http://shareitem.org/archive/pkgbuild-opera-china-qt3-for-linux.html">http://shareitem.org/archive/pkgbuild-opera-china-qt3-for-linux.html</a> <br />
<small>本文内容属于<a href="http://shareitem.org/">ShareItem.org</a>，遵循<a href='http://creativecommons.org/licenses/by-nc-nd/2.5/cn/'> CC </a>协议 | 7e6874b3209cf4276e96802080b61256</small>

<p>没有相关文章</p>]]></content:encoded>
			<wfw:commentRss>http://shareitem.org/archive/pkgbuild-opera-china-qt3-for-linux.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>字体美化：微软雅黑</title>
		<link>http://shareitem.org/archive/howto-use-msyh-font-in-archlinux.html</link>
		<comments>http://shareitem.org/archive/howto-use-msyh-font-in-archlinux.html#comments</comments>
		<pubDate>Thu, 23 Oct 2008 16:30:51 +0000</pubDate>
		<dc:creator>kaysiness</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[雅黑]]></category>

		<guid isPermaLink="false">http://www.shareitem.org/desktop/howto-use-msyh-font-in-archlinux.html</guid>
		<description><![CDATA[<p>先说说我的平台：Archlinux + GNOME2.24 / xfce4.4.2
在安装字体之前，首先要装好ubuntu版的cairo、fontconfig、freetype2、libxft。当然，你也可以使用lcd版的，但我个人觉得ubuntu的比lcd的显示效果要好。下面…</p>]]></description>
			<content:encoded><![CDATA[<p>先说说我的平台：Archlinux + GNOME2.24 / xfce4.4.2<br />
在安装字体之前，首先要装好ubuntu版的cairo、fontconfig、freetype2、libxft。当然，你也可以使用lcd版的，但我个人觉得ubuntu的比lcd的显示效果要好。下面是AUR上的链接</p>
<blockquote>
<ul>
<li><a href="http://aur.archlinux.org/packages.php?ID=17327">cairo-ubuntu</a></li>
<li><a href="http://aur.archlinux.org/packages.php?ID=17156">fontconfig-ubuntu</a></li>
<li><a href="http://aur.archlinux.org/packages.php?ID=17328">freetype2-ubuntu</a></li>
<li><a href="http://aur.archlinux.org/packages.php?ID=17157">libxft-ubuntu</a></li>
</ul>
</blockquote>
<p>在vista上M$启用了不少新字体，但由于版权的问题，我这里就不提供了，有兴趣的Google之。</p>
<blockquote>
<ol>
<li>Segoe UI 为 Vista 新英文 UI ClearType 字体</li>
<li>Sans Serif 字体： Calibri Candara Corbel</li>
<li>Serif 字体： Cambria Constantia</li>
<li>monospace 字体： Consolas</li>
<li>Msyh + Msyh bold 为 Vista 新中文字体</li>
<li>Msjh + Msjh Bold 为 Vista 新繁体中文字体</li>
<li>Meiryo + Meiryo Bold 为 Vista 新日文字体</li>
<li>Malgun Gothic + bold 为 Vista 新韩文字体</li>
</ol>
</blockquote>
<p>将以上的字体放到 /usr/share/fonts/vista 下，然后在该目录下执行</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> mkfontdir
<span style="color: #c20cb9; font-weight: bold;">sudo</span> mkfontscale</pre></div></div>

<p>并在 /etc/X11/xorg.conf 里加入一行：</p>
<blockquote><p>FontPath &#8220;/usr/share/fonts/vista&#8221;</p></blockquote>
<p>最后创建字体缓存</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> fc-cache <span style="color: #660033;">-fv</span></pre></div></div>

<p>确保 /etc/fonts/conf.d/ 下有 51-local.conf 这个文件，并确保里面的内容是</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #00bbdd;">&lt;!DOCTYPE fontconfig SYSTEM &quot;fonts.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fontconfig<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #808080; font-style: italic;">&lt;!-- Load local system customization file --&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">ignore_missing</span>=<span style="color: #ff0000;">&quot;yes&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>local.conf<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/include<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fontconfig<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>然后下载这个local.conf文件（<a href="http://www.box.net/shared/82mzs0va4e">box.net</a> | <a href="http://www.mediafire.com/?cdgydgu2ljl">MediaFile</a> | <a href="http://www.divshare.com/download/5653528-abb">DivShare</a>），解压后放到 /etc/fonts/ 下。这个文件是很早以前从<a href="http://www.linuxsir.org/bbs">linuxsir.org</a>论坛上收集的，不记得原作者是谁了，在此对原作者说声抱歉。好了，重启系统（或注销）吧。</p>
<p>然后打开GNOME面板的“系统”—“首选项”—“外观”，选择“字体”—“细节”，按照下图设置</p>
<p style="text-align: center"><a title="screenshot10.png" href="http://learn.yo2.cn/wp-content/uploads/121/12133/2008/10/screenshot10.png"><br />
<img src="http://learn.yo2.cn/wp-content/uploads/121/12133/2008/10/screenshot10.thumbnail.png" alt="screenshot10.png" /></a></p>
<p>不用去改默认的字体，保持默认的Sans即可。怎样？效果还不错把。下面是我的一些截图。<br />
nautilus截图</p>
<p style="text-align: center"><a title="nautilus截图" href="http://learn.yo2.cn/wp-content/uploads/121/12133/2008/10/screenshot11.png"><br />
<img src="http://learn.yo2.cn/wp-content/uploads/121/12133/2008/10/screenshot11.thumbnail.png" alt="nautilus截图" /></a></p>
<p>日文字体</p>
<p style="text-align: center"><a title="日文字体" href="http://learn.yo2.cn/wp-content/uploads/121/12133/2008/10/screenshot12.png"><br />
<img src="http://learn.yo2.cn/wp-content/uploads/121/12133/2008/10/screenshot12.thumbnail.png" alt="日文字体" /></a></p>
<p>中文字体</p>
<p style="text-align: center"><a title="中文字体" href="http://learn.yo2.cn/wp-content/uploads/121/12133/2008/10/screenshot13.png"><br />
<img src="http://learn.yo2.cn/wp-content/uploads/121/12133/2008/10/screenshot13.thumbnail.png" alt="中文字体" /></a></p>
<p>shareitem.org在firefox下的截图</p>
<p style="text-align: center"><a title="shareitem.org在firefox下的截图" href="http://learn.yo2.cn/wp-content/uploads/121/12133/2008/10/screenshot14.png"><br />
<img src="http://learn.yo2.cn/wp-content/uploads/121/12133/2008/10/screenshot14.thumbnail.png" alt="shareitem.org在firefox下的截图" /></a></p>
<p>163.com在firefox下的截图</p>
<p style="text-align: center"><a title="163.com在firefox下的截图" href="http://learn.yo2.cn/wp-content/uploads/121/12133/2008/10/screenshot15.png"><br />
<img src="http://learn.yo2.cn/wp-content/uploads/121/12133/2008/10/screenshot15.thumbnail.png" alt="163.com在firefox下的截图" /></a></p>
<hr />
文章地址:<a href="http://shareitem.org/archive/howto-use-msyh-font-in-archlinux.html">http://shareitem.org/archive/howto-use-msyh-font-in-archlinux.html</a> <br />
<small>本文内容属于<a href="http://shareitem.org/">ShareItem.org</a>，遵循<a href='http://creativecommons.org/licenses/by-nc-nd/2.5/cn/'> CC </a>协议 | 7e6874b3209cf4276e96802080b61256</small>

<p>没有相关文章</p>]]></content:encoded>
			<wfw:commentRss>http://shareitem.org/archive/howto-use-msyh-font-in-archlinux.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>在Archlinux上安装VMWare6.5</title>
		<link>http://shareitem.org/archive/howto-install-vmware65-in-archlinux.html</link>
		<comments>http://shareitem.org/archive/howto-install-vmware65-in-archlinux.html#comments</comments>
		<pubDate>Wed, 24 Sep 2008 08:44:14 +0000</pubDate>
		<dc:creator>kaysiness</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://www.shareitem.org/software/howto-install-vmware65-in-archlinux.html</guid>
		<description><![CDATA[<p>虽然转到linux下已经有一段时间了，但仍然离不开windows，主要是我还需要用到网银和淘宝，但要我装双系统又好像有点不情愿，所以装一个虚拟机对我来说是最好的方法，而且适逢LDCN上报道VMWa…</p>]]></description>
			<content:encoded><![CDATA[<p>虽然转到linux下已经有一段时间了，但仍然离不开windows，主要是我还需要用到网银和淘宝，但要我装双系统又好像有点不情愿，所以装一个虚拟机对我来说是最好的方法，而且适逢<a href="http://linuxdesktop.cn/2008/09/24/vmware-workstation-65-released/">LDCN上报道VMWare最新的6.5版推出</a>，所以决定在我的Archlinux上安装VMWare，下面总结一下具体的方法。<br />
参考资料：</p>
<ul>
<li><a href="http://wiki.archlinux.org/index.php/%E5%AE%89%E8%A3%85VMware_%28%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%29">Archlinux Wiki 安装VMware (简体中文)</a></li>
</ul>
<p>Archlinx Wiki上有说用<a href="http://aur.archlinux.org/packages.php">AUR</a>安装的，但那个<a href="http://aur.archlinux.org/packages.php?do_Details=1&amp;ID=6182&amp;O=0&amp;L=0&amp;C=0&amp;K=vmware&amp;SB=n&amp;SO=a&amp;PP=25&amp;do_MyPackages=0&amp;do_Orphans=0&amp;SeB=nd">PKGBUILD</a>好像没有维护了，所以只好到VMWare官方下载安装程序。到VMWare的网站上下载 VMware Workstation 6.5，具体<a href="http://www.vmware.com/download/desktop_virtualization.html">下载地址点这里</a>。需要注册了才能下载的，而且注册后能获得30天使用的key。下载那个 .bundle 后缀的安装程序，我下载的是32位版本，整个安装程序有382M。</p>
<p>在下载途中，我们先做一些准备，以便稍候安装。首先打开终端，输入下面的命令（假设你以root身份执行）。<br />
创建VMWare运行级目录</p>
<blockquote><p>mkdir -p /etc/rc.d/vmware.d/rc{0,1,2,3,4,5,6}.d</p></blockquote>
<p>创建lsmod的符号链接</p>
<blockquote><p>ln -s /bin/lsmod /sbin/</p></blockquote>
<p>好了，耐心等待下载吧。当完成后，定位到下载目录下，首先使安装程序具有执行权限。</p>
<blockquote><p>chmod +x VMware-Workstation-6.5.0-118166.i386.bundle</p></blockquote>
<p>输入下面命令开始安装。</p>
<blockquote><p>./VMware-Workstation-6.5.0-118166.i386.bundle &#8211;custom</p></blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/_UX_e8nZMpQ0/SNoG_JdOeFI/AAAAAAAABJw/YSm2GimxIuw/s1600-h/2008-09-24_647x506-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/_UX_e8nZMpQ0/SNoG_JdOeFI/AAAAAAAABJw/Mw5D6xaJZQc/s320-R/2008-09-24_647x506-2.png" /></a></div>
<div style="text-align: center;">
图一. 开始安装VMWare</div>
<p>整个安装程序是图形界面的，应该没啥大问题，可以一路next下去，当去到图二所示的System service runlevels时，填上</p>
<blockquote><p>
/etc/rc.d/vmware.d</p></blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/_UX_e8nZMpQ0/SNoHokpeKQI/AAAAAAAABKA/swk7_qaVQCM/s1600-h/2008-09-24_647x509.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_UX_e8nZMpQ0/SNoHokpeKQI/AAAAAAAABKA/4V45bJjVDHA/s320-R/2008-09-24_647x509.png" /></a></div>
<div style="text-align: center;">
图二. 选择System service runlevels的目录</div>
<p>去到图三所示的System service scripts时，需要改为</p>
<blockquote><p>
/etc/rc.d/</p></blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/_UX_e8nZMpQ0/SNoHYECaNuI/AAAAAAAABJ4/dl6tr-pGe3o/s1600-h/2008-09-24_649x505.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/_UX_e8nZMpQ0/SNoHYECaNuI/AAAAAAAABJ4/tQ9GHchurOs/s320-R/2008-09-24_649x505.png" /></a></div>
<div style="text-align: center;">
图三. 选择System service scripts的目录</div>
<p>图四是询问是否需要debug，如果你喜欢的话可以填上你的Eclipse的位置，我这里留空不填。</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/_UX_e8nZMpQ0/SNoHz4VTXgI/AAAAAAAABKI/F95nXys-5to/s1600-h/2008-09-24_647x506.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/_UX_e8nZMpQ0/SNoHz4VTXgI/AAAAAAAABKI/7HjOZwqJWP4/s320-R/2008-09-24_647x506.png" /></a></div>
<div style="text-align: center;">
图四. 输入Eclipse的目录</div>
<p>接着又是漫长的安装过程了，我这里大概用了三分多钟来安装。</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/_UX_e8nZMpQ0/SNoIiCw_d0I/AAAAAAAABKY/eSZkF24nQvI/s1600-h/2008-09-24_645x505.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_UX_e8nZMpQ0/SNoIiCw_d0I/AAAAAAAABKY/DsPOkXE9skc/s320-R/2008-09-24_645x505.png" /></a></div>
<div style="text-align: center;">
图五. 正在安装VMWare中</div>
<p>好了，终于安装完成了。</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/_UX_e8nZMpQ0/SNoIuTf7wAI/AAAAAAAABKg/NpBRjO-qRhE/s1600-h/2008-09-24_646x505-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_UX_e8nZMpQ0/SNoIuTf7wAI/AAAAAAAABKg/XNq6E2cZneQ/s320-R/2008-09-24_646x505-2.png" /></a></div>
<div style="text-align: center;">
图六. 安装完成</div>
<p>可以到GNOME应用程序菜单中的系统工具里找到VMWare Workstation，点击启动。如果你有已经安装好能使用的虚拟机，可以直接用VMWare Player打开。在使用前，你需要同意VMWare 的 EULA。</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/_UX_e8nZMpQ0/SNoI3jD5iUI/AAAAAAAABKo/zbk_9nCP9bc/s1600-h/Y--_644x423.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_UX_e8nZMpQ0/SNoI3jD5iUI/AAAAAAAABKo/bfcpBLPdkh4/s320-R/Y--_644x423.png" /></a></div>
<div style="text-align: center;">
图七. VMWare的EULA</div>
<p>好了，熟悉的界面出来了，现在可以尝试安装Windows XP了，而且VMWare6.5版还支持3D加速，支持Fsuion效果，赞。</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/_UX_e8nZMpQ0/SNoJCUpZc6I/AAAAAAAABKw/JpoEUU_nvkI/s1600-h/Y--_806x629.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/_UX_e8nZMpQ0/SNoJCUpZc6I/AAAAAAAABKw/JQg45M8vo1g/s320-R/Y--_806x629.png" /></a></div>
<div style="text-align: center;">
图八. VMWare的程序界面</div>
<p><strong>注意：</strong></p>
<ol>
<li>在每次启动VMWare时都需要加载<del datetime="2009-03-22T13:44:16+00:00">两个内核模块</del>（应该是四个，是我的大意，竟然漏了两个模块），分别是 vmmon 和 vmci 和 vmnet 和 vmblock，可以使用下列命令来加载。也可以使用 techlive 朋友的方法，直接将vmware添加到rc.conf中的daemon。（感谢 <a href="http://shareitem.org/archive/howto-install-vmware65-in-archlinux.html#comment-132">techlive</a> 的提醒）<br />
<blockquote><p>
# modprobe 模块名</p></blockquote>
<p>觉得麻烦可以将上面两个模块写到 /etc/rc.conf 文件的 MODULES 处，这样每次启动系统就会自动加载。</li>
<li>如果遇到 Guest os 没有声音，可以尝试到 VMware Workstation 里 Guest os 的 Hardware 设置中，将 Sound Card 设成一个具体的设备，例如 /dev/audio ，不要使用那个 Auto detect 选项，并且需要确保你的用户已经在 audio 组中。具体可以浏览<a href="http://shareitem.org/archive/howto-install-vmware65-in-archlinux.html#comment-136">这里</a>。（再一次感谢 techlive 朋友 <img src='http://shareitem.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ）</li>
</ol>
<hr />
文章地址:<a href="http://shareitem.org/archive/howto-install-vmware65-in-archlinux.html">http://shareitem.org/archive/howto-install-vmware65-in-archlinux.html</a> <br />
<small>本文内容属于<a href="http://shareitem.org/">ShareItem.org</a>，遵循<a href='http://creativecommons.org/licenses/by-nc-nd/2.5/cn/'> CC </a>协议 | 7e6874b3209cf4276e96802080b61256</small>

<p>没有相关文章</p>]]></content:encoded>
			<wfw:commentRss>http://shareitem.org/archive/howto-install-vmware65-in-archlinux.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>在Archlinux上编译安装ibus输入法</title>
		<link>http://shareitem.org/archive/howto-install-ibus-in-archlinux.html</link>
		<comments>http://shareitem.org/archive/howto-install-ibus-in-archlinux.html#comments</comments>
		<pubDate>Sun, 31 Aug 2008 14:05:15 +0000</pubDate>
		<dc:creator>kaysiness</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[ibus]]></category>

		<guid isPermaLink="false">http://www.shareitem.org/software/howto-install-ibus-in-archlinux.html</guid>
		<description><![CDATA[<p>ibus在昨天发布了其最新的0.1.1.20080830版，在看了LDCN的报道后，手痒痒的，于是在自己的Archlinux上编译玩了一把，初步试用后，决定将ibus设为我的默认输入法，那些scim和fcitx终于可以光荣退休了…</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/ibus/">ibus</a>在昨天发布了其最新的0.1.1.20080830版，在看了<a href="http://linuxdesktop.cn/2008/08/31/ibus-011/">LDCN</a>的报道后，手痒痒的，于是在自己的Archlinux上编译玩了一把，初步试用后，决定将ibus设为我的默认输入法，那些scim和fcitx终于可以光荣退休了，目前使用上唯一的不足是输入条不能跟随，但这并不影响使用，而且相信在日后的版本中会得到改进的。<a href="http://code.google.com/p/ibus/">点击访问ibus的主页</a>。</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/_UX_e8nZMpQ0/SLotjxe95WI/AAAAAAAABIA/Usyidl8iLgU/s1600-h/y--_388x273.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_UX_e8nZMpQ0/SLotjxe95WI/AAAAAAAABIA/2FoSWrt9H0I/s320-R/y--_388x273.png" /></a></div>
<p>要在Archlinux上编译安装，首先需要满足依赖（我使用git方式来获取源代码，当然你也可以直接<a href="http://code.google.com/p/ibus/downloads/list">到其主页上下载</a>）</p>
<blockquote><p>
# pacman -S python dbus-python gnome-python dbus-python pyxdg cvs git</p></blockquote>
<p>获取ibus的源代码</p>
<blockquote><p>
$ git clone git://github.com/phuang/ibus.git ibus</p></blockquote>
<p>进入源代码所在目录</p>
<blockquote><p>
$ cd ibus</p></blockquote>
<p>配置</p>
<blockquote><p>
$ ./autogen.sh &#8211;prefix=/usr</p></blockquote>
<p>开始编译</p>
<blockquote><p>
$ make</p></blockquote>
<p>安装ibus</p>
<blockquote><p>
# make install</p></blockquote>
<p>在/etc/gtk-2.0/gtk.immodules文件中加入ibus，注意备份</p>
<blockquote><p>
# cp /etc/gtk-2.0/gtk.immodules /etc/gtk-2.0/gtk.immodules.bak<br />
# gtk-query-immodules-2.0-32 &gt; /etc/gtk-2.0/gtk.immodules</p></blockquote>
<p>安装输入法引擎<br />
大家可以选择安装拼音输入法和五笔输入法，其中拼音用的是scim-python的词库，我这里选择安装拼音，五笔的安装方法和拼音是一样的。<br />
首先获取输入法引擎源代码</p>
<blockquote><p>
$ git clone git://github.com/phuang/ibus-pinyin.git ibus-pinyin（拼音）<br />
$ git clone git://github.com/phuang/ibus-table.git ibus-table（五笔）</p></blockquote>
<p>进入源代码所在目录</p>
<blockquote><p>
$ cd ibus-pinyin（或者是ibus-table）</p></blockquote>
<p>配置</p>
<blockquote><p>
$ ./autogen.sh &#8211;prefix=/usr</p></blockquote>
<p>编译</p>
<blockquote><p>
$ make</p></blockquote>
<p>安装</p>
<blockquote><p>
# make install</p></blockquote>
<p>编辑家目录下的.profile文件（隐藏文件），在其中添加下面三行，把scim和fcitx的相关项注释掉，并注销一次。</p>
<blockquote><p>
export XMODIFIERS=@im=ibus<br />
export GTK_IM_MODULE=ibus<br />
export QT_IM_MODULE=ibus</p></blockquote>
<p>好了，安装算是完成了，可以在 “系统”－“首选项” 中找到 “IBus Preferennces”，进行必要的设置，例如加载相关的输入法引擎，是否随桌面一起启动等。第一次启动会询问是否启动守护进程，回答是即可。</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/_UX_e8nZMpQ0/SLou5CQiRsI/AAAAAAAABII/WAtdxYkEn7g/s1600-h/y--_333x472.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/_UX_e8nZMpQ0/SLou5CQiRsI/AAAAAAAABII/wLJpmv-5uR0/s320-R/y--_333x472.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/_UX_e8nZMpQ0/SLou5d8HvJI/AAAAAAAABIQ/yaiW6wj8Xx8/s1600-h/y--_330x474.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_UX_e8nZMpQ0/SLou5d8HvJI/AAAAAAAABIQ/TSqpZ1ilWlw/s320-R/y--_330x474.png" /></a></div>
<p>下面是拼音引擎的设置截图，可以看出设置项还是很丰富的。</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/_UX_e8nZMpQ0/SLov961AADI/AAAAAAAABIY/sFLaKiiP-kA/s1600-h/y--_450x474.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_UX_e8nZMpQ0/SLov961AADI/AAAAAAAABIY/eX5ekLUb1KU/s320-R/y--_450x474.png" /></a></div>
<p><b>2008年9月6日补上AUR的PKGBUILD地址</b></p>
<ul>
<li><a href="http://aur.archlinux.org/packages.php?ID=19480">ibus-engine-git</a></li>
<li><a href="http://aur.archlinux.org/packages.php?ID=19481">ibus-pinyin-git</a></li>
<li><a href="http://aur.archlinux.org/packages.php?ID=19483">ibus-table-git</a></li>
</ul>
<hr />
文章地址:<a href="http://shareitem.org/archive/howto-install-ibus-in-archlinux.html">http://shareitem.org/archive/howto-install-ibus-in-archlinux.html</a> <br />
<small>本文内容属于<a href="http://shareitem.org/">ShareItem.org</a>，遵循<a href='http://creativecommons.org/licenses/by-nc-nd/2.5/cn/'> CC </a>协议 | 7e6874b3209cf4276e96802080b61256</small>

<p>没有相关文章</p>]]></content:encoded>
			<wfw:commentRss>http://shareitem.org/archive/howto-install-ibus-in-archlinux.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>从 LiveUSB 安装 Archlinux</title>
		<link>http://shareitem.org/archive/howto-install-archlinux-from-liveusb.html</link>
		<comments>http://shareitem.org/archive/howto-install-archlinux-from-liveusb.html#comments</comments>
		<pubDate>Wed, 20 Aug 2008 03:32:31 +0000</pubDate>
		<dc:creator>kaysiness</dc:creator>
				<category><![CDATA[Distribution]]></category>
		<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[LiveUSB]]></category>

		<guid isPermaLink="false">http://www.shareitem.org/distribution/howto-install-archlinux-from-liveusb.html</guid>
		<description><![CDATA[<p>从 2008.06 版开始，Archlinux 开始支持从 USB 介质安装，碰巧今天打算安装 64 位版的 Archlinux ，所以尝尝鲜，用U盘来安装，而且整个镜像才330M，相信现在每个人手头上都有个G级的U盘吧。以下是我…</p>]]></description>
			<content:encoded><![CDATA[<p>从 2008.06 版开始，<a href="http://www.archlinux.org/">Archlinux</a> 开始支持从 USB 介质安装，碰巧今天打算安装 64 位版的 Archlinux ，所以尝尝鲜，用U盘来安装，而且整个镜像才330M，相信现在每个人手头上都有个G级的U盘吧。以下是我的安装步骤。</p>
<p>首先下载 Archlinux 的 .img 格式镜像，你可以从<a href="ftp://ftp.archlinux.org/iso/">这里</a>下载，比如我下的是<a href="ftp://ftp.archlinux.org/iso/2008.06/archlinux-2008.06-core-x86_64.img">archlinux-2008.06-core-x86_64.img</a>。</p>
<p><b>For Linux</b><br />
我们只要用 dd 这个命令就能把img镜像写到U盘上。首先确保你的U盘是 /dev/sd[x] ，比如我的U盘是 /dev/sdc，确保对 /dev/sdc 有写权限，执行下面命令。</p>
<blockquote><p>
dd if=archlinux-2008.06-core-x86_64.img of=<span style="color: red;">/dev/sdc </span></p></blockquote>
<p><b>For Windows</b><br />
想要在 Win 上把img镜像写到U盘上，我们可以使用 dd 的 windouw 版（<del datetime="2009-08-16T13:54:22+00:00">下载：<a href="http://cn.ziddu.com/download/217021/dd.tar.gz.html">ziddu</a> | <a href="http://www.box.net/shared/5xnr1yxxrz">box.net</a></del>这个是旧版，而且下载地址都失效了，直接放上<a href="http://www.chrysocome.net/dd">下载页面的链接</a>，点进去下载吧）。比如下载到C:盘下，把img镜像也拷到C:盘，插上U盘，打开cmd命令提示符，定位到c:，输入下面命令。其中红色部分为我的U盘的盘符。</p>
<blockquote><p>
<del datetime="2009-08-16T13:54:22+00:00">dd if=archlinux-2008.06-core-x86_64.img of=<span style="color: red;">g: </span></del>（这个是旧版的方法，新版dd已经改为下面的命令了，感谢下面几位朋友的提醒！）<br />
dd if=archlinux-2008.06-core-x86_64.img of=<span style="color: red;">\\.\g:</span></p></blockquote>
<p>等待dd操作完成后，确保把U盘插上，然后重启吧，到 <strike>BOSS</strike> BIOS 里改为USB启动，等待片刻，熟悉的GRUB界面出来了，然后和光盘等方式的安装没有区别了。</p>
<hr />
文章地址:<a href="http://shareitem.org/archive/howto-install-archlinux-from-liveusb.html">http://shareitem.org/archive/howto-install-archlinux-from-liveusb.html</a> <br />
<small>本文内容属于<a href="http://shareitem.org/">ShareItem.org</a>，遵循<a href='http://creativecommons.org/licenses/by-nc-nd/2.5/cn/'> CC </a>协议 | 7e6874b3209cf4276e96802080b61256</small>

<p>没有相关文章</p>]]></content:encoded>
			<wfw:commentRss>http://shareitem.org/archive/howto-install-archlinux-from-liveusb.html/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>HowTo:搭建家用下载&amp;路由服务器</title>
		<link>http://shareitem.org/archive/howto-build-a-download-and-routing-home-server.html</link>
		<comments>http://shareitem.org/archive/howto-build-a-download-and-routing-home-server.html#comments</comments>
		<pubDate>Sat, 21 Jun 2008 12:37:05 +0000</pubDate>
		<dc:creator>kaysiness</dc:creator>
				<category><![CDATA[Configure]]></category>
		<category><![CDATA[Archlinux]]></category>
		<category><![CDATA[dnsmasq]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[MLDonkey]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.shareitem.org/2008/06/21/howto-build-a-download-and-routing-home-server/</guid>
		<description><![CDATA[<p>其实这篇文章不能说是 HowTo ，最多只能说是我自己的安装笔记而已。该服务器主要用来下载和实现共享上网，有空还可以用它来研究iptables。整个系统没有鼠标键盘显示器，全都日常维护都是…</p>]]></description>
			<content:encoded><![CDATA[<p>其实这篇文章不能说是 HowTo ，最多只能说是我自己的安装笔记而已。该服务器主要用来下载和实现共享上网，有空还可以用它来研究iptables。整个系统没有鼠标键盘显示器，全都日常维护都是用SSH进行，所以使用了密钥的验证方式确保安全。下载方面用mldonkey实现，通过局域网内其他电脑用网页方式管理，唯一的不足是对BT下载支持不够。由于服务器基本上都是24小时运作的，所有在上面弄了个dnsmasq，实现DNS缓存和DHCP，局域网的其他机器ip都是自动获取，接上网线就能上网，十分方便。</p>
<p>先说说用到的软件</p>
<ul>
<li> ArchLinux</li>
<li> ssh</li>
<li> iptables</li>
<li> dnsmasq</li>
<li> mldonkey</li>
</ul>
<p><font color="#0000ff"><strong>ArchLinux</strong></font><br />
选择安装包时只选择 base 组，加上 support 组中 re-pppoe，sudo，iptables等几个包，安装一个最小系统。安装完后运行</p>
<blockquote><p># pacman-optimize<br />
# sync<br />
# pacman -Syu mldonkey dnsmasq</p></blockquote>
<p><font color="#0000ff"><strong>ssh</strong></font><br />
为了安全，我这里设置了只允许用密钥验证，以下是我的 /etc/ssh/sshd_config 文件的内容</p>
<blockquote><p>Port 22<br />
ListenAddress 0.0.0.0<br />
Protocol 2</p>
<p>KeyRegenerationInterval 1h<br />
ServerKeyBits 768</p>
<p>LoginGraceTime 2m<br />
PermitRootLogin yes</p>
<p>RSAAuthentication yes<br />
PubkeyAuthentication yes<br />
AuthorizedKeysFile	.ssh/authorized_keys<br />
PasswordAuthentication no<br />
PermitEmptyPasswords no</p>
<p>ChallengeResponseAuthentication no<br />
UsePAM yes<br />
Subsystem	sftp /usr/lib/ssh/sftp-server</p></blockquote>
<p><font color="#0000ff"><strong>iptables</strong></font><br />
由于服务器上只有一张网卡连接到交换机，再通过交换机连接到 ADSL Modem 上，所以需要共享服务器上的ppp0链接让局域网上的其他机器上网。</p>
<blockquote><p># iptables -F INPUT<br />
# iptables -F FORWARD<br />
# iptables -F POSTROUTING -t nat<br />
# iptables -t nat -F<br />
# iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o ppp0 -j MASQUERADE<br />
# iptables-save -c &gt; /etc/iptables/iptables.rules</p></blockquote>
<p><font color="#0000ff"><strong>dnsmasq</strong></font><br />
这个主要是用来做 dns 缓存和 dhcp 服务，参考了 firefoxmmx 写的这篇教程《<a href="http://www.linuxsir.org/bbs/showthread.php?t=327632&amp;highlight=dnsmasq">提高ADSL（pppoe）上网速度</a>》</p>
<blockquote><p># vi /etc/dnsmasq.conf</p></blockquote>
<p>找到下面这一项</p>
<blockquote><p>#resolv-file=</p></blockquote>
<p>用下面的一条语句替换</p>
<blockquote><p>resolv-file=/etc/resolv_dnsmasq.conf</p></blockquote>
<p>将下面两句前的注释符号删除</p>
<blockquote><p>interface=eth0<br />
dhcp-range=192.168.1.10,192.168.1.20,255.255.255.0,24h</p></blockquote>
<p>创建新的dns配置文件，把自己常用的DNS添加到/etc/resolv_dnsmasq.conf中</p>
<blockquote><p># cp /etc/resolv.conf /etc/resolv_dnsmasq.conf</p></blockquote>
<p>编辑 /etc/ppp/pppoe.conf</p>
<blockquote><p># vi /etc/ppp/pppoe.conf</p></blockquote>
<p>找到下列一行</p>
<blockquote><p>PEERDNS=NO</p></blockquote>
<p>并在该行下面添加</p>
<blockquote><p>DNS1 = 127.0.0.1</p></blockquote>
<p><font color="#0000ff"><strong>mldonkey</strong></font><br />
这里要注意 mldonkey 默认只允许 127.0.0.1 访问，要首先设置允许其他网段访问。~/.mldonkey/downloads.ini 文件的第37行就是设置的地方。再配合《<a href="http://www.shareitem.org/2008/05/13/imput-amule-emule-userhash-to-mldonkey/">导入 amule/emule 的设置到 Mldonkey</a>》和《<a href="http://www.shareitem.org/2008/03/22/mldonkey-import-amule-emule-temp/">让 MLDonkey 导入 amule/emule 的临时文件</a>》两篇文章，驴子基本上能全速运行了，如果你遇到中文文件名变成下划线的问题，可以参考这篇文章《 				<a href="http://www.shareitem.org/2008/06/19/mldonkey-chinese-problem/">解决 Mldonkey 中文文件变下划线问题		</a>》。</p>
<p>最后启动服务<br />
# /etc/rc.d/iptables start<br />
# /etc/rc.d/sshd start<br />
# /etc/rc.d/samba start<br />
# /etc/rc.d/dnsmasq start<br />
# /etc/rc.d/mldonkey start</p>
<p>或者编辑 /etc/rc.conf 文件，添加到 daemon 段中。</p>
<p>ok，收工，enjoy it。</p>
<hr />
文章地址:<a href="http://shareitem.org/archive/howto-build-a-download-and-routing-home-server.html">http://shareitem.org/archive/howto-build-a-download-and-routing-home-server.html</a> <br />
<small>本文内容属于<a href="http://shareitem.org/">ShareItem.org</a>，遵循<a href='http://creativecommons.org/licenses/by-nc-nd/2.5/cn/'> CC </a>协议 | 7e6874b3209cf4276e96802080b61256</small>

<p>没有相关文章</p>]]></content:encoded>
			<wfw:commentRss>http://shareitem.org/archive/howto-build-a-download-and-routing-home-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
