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

<channel>
	<title>浏忙大爆炸 &#187; Linux</title>
	<atom:link href="http://blog.waterlin.org/articles/tag/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.waterlin.org</link>
	<description>源于理工科男的烂笔头情结</description>
	<lastBuildDate>Fri, 03 Feb 2012 08:35:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>log4cxx0.10.0 版本在 Linux 无法输出中文的问题</title>
		<link>http://blog.waterlin.org/articles/log-chinese-logs-on-linux-using-log4cxx.html</link>
		<comments>http://blog.waterlin.org/articles/log-chinese-logs-on-linux-using-log4cxx.html#comments</comments>
		<pubDate>Wed, 14 Dec 2011 08:16:46 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/log-chinese-logs-on-linux-using-log4cxx.html</guid>
		<description><![CDATA[最近在 Linux 下使用 log4cxx 库，使用的 log4cxx 版本为 0.10.0，结果无法显示中文日志信息。 这可怎么办呢？我不可能把中文日志全部一行一行替换为英文的，这可是一个非常傻B的举动。 经过研究，终于知道需要经过如下步骤才能让 log4cxx 在 Linux 下正常显示中文日志： 你可以先 locale 检查一下 Linux 终端环境是不是 zh_CN ； $ locale 如果你的是 en_US 之类的编码，则需要把 locale 设置为简体中文： $ export LC_ALL="zh_CN.UTF-8" 如果你的系统提示说没有安装本字符集，则需要用命令进行安装： $ sudo apt-get install language-pack-zh-hans 在程序里设置应用程序的 locale 和终端一样： LoggerPtr logger; log4cxx::PropertyConfigurator::configure("./log4cxx.properties"); logger= Logger::getLogger("test") ; logger-&#62;info(("Start logging")); setlocale(LC_ALL, "zh_CN.UTF-8"); 关键是最后这一句 setlocale，要设置得和终端一样，都是 zh_CN.UTF-8。 这样，你的程序就可以用 log4cxx0.10.0 [...]]]></description>
			<content:encoded><![CDATA[<p>最近在 Linux 下使用 log4cxx 库，使用的 log4cxx 版本为 0.10.0，结果无法显示中文日志信息。</p>
<p>这可怎么办呢？我不可能把中文日志全部一行一行替换为英文的，这可是一个非常傻B的举动。</p>
<p>经过研究，终于知道需要经过如下步骤才能让 log4cxx 在 Linux 下正常显示中文日志：</p>
<ol>
<li>你可以先 locale 检查一下 Linux 终端环境是不是 zh_CN ； </p>
<pre>
$ locale
</pre>
</li>
<li>如果你的是 en_US 之类的编码，则需要把 locale 设置为简体中文：
<pre>
$ export <span>LC_ALL</span>=<span>"zh_CN.UTF-8"</span>
</pre>
<p>如果你的系统提示说没有安装本字符集，则需要用命令进行安装：</p>
<pre>
$ sudo apt-get install language-pack-zh-hans
</pre>
</li>
<li>在程序里设置应用程序的 locale 和终端一样：
<pre>
LoggerPtr logger;
log4cxx::PropertyConfigurator::configure("./log4cxx.properties");
logger= Logger::getLogger("test") ;
logger-&gt;info(("Start logging"));
setlocale(LC_ALL, "zh_CN.UTF-8");
</pre>
<p>关键是最后这一句 setlocale，要设置得和终端一样，都是 zh_CN.UTF-8。</p>
</li>
</ol>
<p>这样，你的程序就可以用 log4cxx0.10.0 输出中文日志信息了。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/log-chinese-logs-on-linux-using-log4cxx.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu 11.10 下 OpenCV2.2 及更低版本无法读取视频的问题</title>
		<link>http://blog.waterlin.org/articles/ubuntu-opencv-read-video-problem.html</link>
		<comments>http://blog.waterlin.org/articles/ubuntu-opencv-read-video-problem.html#comments</comments>
		<pubDate>Fri, 25 Nov 2011 09:01:39 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/ubuntu-opencv-read-video-problem.html</guid>
		<description><![CDATA[今天在 Ubuntu 下使用 OpenCV 来读取一个视频，碰到了下述问题： 自己手动安装的 OpenCV2.2.0 无法正确读取视频内容，用函数 cvCaptureFromAVI() 及 cvGetCaptureProperty() 均提示说失败： 所有的测试视频在 Windows 下用 OpenCV2.2.0 是可以正常读取的，应该是 ffmpeg 安装不完全或是不正确。 从源里安装 OpenCV2.1 后，可以打开视频读取数据，可是在读取视频帧内容的时候，却提示如下错误： [swscaler @ 0x94b3e80]No accelerated colorspace conversion found from yuv420p to bgr24. 这个问题应该是 OpenCV 在用 ffmpeg 解压 yuv420 数据时出错。 对于上述问题，可以采用下面的办法来解决： 重新安装 ffmpeg x264：Install and use the latest FFmpeg and x264 再重新安装 OpenCV，经测试，可以正确安装 OpenCV 2.3.1 [...]]]></description>
			<content:encoded><![CDATA[<p>今天在 Ubuntu 下使用 OpenCV 来读取一个视频，碰到了下述问题：</p>
<ol>
<li>自己<a href="http://cn.waterlin.org/CVCG/OpenCV-installation-error.html">手动安装的 OpenCV2.2.0</a> 无法正确读取视频内容，用函数 cvCaptureFromAVI() 及 cvGetCaptureProperty() 均提示说失败：
<p>所有的测试视频在 Windows 下用 OpenCV2.2.0 是可以正常读取的，应该是 ffmpeg 安装不完全或是不正确。</p>
</li>
<li>从源里安装 OpenCV2.1 后，可以打开视频读取数据，可是在读取视频帧内容的时候，却提示如下错误：
<pre>
[swscaler @ 0x94b3e80]No accelerated colorspace conversion found from yuv420p to bgr24.
</pre>
<p>这个问题应该是 OpenCV 在用 ffmpeg 解压 yuv420 数据时出错。</p>
</li>
</ol>
<p>对于上述问题，可以采用下面的办法来解决：</p>
<ol>
<li>重新安装 ffmpeg x264：<a href="http://ubuntuforums.org/showthread.php?t=786095">Install and use the latest FFmpeg and x264</a></li>
<li>再重新<a href="http://opencv.willowgarage.com/wiki/InstallGuide_Linux">安装 OpenCV</a>，经测试，可以正确安装 OpenCV 2.3.1 版本，安装成功后，视频读写一切正常。</li>
</ol>
<p>另外：如果是在 Ubuntu-Server 版下安装 OpenCV，在安装 libhighgui-dev 的时候，需要安装很多和桌面相关的依赖包。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/ubuntu-opencv-read-video-problem.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>设置 Linux 的 LD_LIBRARY_PATH 变量</title>
		<link>http://blog.waterlin.org/articles/set-linux-ld_library_path.html</link>
		<comments>http://blog.waterlin.org/articles/set-linux-ld_library_path.html#comments</comments>
		<pubDate>Thu, 14 Jul 2011 02:37:46 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/set-linux-ld_library_path.html</guid>
		<description><![CDATA[在 Linux 下，如果你写好了自己的动态链接库，需要在其它程序里调用，则需要让这些程序能找到这些动态链接库。如果设置不对，会出现类似如下的错误： test: error while loading shared libraries: libexampleso.so.0: cannot open shared object file: No such file or directory 这是因为没有把动态链接库的安装路径（例如说是 /usr/local/lib ）放到变量 LD_LIBRARY_PATH 里。 这时，可以用命令 export 来临时测试确认是不是这个问题： export LD_LIBRARY_PATH=/usr/local/lib 在终端里运行上面这行命令，再运行这个可执行文件，如果运行正常就说明是这个问题。 接下来的问题是：以上做法，只是临时设置变量 LD_LIBRARY_PATH ，下次开机，一切设置将不复存在；如何把这个值持续写到 LD_LIBRARY_PATH 里呢？ 我们可以在 ~/.bashrc 或者 ~/.bash_profile 中加入 export 语句，前者在每次登陆和每次打开 shell 都读取一次，后者只在登陆时读取一次。我的习惯是加到 ~/.bashrc 中，在该文件的未尾，可采用如下语句来使设置生效： export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 修改完后，记得关掉当前终端并重新打开一个新的终端，从而使上面的配置生效。]]></description>
			<content:encoded><![CDATA[<p>在 Linux 下，如果你写好了自己的动态链接库，需要在其它程序里调用，则需要让这些程序能找到这些动态链接库。如果设置不对，会出现类似如下的错误：</p>
<pre>
test: error while loading shared libraries: libexampleso.so.0: cannot open shared object file: No such file or directory
</pre>
<p>这是因为没有把动态链接库的安装路径（例如说是 /usr/local/lib ）放到变量 <a href="http://baike.baidu.com/view/1270749.htm">LD_LIBRARY_PATH</a> 里。</p>
<p>这时，可以用命令 <strong>export</strong> 来临时测试确认是不是这个问题：</p>
<pre>
<span>export</span> <span>LD_LIBRARY_PATH</span>=/usr/local/lib
</pre>
<p>在终端里运行上面这行命令，再运行这个可执行文件，如果运行正常就说明是这个问题。</p>
<p>接下来的问题是：以上做法，只是临时设置变量 <strong>LD_LIBRARY_PATH</strong> ，下次开机，一切设置将不复存在；如何把这个值持续写到 LD_LIBRARY_PATH 里呢？</p>
<p>我们可以在 <strong>~/.bashrc</strong> 或者 <strong>~/.bash_profile</strong> 中加入 export 语句，前者在每次登陆和每次打开 shell 都读取一次，后者只在登陆时读取一次。我的习惯是加到 <strong>~/.bashrc</strong> 中，在该文件的未尾，可采用如下语句来使设置生效：</p>
<pre>
<span>export</span> <span>LD_LIBRARY_PATH</span>=$<span>LD_LIBRARY_PATH</span>:/usr/local/lib
</pre>
<p>修改完后，记得关掉当前终端并重新打开一个新的终端，从而使上面的配置生效。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/set-linux-ld_library_path.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用 VirtualBox 模拟远程 Linux 环境来调试代码</title>
		<link>http://blog.waterlin.org/articles/using-virtualbox-as-virtual-linux-server.html</link>
		<comments>http://blog.waterlin.org/articles/using-virtualbox-as-virtual-linux-server.html#comments</comments>
		<pubDate>Tue, 12 Jul 2011 09:05:25 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/using-virtualbox-as-virtual-linux-server.html</guid>
		<description><![CDATA[我的笔记本电脑因为之前分区的原因，没有办法安装双系统，导致调试 Linux 程序诸多不便。如果你也有这种情况，或是有很多事情都需要同时在 Windows 和 Linux 下处理，可以和我一样，在本地装一个 VirtualBox 虚拟 Ubuntu 环境，配好相应的开发环境后，从事 Linux 代码的开发与调试工作。 主要思路 把这个 VirtualBox 里的 Linux 当成服务器，用 putty 连上去，慢慢调试；本地文件，可以用 Eclipse 编辑好，通过文件共享或是 SCP 的方式，传到虚拟机里的 Linux 服务器里。 主要配置步骤 根据VirtualBox 与宿主机器有四种网络设置方式的介绍，把 VirtualBox 里的 Linux 上网方式设置成为 Bridged networking 模式，这样，你在宿主机器里就可以把这个虚拟机当成普通服务器； 根据你自己的需要，配置 Linux 服务器环境； 配置并开启虚拟机里 Ubuntu 的 SSH 服务 详细的 SSH 配置方法可以看一下在 Ubuntu 下开户 ssh 服务里的介绍。 同步文件到 Ubuntu 服务器 [...]]]></description>
			<content:encoded><![CDATA[<p>我的笔记本电脑因为之前分区的原因，没有办法安装双系统，导致调试 Linux 程序诸多不便。如果你也有这种情况，或是有很多事情都需要同时在 Windows 和 Linux 下处理，可以和我一样，在本地装一个 VirtualBox 虚拟 Ubuntu 环境，配好相应的开发环境后，从事 Linux 代码的开发与调试工作。</p>
<div class="outline-3">
<h3 id="sec-1.1">主要思路</h3>
<div class="outline-text-3">
<p>把这个 VirtualBox 里的 Linux 当成服务器，用 putty 连上去，慢慢调试；本地文件，可以用 Eclipse 编辑好，通过文件共享或是 SCP 的方式，传到虚拟机里的 Linux 服务器里。</p>
</p></div>
</p></div>
<div class="outline-3">
<h3 id="sec-1.2">主要配置步骤</h3>
<div class="outline-text-3">
<ol>
<li>根据<a href="http://blog.waterlin.org/articles/virtualbox-network-setting.html">VirtualBox 与宿主机器有四种网络设置方式</a>的介绍，把 VirtualBox 里的 Linux 上网方式设置成为 Bridged networking 模式，这样，你在宿主机器里就可以把这个虚拟机当成普通服务器；</li>
<li>根据你自己的需要，配置 Linux 服务器环境；</li>
<li>配置并开启虚拟机里 Ubuntu 的 SSH 服务
<p>详细的 SSH 配置方法可以看一下<a href="http://cn.waterlin.org/Linux/Debian-System.html#open-ssh-under-ubuntu">在 Ubuntu 下开户 ssh 服务</a>里的介绍。</p>
</li>
<li>同步文件到 Ubuntu 服务器
<p>可以用 WinSCP 同步 Windows 系统里的文件到 Ubuntu 里，当然，也可以采用 FTP 或是 SFTP 之类的软件来同步文件。</p>
</li>
</ol>
<p>PS：如果你觉得用 WinSCP 来同步文件略显麻烦，你可以<a href="http://blog.waterlin.org/articles/configure-virtualbox-to-perfect-ubuntu.html">在 Windows 里设置一个供 Ubuntu 使用的共享目录</a>，然后你直接把东西扔到这个目录，就可以在 Ubuntu 里访问相关的文件；当然，使用这种方法，你要小心保护好你的文件，不要轻易地删除共享目录里的文件。</p>
<p>出于模拟及方便的角度，我依然推荐使用 WinSCP 的方式来同步文件。</p>
</p></div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/using-virtualbox-as-virtual-linux-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu/Debian 新字体的安装</title>
		<link>http://blog.waterlin.org/articles/install-new-fonts-under-ubuntu.html</link>
		<comments>http://blog.waterlin.org/articles/install-new-fonts-under-ubuntu.html#comments</comments>
		<pubDate>Mon, 04 Jan 2010 15:11:04 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/install-new-fonts-under-ubuntu.html</guid>
		<description><![CDATA[系统字体配置能让系统变得更养眼，对于整天在电脑前打发时间的我们，很重要！ 详情可以看 Ubuntu 官方文档。 用 Synaptic 自动安装 在 Synaptic 包管理器里输入 font 关键字，会有上百个相关的安装信息。 软件包 mscorefonts 包含了微软免费的 web 字体，比如说 Times New Roman，Courier New 等。 在安装好了 mscorefonts 字体软件包后，要让你的程序能识别这些字体，需要重启想使用新字体的程序。 手动安装 在 Ubuntu/Debian 下，我们也可以很方便地手动安装字体（这里只关心技术问题，不讨论版权相关问题）。 比如说我想使用 Windows 的字体，只要在 Windows 的系统目录 C:\WINDOWS\Fonts 里把想要安装到 Linux 的字体拷到 Linux 下面，然后用 Alt-F2 输入下面的命令： gksu nautilus /usr/share/fonts/truetype 在弹出来的文件浏览器里创建一个你自己容易记的名字（好备份嘛！），把那些 truetype 字体文件放到该文件夹里，再使用命令 Alt-F2 并把 &#8216;run in terminal&#8217; 这个选项给勾上。然后再输入下面的命令： sudo [...]]]></description>
			<content:encoded><![CDATA[<p>系统字体配置能让系统变得更养眼，对于整天在电脑前打发时间的我们，很重要！</p>
<p>详情可以看 <a href="https://wiki.ubuntu.com/Fonts">Ubuntu 官方文档</a>。</p>
<div class="outline-3" id="outline-container-1">
<h3 id="sec-1">用 Synaptic 自动安装</h3>
<div id="text-1">
<p>在 Synaptic 包管理器里输入 font 关键字，会有上百个相关的安装信息。</p>
<p>软件包 mscorefonts 包含了微软免费的 web 字体，比如说 Times New Roman，Courier New 等。</p>
<p>在安装好了 mscorefonts 字体软件包后，要让你的程序能识别这些字体，需要重启想使用新字体的程序。</p>
</p></div>
</p></div>
<div class="outline-3" id="outline-container-2">
<h3 id="sec-2">手动安装</h3>
<div id="text-2">
<p>在 Ubuntu/Debian 下，我们也可以很方便地<a href="https://wiki.ubuntu.com/Fonts#Manually">手动安装字体</a>（这里只关心技术问题，不讨论版权相关问题）。</p>
<p>比如说我想使用 Windows 的字体，只要在 Windows 的系统目录 C:\WINDOWS\Fonts 里把想要安装到 Linux 的字体拷到 Linux 下面，然后用 Alt-F2 输入下面的命令：</p>
<pre>
gksu nautilus /usr/share/fonts/truetype
</pre>
<p>在弹出来的文件浏览器里创建一个你自己容易记的名字（好备份嘛！），把那些 truetype 字体文件放到该文件夹里，再使用命令 Alt-F2 并把 &#8216;run in terminal&#8217; 这个选项给勾上。然后再输入下面的命令：</p>
<pre>
sudo fc-cache -f -v
</pre>
<p>这样就完成了字体的安装。当然，你要使用新字体，需要重启你的应用程序甚至有可能要重启你的系统。</p>
<p>对于个人用户来说，安装字体最方便地方法是把字体文件放到 <em>home/&lt;username&gt;</em>.fonts 文件夹里，当然这个方法安装的字体只对当前用户有效；如果需要在全部用户里共享字体，则依然需要安装在 /usr/share/fonts 目录里。</p>
<p>原创文章，如转载请注明：转载自细节之锤 [ <a href="http://blog.WaterLin.org/">http://blog.WaterLin.org/</a> ]</p>
<p>Copyright © WaterLin.org. All rights reserved.</p>
</p></div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/install-new-fonts-under-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux 下的 SVN 图形客户端 RapidSVN</title>
		<link>http://blog.waterlin.org/articles/using-rapidsvn-under-linux.html</link>
		<comments>http://blog.waterlin.org/articles/using-rapidsvn-under-linux.html#comments</comments>
		<pubDate>Sun, 29 Nov 2009 14:43:05 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[软件]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/using-rapidsvn-under-linux.html</guid>
		<description><![CDATA[Windows 下有 TortoiseSVN 这么可人的 SVN 客户端，Linux 虽然没有这样能带勾子的 SVN 客户端，但是用 RapidSVN 作为 Linux 下的客户端倒也是一个不错的选择。 原创文章，如转载请注明：转载自细节之锤 [ http://blog.WaterLin.org/ ] Copyright © WaterLin.org. All rights reserved.]]></description>
			<content:encoded><![CDATA[<p>Windows 下有 <a href="http://blog.waterlin.org/articles/create-local-svn-server.html">TortoiseSVN</a> 这么可人的 SVN 客户端，Linux 虽然没有这样能带勾子的 SVN 客户端，但是用 <a href="http://rapidsvn.tigris.org/">RapidSVN</a> 作为 Linux 下的客户端倒也是一个不错的选择。</p>
<p>原创文章，如转载请注明：转载自细节之锤 [ <a href="http://blog.WaterLin.org/">http://blog.WaterLin.org/</a> ]</p>
<p>Copyright © WaterLin.org. All rights reserved.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/using-rapidsvn-under-linux.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Code Blocks 的个性化配置</title>
		<link>http://blog.waterlin.org/articles/setting-codeblocks.html</link>
		<comments>http://blog.waterlin.org/articles/setting-codeblocks.html#comments</comments>
		<pubDate>Sun, 29 Nov 2009 14:40:38 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[软件]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/setting-codeblocks.html</guid>
		<description><![CDATA[试了好几个 Linux 下的 IDE 开发工具，依然觉得 Code::Blocks 最好用，但是默认配置下，Code::Blocks 的编辑器依然是白底黑字，不仅对眼睛很不利，还一点都不 Linux 化。 我们可以通过菜单 Settings -&#62; Editor 来对编辑器的字体、颜色等进行手动配置。当然，更好的方法是导入别人已经配置好的配置文件，比如这个 Oblivion 的主题就蛮不错的，可以下载下来，通过命令行运行命令 $ cb_share_config ，就可以通过弹出的对话框，导入这个设置到 Code::Blocks 默认的配置文件 ~/.codeblocks/default.conf 里。 如果需要保存自己的设置，也只需要在命令终端运行 cbshareconfig 命令，然后在左边的 &#8220;Source configuration file&#8221; 里把 ~/.codeblocks/default.conf （即你自己的配置文件，如果你修改了默认配置，则可能不是这个配置文件了）选进去，选中你需要保存的模块，然后点击 Export 就可以保存、备份自己的设置。 有兴趣的朋友可以试试我自己的 Code::Blocks 编辑器设置。 原创文章，如转载请注明：转载自细节之锤 [ http://blog.WaterLin.org/ ] Copyright © WaterLin.org. All rights reserved.]]></description>
			<content:encoded><![CDATA[<p>试了好几个 Linux 下的 IDE 开发工具，依然觉得 <a href="http://www.codeblocks.org/">Code::Blocks</a> 最好用，但是默认配置下，Code::Blocks 的编辑器依然是白底黑字，不仅对眼睛很不利，还一点都不 Linux 化。</p>
<p>我们可以通过菜单 Settings -&gt; Editor 来对编辑器的字体、颜色等进行手动配置。当然，更好的方法是导入别人已经配置好的配置文件，比如这个 <a href="http://lkraider.eipper.com.br/blog/2008/11/codeblocks-oblivion.html">Oblivion</a> 的主题就蛮不错的，可以下载下来，通过命令行运行命令</p>
<pre>
$ cb_share_config
</pre>
<p>，就可以通过弹出的对话框，导入这个设置到 Code::Blocks 默认的配置文件 ~/.codeblocks/default.conf 里。</p>
<p>如果需要保存自己的设置，也只需要在命令终端运行 cb<sub>share</sub><sub>config</sub> 命令，然后在左边的 &#8220;Source configuration file&#8221; 里把 ~/.codeblocks/default.conf （即你自己的配置文件，如果你修改了默认配置，则可能不是这个配置文件了）选进去，选中你需要保存的模块，然后点击 Export 就可以保存、备份自己的设置。</p>
<p>有兴趣的朋友可以试试<a href="http://www.waterlin.org/wiki/Attachments/config_files/water_codeblocks.conf">我自己的 Code::Blocks 编辑器设置</a>。</p>
<p>原创文章，如转载请注明：转载自细节之锤 [ <a href="http://blog.WaterLin.org/">http://blog.WaterLin.org/</a> ]</p>
<p>Copyright © WaterLin.org. All rights reserved.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/setting-codeblocks.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux 下的词典：GoldenDict</title>
		<link>http://blog.waterlin.org/articles/goldendict-introduction.html</link>
		<comments>http://blog.waterlin.org/articles/goldendict-introduction.html#comments</comments>
		<pubDate>Sun, 29 Nov 2009 14:38:28 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[软件]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/goldendict-introduction.html</guid>
		<description><![CDATA[在 Linux 下，推荐使用 GoldenDict 作为词典工具，可以使用 stardict，babylon 的词典，当然，要注意版权问题。 在 Ubuntu/Debian 里可以直接从源里安装，然后 ~/.goldendict/config 里是有关 GoldenDict 的配置。 要安装 GoldenDict 支持的辞典文件，请点击这里查找，然后点击 Edit -&#62; Dictionaries，切换到 Files 区域，输入你下载的辞典文件的路径，点击 Rescan now，GoldenDict 处理之后你就可以使用该辞典文件来查询单词了。 如果是 stardict 的词典，解压完了把整个文件夹扔到你的 Dictionaries 里即可。 原创文章，如转载请注明：转载自细节之锤 [ http://blog.WaterLin.org/ ] Copyright © WaterLin.org. All rights reserved.]]></description>
			<content:encoded><![CDATA[<p>在 Linux 下，推荐使用 <a href="http://goldendict.berlios.de/">GoldenDict</a> 作为词典工具，可以使用 stardict，babylon 的词典，当然，要注意版权问题。</p>
<p>在 Ubuntu/Debian 里可以直接从源里安装，然后 ~/.goldendict/config 里是有关 GoldenDict 的配置。</p>
<p>要安装 GoldenDict 支持的辞典文件，请点击<a href="http://goldendict.berlios.de/dictionaries.php">这里</a>查找，然后点击 Edit -&gt; Dictionaries，切换到 Files 区域，输入你下载的辞典文件的路径，点击 Rescan now，GoldenDict 处理之后你就可以使用该辞典文件来查询单词了。</p>
<p>如果是 stardict 的词典，解压完了把整个文件夹扔到你的 Dictionaries 里即可。</p>
<p>原创文章，如转载请注明：转载自细节之锤 [ <a href="http://blog.WaterLin.org/">http://blog.WaterLin.org/</a> ]</p>
<p>Copyright © WaterLin.org. All rights reserved.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/goldendict-introduction.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>教育网里的Debian/Ubuntu升级源</title>
		<link>http://blog.waterlin.org/articles/debian-ubuntu-sources-in-jiao-yu-wang.html</link>
		<comments>http://blog.waterlin.org/articles/debian-ubuntu-sources-in-jiao-yu-wang.html#comments</comments>
		<pubDate>Tue, 25 Aug 2009 04:31:14 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/debian-ubuntu-sources-in-jiao-yu-wang.html</guid>
		<description><![CDATA[Ubuntu的升级方法和Debian完全一样，只是多了一个更漂亮的GUI供你选择。但是，对于教育网的用户来说，不能直接访问国外的Ubuntu或是Debian源，哪怕是用代理或是教育网直通车之类的玩意，也是很慢的。不过没关系，国内很多大学都提供了Debian的源镜像，我们可以自己添加教育网里的镜像源。 在终端执行以下命令（第一条是备份现有服务器列表，第二条是使用Vim编辑） sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup sudo vim /etc/apt/sources.list 从下面各服务器列表内容中选择一个镜像源，添加到文件里去： 教育网常用sources.list（以下只适用于sid即unstable用户，其它版本用户请酌情更改） 中科大 deb ftp://debian.ustc.edu.cn/debian unstable main non-free contrib deb-src ftp://debian.ustc.edu.cn/debian unstable main non-free contrib 大连理工 deb ftp://mirror.dlut.edu.cn/debian unstable main non-free contrib deb-src ftp://mirror.dlut.edu.cn/debian unstable main non-free contrib 清华大学 deb ftp://ftp.tsinghua.edu.cn/mirror/debian/debian unstable main non-free contrib deb-src ftp://ftp.tsinghua.edu.cn/mirror/debian/debian unstable main non-free contrib 保存编辑好的文件，执行以下命令就可以进行更新： sudo apt-get update sudo [...]]]></description>
			<content:encoded><![CDATA[<p>Ubuntu的升级方法和Debian完全一样，只是多了一个更漂亮的GUI供你选择。但是，对于教育网的用户来说，不能直接访问国外的Ubuntu或是Debian源，哪怕是用代理或是教育网直通车之类的玩意，也是很慢的。不过没关系，国内很多大学都提供了Debian的源镜像，我们可以自己添加教育网里的镜像源。</p>
<p>在终端执行以下命令（第一条是备份现有服务器列表，第二条是使用Vim编辑）</p>
<blockquote><p>sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup <br />sudo vim /etc/apt/sources.list </p>
</blockquote>
<p>从下面各服务器列表内容中选择一个镜像源，添加到文件里去：</p>
<blockquote><p>教育网常用sources.list（以下只适用于sid即unstable用户，其它版本用户请酌情更改） <br />中科大 <br />deb <a href="ftp://debian.ustc.edu.cn/debian">ftp://debian.ustc.edu.cn/debian</a> unstable main non-free contrib <br />deb-src <a href="ftp://debian.ustc.edu.cn/debian">ftp://debian.ustc.edu.cn/debian</a> unstable main non-free contrib <br />大连理工 <br />deb <a href="ftp://mirror.dlut.edu.cn/debian">ftp://mirror.dlut.edu.cn/debian</a> unstable main non-free contrib <br />deb-src <a href="ftp://mirror.dlut.edu.cn/debian">ftp://mirror.dlut.edu.cn/debian</a> unstable main non-free contrib <br />清华大学 <br />deb <a href="ftp://ftp.tsinghua.edu.cn/mirror/debian/debian">ftp://ftp.tsinghua.edu.cn/mirror/debian/debian</a> unstable main non-free contrib <br />deb-src <a href="ftp://ftp.tsinghua.edu.cn/mirror/debian/debian">ftp://ftp.tsinghua.edu.cn/mirror/debian/debian</a> unstable main non-free contrib</p>
</blockquote>
<p>保存编辑好的文件，执行以下命令就可以进行更新：</p>
<blockquote><p>sudo apt-get update <br />sudo apt-get dist-upgrade</p>
</blockquote>
<p>用了这几个源之后，在教育网里，可以很方便地用<strong>sudo apt-get install</strong>安装你需要的包与软件，速度很快。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/debian-ubuntu-sources-in-jiao-yu-wang.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>让VirtualBox里的Ubuntu更加美好的三个简单设置</title>
		<link>http://blog.waterlin.org/articles/configure-virtualbox-to-perfect-ubuntu.html</link>
		<comments>http://blog.waterlin.org/articles/configure-virtualbox-to-perfect-ubuntu.html#comments</comments>
		<pubDate>Tue, 25 Aug 2009 04:27:57 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/configure-virtualbox-to-perfect-ubuntu.html</guid>
		<description><![CDATA[因为工作需要，在VirtualBox 3.0.4里装了Ubuntu 9.04（懒得动硬盘了，现在的机器跑虚拟机性能也还不错）。不过，安装好以后，如果不做一些适当的配置，用起来实在是不舒服。 1) 分辨率问题的解决方法 默认的配置下，Ubuntu作为客户机(guest)的分辨率最大只能调到800×600，屏幕在VirtualBox下的大小不可调，看得十分不舒服。 解决的办法很简单，即安装VirtualBox增强工具包： 设备（VirtualBox客户机运行窗口菜单栏上） &#8211;&#62; 安装增强功能（点击后桌面上会多一个虚拟光驱的图标），然后点击运行，根据提示进行安装即可。 2) 修改热键 默认VirtualBox与Windows进行切换的热键为右Ctrl键，这样的默认设置，对于我们用Emacs的人来说，相当于自残，这可怎么干活呢？我们可以把热键重新设置一下，在VirutalBox的主界面里，通过&#8221;管理 &#8211;&#62; 全局设定 &#8211;&#62; 热键&#8220;里进行设置。 3) 与Windows共享文件 既然使用了虚拟机，我们就经常需要在两个系统之间交换文件、数据等。当Windws为宿主机器、Ubuntu为Guest机器时，我们可以通过共享文件的方式来方便地实现Windows与Ubuntu的数据交换。 在虚拟机器的控制面板里，&#8221;设备 &#8211;&#62; 分配数据空间&#8221;，分配一个&#8221;固定分配&#8221;的数据空间（记住你起的名字），这个数据空间就是我们的共享文件夹。 然后我们就可以到Ubuntu里面创建一个映射点，即一个全新的文件夹： # sudo mkdir /media/windows-share windows-share可以用你喜欢的任何名称来代替。 然后，我们就可以mount Windows里的共享文件夹到之前创建的文件夹里： # sudo mount -t vboxsf folder-name /media/windows-share 这个folder-name需要用你之前创建的共享文件夹名称来代替。 通过上面的三个简单配置，用起VirtualBox里的Ubuntu就舒服多了。 另外，顺便说一下，VirtualBox现在的&#8221;无缝链接&#8221;模式太棒了！]]></description>
			<content:encoded><![CDATA[<p>因为工作需要，在VirtualBox 3.0.4里装了Ubuntu 9.04（懒得动硬盘了，现在的机器跑虚拟机性能也还不错）。不过，安装好以后，如果不做一些适当的配置，用起来实在是不舒服。</p>
<p>1) 分辨率问题的解决方法</p>
<p>默认的配置下，Ubuntu作为客户机(guest)的分辨率最大只能调到800×600，屏幕在VirtualBox下的大小不可调，看得十分不舒服。</p>
<p>解决的办法很简单，即安装VirtualBox增强工具包：</p>
<blockquote><p>设备（VirtualBox客户机运行窗口菜单栏上） &#8211;&gt; 安装增强功能（点击后桌面上会多一个虚拟光驱的图标），然后点击运行，根据提示进行安装即可。</p>
</blockquote>
<p>2) 修改热键</p>
<p>默认VirtualBox与Windows进行切换的热键为右Ctrl键，这样的默认设置，对于我们用Emacs的人来说，相当于自残，这可怎么干活呢？我们可以把热键重新设置一下，在VirutalBox的主界面里，通过&#8221;<strong>管理 &#8211;&gt; 全局设定 &#8211;&gt; 热键</strong>&#8220;里进行设置。</p>
<p>3) 与Windows共享文件</p>
<p>既然使用了虚拟机，我们就经常需要在两个系统之间交换文件、数据等。当Windws为宿主机器、Ubuntu为Guest机器时，我们可以通过共享文件的方式来方便地实现Windows与Ubuntu的数据交换。</p>
<p>在虚拟机器的控制面板里，&#8221;设备 &#8211;&gt; 分配数据空间&#8221;，分配一个&#8221;固定分配&#8221;的数据空间（记住你起的名字），这个数据空间就是我们的共享文件夹。</p>
<p>然后我们就可以到Ubuntu里面创建一个映射点，即一个全新的文件夹：</p>
<blockquote><p># sudo mkdir /media/windows-share</p>
</blockquote>
<p>windows-share可以用你喜欢的任何名称来代替。</p>
<p>然后，我们就可以mount Windows里的共享文件夹到之前创建的文件夹里：</p>
<blockquote><p># sudo mount -t vboxsf folder-name /media/windows-share</p>
</blockquote>
<p>这个folder-name需要用你之前创建的共享文件夹名称来代替。</p>
<p>通过上面的三个简单配置，用起VirtualBox里的Ubuntu就舒服多了。</p>
<p>另外，顺便说一下，VirtualBox现在的&#8221;无缝链接&#8221;模式太棒了！</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/configure-virtualbox-to-perfect-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

