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

<channel>
	<title>Random Thoughts</title>
	<atom:link href="http://samuelcheng.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://samuelcheng.wordpress.com</link>
	<description>A place to organize my random thoughts</description>
	<lastBuildDate>Sat, 31 Oct 2009 22:19:12 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='samuelcheng.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/589f4be1391325329033ec59267654e0?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Random Thoughts</title>
		<link>http://samuelcheng.wordpress.com</link>
	</image>
			<item>
		<title>Remote Desktop with FreeNX</title>
		<link>http://samuelcheng.wordpress.com/2009/10/31/remote-desktop-with-freenx/</link>
		<comments>http://samuelcheng.wordpress.com/2009/10/31/remote-desktop-with-freenx/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 22:10:42 +0000</pubDate>
		<dc:creator>phsamuel</dc:creator>
				<category><![CDATA[About computer]]></category>
		<category><![CDATA[freenx]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[remote desktop]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://samuelcheng.wordpress.com/?p=115</guid>
		<description><![CDATA[ssh is great. But sometimes I just need a desktop. The remote desktop functionality offered by Ubuntu is kind of limited. For example, I just don&#8217;t know how I can enable remote desktop easily in the first place if one is not in front of the host already. Moreover, Ubuntu&#8217;s remote desktop is limited to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=115&subd=samuelcheng&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>ssh is great. But sometimes I just need a desktop. The remote desktop functionality offered by Ubuntu is kind of limited. For example, I just don&#8217;t know how I can enable remote desktop easily in the first place if one is not in front of the host already. Moreover, Ubuntu&#8217;s remote desktop is limited to LAN. I would love to do something similar to the Linux version of <a href="http://www.teamviewer.com/index.aspx">teamviewer</a>.</p>
<p>It turns out that free remote desktop over the Internet is already out there for Linux/Ubuntu users! Better still, it is a piece of cake to <a href="https://help.ubuntu.com/community/FreeNX">install</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samuelcheng.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samuelcheng.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samuelcheng.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samuelcheng.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samuelcheng.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samuelcheng.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samuelcheng.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samuelcheng.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samuelcheng.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samuelcheng.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=115&subd=samuelcheng&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samuelcheng.wordpress.com/2009/10/31/remote-desktop-with-freenx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6ac082e3425225fad2e201d787bb6b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phsamuel</media:title>
		</media:content>
	</item>
		<item>
		<title>Almost kill my Ubuntu</title>
		<link>http://samuelcheng.wordpress.com/2009/10/11/almost-kill-my-ubuntu/</link>
		<comments>http://samuelcheng.wordpress.com/2009/10/11/almost-kill-my-ubuntu/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 23:15:47 +0000</pubDate>
		<dc:creator>phsamuel</dc:creator>
				<category><![CDATA[About computer]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[nameserver]]></category>
		<category><![CDATA[software sources]]></category>
		<category><![CDATA[synaptic]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://samuelcheng.wordpress.com/?p=102</guid>
		<description><![CDATA[I did an extremely stupid thing today.
It all started when I tried to fix some conflicting issue of OpenCV and ffmpeg. I installed and reinstalled many times. I tried this on my desktop and eventually tried it also on my laptop.
For some reasons, I could not install some required package (libxcb1-dev). It showed that there [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=102&subd=samuelcheng&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I did an extremely stupid thing today.</p>
<p>It all started when I tried to fix some conflicting issue of OpenCV and ffmpeg. I installed and reinstalled many times. I tried this on my desktop and eventually tried it also on my laptop.</p>
<p>For some reasons, I could not install some required package (libxcb1-dev). It showed that there is a broken package. The only available version is 1.1.93-0ubuntu3 and it requires libxcb1 of the same version. But the installed version of the latter is 1.1.93-0ubuntu3.1. I was tired and just wanted to have some quick fix. Why just uninstalled libxcb1 and reinstalled it with the version ubuntu is happy with? Okay, surely the library is used by a long laundry list. But I was tired, what the hack? Mark, apply&#8230;</p>
<p>Of course, I wasn&#8217;t paying attention. It is a core library used by Gnome. So my whole desktop was gone. I was really panicking now. Good grief. Getting more troubles trying to solve a few, what an idiot I am&#8230;</p>
<p>I am lucky that after I rebooted my laptop, at least apt-get was still &#8220;working&#8221;. But network seemed to be down. Oh great, how can I get the network up again? I don&#8217;t want to reinstall the entire OS just because of this stupid mistake. Not to mention that I have to first backup everything. Fortunately, the network did not really die. Only the configuration for DNS was gone somehow. I setup the DNS server by adding the nameserver address (yours will be different) back to /etc/resolv.conf as described by some post on the web.</p>
<pre>sudo echo "nameserver 192.168.2.1" &gt; /etc/resolv.conf</pre>
<p>After network is up, I slowly reinstalled all packages and gnome&#8230; Now, for my original problem, it turns out that my Software Sources-&gt;Updates was set to <em>jaunty-security</em> only. For some reason, I have installed<em> libxcb1</em> of the version from <em>jaunty-updates</em>. Maybe after I installed Jaunty, I deselected <em>jaunty-updates</em> for some reasons but I don&#8217;t really remember how it ended up like this already. This probably a newbie problem but I think Ubuntu should warn us noobs when we try to deselect the default update source. No one will imagine such harmless act will &#8220;break&#8221; synaptic&#8230; Anyway, I learned my lesson today and will try to be less reckless with Ubuntu in the future.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samuelcheng.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samuelcheng.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samuelcheng.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samuelcheng.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samuelcheng.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samuelcheng.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samuelcheng.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samuelcheng.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samuelcheng.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samuelcheng.wordpress.com/102/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=102&subd=samuelcheng&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samuelcheng.wordpress.com/2009/10/11/almost-kill-my-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6ac082e3425225fad2e201d787bb6b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phsamuel</media:title>
		</media:content>
	</item>
		<item>
		<title>Obama&#8217;s Tariff</title>
		<link>http://samuelcheng.wordpress.com/2009/10/04/obamas-tariff/</link>
		<comments>http://samuelcheng.wordpress.com/2009/10/04/obamas-tariff/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 06:27:46 +0000</pubDate>
		<dc:creator>phsamuel</dc:creator>
				<category><![CDATA[Economy]]></category>

		<guid isPermaLink="false">http://samuelcheng.wordpress.com/?p=87</guid>
		<description><![CDATA[I am terribly disappointed with Obama&#8217;s tariff. Especially I believe that he is an intelligent person. He definitely should understand the reaction from Beijing and is well aware of the impact of Smoot-Hawley Tariff Act to the Great Depression. He is basically risking all these for the political capital needed for his health reform. While [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=87&subd=samuelcheng&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I am terribly disappointed with Obama&#8217;s tariff. Especially I believe that he is an intelligent person. He definitely should understand the reaction from Beijing and is well aware of the impact of Smoot-Hawley Tariff Act to the Great Depression. He is basically risking all these for the political capital needed for his health reform. While I agree the necessity of the latter, imposing the tariff is extremely unwise.</p>
<p>Just go read any economic textbook, tariff is bad to economy. Period. The logic is actually very simple. There is something known as the comparative advantage. It is just like one doesn&#8217;t want to mow his/her lawn but hires someone else to do it since one can pursue more meaningful stuffs with his/her limited time. So instead of making tires, the US could have invested money on high tech, green, and creative industry. Now, the money is artificially subsidizing a dying industry (tariff is a form of subsidizing since consumers are paying more on tires instead of putting money on other products). Moreover, because of the subsidy, the industry will not receive the essential incentive to improve itself and become more efficient. So when the subsidy is taken away, the industry simply dies. It is like computer industry in South America in the 90&#8217;s.</p>
<p>One argument in justifying the tariff is that the Chineses  are artificially pushing down their currency and thus it is not a fair trade. It is basically nonsense and ignorant. Especially, most of these people do not realize that Yuan actually has risen from 1 USD to 8 Yuan to 1 USD to 6.8 this couple years. For some weird reasons, people now seem to think that the cheaper the currency the better. Actually, continuing decline of a currency usually do more bad than good. It does of course encourage export as everyone points out. But it reduces internal consumption and internal/foreign investment and thus slows down the overall economy. It is even more silly to think that the Chineses pushes down the currency so that they can pay the workers less. After all, the average wage of the workers is determined by their productivity (unless you are running a <em>real</em> communist country!). The total wages cannot be higher than the revenue earned from the final product. The average wage in china is low mostly because the productivity is low. Instead of artificially subsidizing the union wage through tariff, the US should try to increase the productivity of the workers here. Or we will end up another GM mess in a couple years.</p>
<p>Again, I support Obama in trying to change the health system but the tariff is really a horrible political move. I thought he were much better than this but I was very disappointed with him now. I don&#8217;t understand why we can&#8217;t have a President who was sensible in both domestic, international, and economic policies. It seems like that if we don&#8217;t want to hurt the environment and fight some stupid wars, then we need to accept some elementary school level economic policy. God bless America&#8230;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samuelcheng.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samuelcheng.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samuelcheng.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samuelcheng.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samuelcheng.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samuelcheng.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samuelcheng.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samuelcheng.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samuelcheng.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samuelcheng.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=87&subd=samuelcheng&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samuelcheng.wordpress.com/2009/10/04/obamas-tariff/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6ac082e3425225fad2e201d787bb6b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phsamuel</media:title>
		</media:content>
	</item>
		<item>
		<title>Embedding all fonts in Ubuntu</title>
		<link>http://samuelcheng.wordpress.com/2009/10/03/embedding-all-fonts-in-ubuntu/</link>
		<comments>http://samuelcheng.wordpress.com/2009/10/03/embedding-all-fonts-in-ubuntu/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 22:19:30 +0000</pubDate>
		<dc:creator>phsamuel</dc:creator>
				<category><![CDATA[About computer]]></category>

		<guid isPermaLink="false">http://samuelcheng.wordpress.com/?p=82</guid>
		<description><![CDATA[It took me a while to finally manage to embed all fonts for pdf using Linux commands alone. Most conferences and journals require all fonts to be embedded for manuscript preparation. By default, pdflatex in Ubuntu suppose to embed all fonts. One can also change the setting using updmap. But the problem comes from the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=82&subd=samuelcheng&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It took me a while to finally manage to embed all fonts for pdf using Linux commands alone. Most conferences and journals require all fonts to be embedded for manuscript preparation. By default, pdflatex in Ubuntu suppose to embed all fonts. One can also change the setting using <a href="http://do.whileloop.org/soft/tricks/pdflatex-fonts.php">updmap</a>. But the problem comes from the eps figures. I tried <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=411651">epstopdf</a> and <a href="http://man.he.net/man1/a2ping">a2ping</a> but both of them somehow don&#8217;t work for my figures. I finally get success with ps2pdf14 as follows</p>
<pre>ps2pdf14 -dPDFSETTINGS=/prepress fig.eps</pre>
<p>However, the figure generated was not cropped correctly. Luckily, we can run</p>
<pre>pdfcrop fig.pdf</pre>
<p>The final figure file (fig-crop.pdf) should have all fonts embedded. One can check it with</p>
<pre>pdffonts fig-crop.pdf</pre>
<p>In my case, I got</p>
<pre>name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
KBSFAN+Helvetica                     Type 1C           yes yes no       8  0</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samuelcheng.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samuelcheng.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samuelcheng.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samuelcheng.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samuelcheng.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samuelcheng.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samuelcheng.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samuelcheng.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samuelcheng.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samuelcheng.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=82&subd=samuelcheng&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samuelcheng.wordpress.com/2009/10/03/embedding-all-fonts-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6ac082e3425225fad2e201d787bb6b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phsamuel</media:title>
		</media:content>
	</item>
		<item>
		<title>Video Chat with Ubuntu</title>
		<link>http://samuelcheng.wordpress.com/2009/07/25/video-chat-with-ubuntu/</link>
		<comments>http://samuelcheng.wordpress.com/2009/07/25/video-chat-with-ubuntu/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 03:20:23 +0000</pubDate>
		<dc:creator>phsamuel</dc:creator>
				<category><![CDATA[About computer]]></category>
		<category><![CDATA[meebo]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[tokbox]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[video chat]]></category>

		<guid isPermaLink="false">http://samuelcheng.wordpress.com/?p=76</guid>
		<description><![CDATA[It was a total pain to try to have skype and ubuntu jaunty work happily together.  My miscellaneous problems with mic just can never be resolved. The medibuntu package simply doesn&#8217;t work for me. I even go as far to uninstall pulseaudio. Unfortunately, even that doesn&#8217;t make my skype work. Mic worked for the first [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=76&subd=samuelcheng&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It was a total pain to try to have skype and ubuntu jaunty work happily together.  My miscellaneous problems with mic just can never be resolved. The <a href="http://www.medibuntu.org/">medibuntu</a> package simply doesn&#8217;t work for me. I even go as far to <a href="http://idyllictux.wordpress.com/2009/04/21/ubuntu-904-jaunty-keeping-the-beast-pulseaudio-at-bay/">uninstall</a> pulseaudio. Unfortunately, even that doesn&#8217;t make my skype work. Mic worked for the first self-test and then failed in the second one.</p>
<p>After all these struggles, it seems that <a href="http://www.meebo.com/">meebo</a> is the real solution.  It uses <a href="http://www.tokbox.com/">tokbox</a> to provide video chat function. The only glitch I encountered was &#8220;devices disabled&#8221; that my camera and mic couldn&#8217;t be activated. It turns out the fix is simple.  Simply goto the <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager06.html">macromedia site</a> and set mee.tokbox.com to &#8220;always allow&#8221;.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samuelcheng.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samuelcheng.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samuelcheng.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samuelcheng.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samuelcheng.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samuelcheng.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samuelcheng.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samuelcheng.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samuelcheng.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samuelcheng.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=76&subd=samuelcheng&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samuelcheng.wordpress.com/2009/07/25/video-chat-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6ac082e3425225fad2e201d787bb6b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phsamuel</media:title>
		</media:content>
	</item>
		<item>
		<title>Install Kile 2.0 in Ubuntu 9.04</title>
		<link>http://samuelcheng.wordpress.com/2009/06/28/install-kile-2-0-in-ubuntu-9-04/</link>
		<comments>http://samuelcheng.wordpress.com/2009/06/28/install-kile-2-0-in-ubuntu-9-04/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 00:11:45 +0000</pubDate>
		<dc:creator>phsamuel</dc:creator>
				<category><![CDATA[About computer]]></category>
		<category><![CDATA[kile]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://samuelcheng.wordpress.com/?p=68</guid>
		<description><![CDATA[Like many others, I am very frustrated with the new Kile and Ubuntu Janty has chosen it as default. It is ridiculously slow and the text doesn&#8217;t do dynamic word wrap (YES, it doesn&#8217;t!). There is a tool to &#8220;auto-wrap&#8221; but it screws up comments if you use % often as I do. After several [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=68&subd=samuelcheng&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Like many others, I am very frustrated with the new Kile and Ubuntu Janty has chosen it as default. It is ridiculously slow and the text doesn&#8217;t do dynamic word wrap (YES, it doesn&#8217;t!). There is a tool to &#8220;auto-wrap&#8221; but it screws up comments if you use % often as I do. After several months of frustration, I finally uninstalled it and reinstalled the old one. I am not a Linux expert and it is actually much easier than I thought.  I probably would have done it couple months ago if I know it is that easy. Simply remove Kile from Synaptic and then download and run the correct version of debian package from <a href="http://linuxappfinder.com/package/kile">this site.</a></p>
<p>btw, if you forgot to uninstall Kile 2.1 before reinstall 2.0, you may end up having some weird problems. One possible culprit is simply the configuration file is corrupted. A simplest solution is to copy a clean copy from some one else. The configuration file of Kile is  ~/.kde/share/config/kilerc</p>
<p>Another note, after reinstalling 2.0, it is better to search kile in synaptic and apply <span style="text-decoration:line-through;">force version</span> Lock Version from Package-&gt;Lock Version <span style="text-decoration:line-through;">Force Version&#8230;</span> Otherwise, it will switch back to 2.1 after the next update.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samuelcheng.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samuelcheng.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samuelcheng.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samuelcheng.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samuelcheng.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samuelcheng.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samuelcheng.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samuelcheng.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samuelcheng.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samuelcheng.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=68&subd=samuelcheng&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samuelcheng.wordpress.com/2009/06/28/install-kile-2-0-in-ubuntu-9-04/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6ac082e3425225fad2e201d787bb6b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phsamuel</media:title>
		</media:content>
	</item>
		<item>
		<title></title>
		<link>http://samuelcheng.wordpress.com/2009/05/20/65/</link>
		<comments>http://samuelcheng.wordpress.com/2009/05/20/65/#comments</comments>
		<pubDate>Wed, 20 May 2009 18:34:40 +0000</pubDate>
		<dc:creator>phsamuel</dc:creator>
				<category><![CDATA[About computer]]></category>

		<guid isPermaLink="false">http://samuelcheng.wordpress.com/?p=65</guid>
		<description><![CDATA[Just found a cool link to install windows journal into win xp&#8230;
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=65&subd=samuelcheng&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just found a cool <a href="http://www.winmatrix.com/forums/index.php?showtopic=19894">link</a> to install windows journal into win xp&#8230;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samuelcheng.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samuelcheng.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samuelcheng.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samuelcheng.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samuelcheng.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samuelcheng.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samuelcheng.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samuelcheng.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samuelcheng.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samuelcheng.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=65&subd=samuelcheng&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samuelcheng.wordpress.com/2009/05/20/65/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6ac082e3425225fad2e201d787bb6b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phsamuel</media:title>
		</media:content>
	</item>
		<item>
		<title>tvtk conflict with compiz</title>
		<link>http://samuelcheng.wordpress.com/2009/03/06/tvtk-conflict-with-compiz/</link>
		<comments>http://samuelcheng.wordpress.com/2009/03/06/tvtk-conflict-with-compiz/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 23:57:07 +0000</pubDate>
		<dc:creator>phsamuel</dc:creator>
				<category><![CDATA[About computer]]></category>

		<guid isPermaLink="false">http://samuelcheng.wordpress.com/?p=58</guid>
		<description><![CDATA[I tried the following simple tvtk example but it kept hang my ubuntu 8.10 machine.
#!/usr/bin/env python

from enthought.tvtk.api import tvtk
cs=tvtk.ConeSource(resolution=100)
mapper=tvtk.PolyDataMapper(input=cs.output)
actor=tvtk.Actor(mapper=mapper)
#create a renderer:
renderer=tvtk.Renderer()
# create a render window and hand it the renderer
render_window = tvtk.RenderWindow(size=(400,400))
render_window.add_renderer(renderer)

#dreate interactor and hand it the render window
# this handles mouse interaction with window
interactor=tvtk.RenderWindowInteractor(render_window=render_window)
renderer.add_actor(actor)
interactor.initialize()
interactor.start()
It turns out that compiz is the trouble maker.  The script [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=58&subd=samuelcheng&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I tried the following simple tvtk example but it kept hang my ubuntu 8.10 machine.</p>
<pre>#!/usr/bin/env python

from enthought.tvtk.api import tvtk
cs=tvtk.ConeSource(resolution=100)
mapper=tvtk.PolyDataMapper(input=cs.output)
actor=tvtk.Actor(mapper=mapper)
#create a renderer:
renderer=tvtk.Renderer()
# create a render window and hand it the renderer
render_window = tvtk.RenderWindow(size=(400,400))
render_window.add_renderer(renderer)

#dreate interactor and hand it the render window
# this handles mouse interaction with window
interactor=tvtk.RenderWindowInteractor(render_window=render_window)
renderer.add_actor(actor)
interactor.initialize()
interactor.start()</pre>
<p>It turns out that compiz is the trouble maker.  The script will work if I switch back to metacity. This can be done by pressing ALT-F2 and then typing</p>
<pre> metacity --replace</pre>
<p>Just a side note, the code should be run in ipython with option -wthread.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samuelcheng.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samuelcheng.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samuelcheng.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samuelcheng.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samuelcheng.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samuelcheng.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samuelcheng.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samuelcheng.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samuelcheng.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samuelcheng.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=58&subd=samuelcheng&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samuelcheng.wordpress.com/2009/03/06/tvtk-conflict-with-compiz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6ac082e3425225fad2e201d787bb6b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phsamuel</media:title>
		</media:content>
	</item>
		<item>
		<title>ffmpeg and OpenCV</title>
		<link>http://samuelcheng.wordpress.com/2009/03/04/ffmpeg-and-opencv/</link>
		<comments>http://samuelcheng.wordpress.com/2009/03/04/ffmpeg-and-opencv/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 17:33:08 +0000</pubDate>
		<dc:creator>phsamuel</dc:creator>
				<category><![CDATA[About computer]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[opencv]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://samuelcheng.wordpress.com/?p=55</guid>
		<description><![CDATA[As of Oct 11, 2009, I reinstalled OpenCV and ffmpeg again on Ubuntu Jaunty. The previous installation procedure doesn&#8217;t seem to work. I can install OpenCV but it doesn&#8217;t cooperate happily with ffmpeg.
I came across this wonderful guide and it more or less solves all my problems. Below repeats some of the steps described in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=55&subd=samuelcheng&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As of Oct 11, 2009, I reinstalled OpenCV and ffmpeg again on Ubuntu Jaunty. The previous installation procedure doesn&#8217;t seem to work. I can install OpenCV but it doesn&#8217;t cooperate happily with ffmpeg.</p>
<p>I came across this <a href="http://blog.taesoo.org/?p=210">wonderful guide</a> and it more or less solves all my problems. Below repeats some of the steps described in the guide.</p>
<p>First, we need some packages for building,</p>
<pre>sudo apt-get build-dep python-opencv
sudo apt-get install libswscale-dev swig</pre>
<p>There is a problem with OpenCV. The structure of ffmpeg has changed but OpenCV isn&#8217;t catching up. We have to set soft links for several include files as follows.</p>
<pre>sudo mkdir /usr/include/ffmpeg
cd /usr/include/ffmpeg
sudo ln -s ../libavcodec/avcodec.h avcodec.h
sudo ln -s ../libavformat/avformat.h avformat.h
sudo ln -s ../libavformat/avio.h avio.h
sudo ln -s ../libavutil/avutil.h avutil.h
sudo ln -s ../libswscale/swscale.h swscale.h
</pre>
<p>Now, check out latest OpenCV snapshot.</p>
<pre>cd
svn co https://opencvlibrary.svn.sourceforge.net/svnroot/opencvlibrary/tags/latest_tested_snapshot
</pre>
<p>Here, I diverge from the <a href="http://blog.taesoo.org/?p=210">guide</a> and go through cmake as suggested in the <a href="http://opencv.willowgarage.com/wiki/InstallGuide_Linux">OpenCV website</a> instead.</p>
<pre>cd ~/latest_tested_snapshot/opencv  # the directory should contain CMakeLists.txt, INSTALL etc.
mkdir release # create the output directory
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON ..
make</pre>
<p>Here, I diverge from both guides. Instead of running <em>sudo make install</em>, it is safer to run <em>checkinstall</em>. If <em>checkinstall</em> is not installed, install it from synaptic and then run</p>
<pre>sudo checkinstall
</pre>
<p>For Python 2.6, it moves cv.so incorrectly to /usr/local/lib/python2.6/site-packages/. We will need to move cv.so back to /usr/local/lib/python2.6/dist-packages/</p>
<p><span style="text-decoration:line-through;">It spent me a day to get ffmpeg and OpenCV working together. There are quite a lot of guides on the web but some of them are probably outdated.</span></p>
<p><span style="text-decoration:line-through;">I have Ubuntu 8.10 installed and these two installation guides for <a href="http://ubuntuforums.org/showthread.php?t=786095">ffmpeg</a> and <a href="http://opencv.willowgarage.com/wiki/InstallGuide_Linux">OpenCV</a> work for me after a few tweaks.</span></p>
<p><span style="text-decoration:line-through;">1. For ffmpeg, one has to add &#8211;enable-shared as a config option. That is,</span></p>
<pre><span style="text-decoration:line-through;">./configure --enable-shared --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid</span></pre>
<p><span style="text-decoration:line-through;">2. I first got error message for using ffmpeg after installation.</span></p>
<pre><span style="text-decoration:line-through;">ffmpeg: symbol lookup error: /usr/local/lib/libavcodec.so.52: undefined symbol: av_gcd</span></pre>
<p><span style="text-decoration:line-through;">But adding</span></p>
<pre><span style="text-decoration:line-through;">export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH</span></pre>
<p><span style="text-decoration:line-through;">to .bashrc will do the trick.</span></p>
<p><span style="text-decoration:line-through;">3. Before installing OpenCV, I have to run</span></p>
<pre><span style="text-decoration:line-through;">sudo apt-get install libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg62-dev libtiff4-dev</span></pre>
<p><span style="text-decoration:line-through;">to avoid compilation error.</span></p>
<p><span style="text-decoration:line-through;">N.B. For 64 bit Ubuntu, an additional flag <em>&#8211;enable-pic</em> is needed to configure x264.</span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samuelcheng.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samuelcheng.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samuelcheng.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samuelcheng.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samuelcheng.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samuelcheng.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samuelcheng.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samuelcheng.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samuelcheng.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samuelcheng.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=55&subd=samuelcheng&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samuelcheng.wordpress.com/2009/03/04/ffmpeg-and-opencv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6ac082e3425225fad2e201d787bb6b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phsamuel</media:title>
		</media:content>
	</item>
		<item>
		<title>Embed all fonts</title>
		<link>http://samuelcheng.wordpress.com/2009/02/13/embed-all-fonts/</link>
		<comments>http://samuelcheng.wordpress.com/2009/02/13/embed-all-fonts/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 23:45:55 +0000</pubDate>
		<dc:creator>phsamuel</dc:creator>
				<category><![CDATA[About computer]]></category>
		<category><![CDATA[embedded fonts]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://samuelcheng.wordpress.com/?p=51</guid>
		<description><![CDATA[IEEE always requires authors to embed all fonts for the final pdf submission. After some googling, the commands that works for me under Ubuntu are
dvips -Pdownload35 -t letter -G0 -o paper.ps paper.dvi
ps2pdf -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true  paper.ps paper.pdf
If you have eps figures that are generated from matlab, most likely some fonts in the figures are [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=51&subd=samuelcheng&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>IEEE always requires authors to embed all fonts for the final pdf submission. After some googling, the commands that works for me under Ubuntu are</p>
<pre>dvips -Pdownload35 -t letter -G0 -o paper.ps paper.dvi</pre>
<pre>ps2pdf -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true  paper.ps paper.pdf</pre>
<p>If you have eps figures that are generated from matlab, most likely some fonts in the figures are still not embedded. You can run the following <a href="http://www.cs.dartmouth.edu/~kimo/blog/computer/matlab_figures.html">command</a> if so</p>
<pre>ps2pdf13 -dPDFSETTINGS=/prepress paper.pdf paper_final.pdf</pre>
<p>If you need Acrobat version 5 or above. Try</p>
<pre>ps2pdf14 -dPDFSETTINGS=/prepress paper.pdf paper_final.pdf</pre>
<p>instead.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/samuelcheng.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/samuelcheng.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/samuelcheng.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/samuelcheng.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/samuelcheng.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/samuelcheng.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/samuelcheng.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/samuelcheng.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/samuelcheng.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/samuelcheng.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=samuelcheng.wordpress.com&blog=2199663&post=51&subd=samuelcheng&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://samuelcheng.wordpress.com/2009/02/13/embed-all-fonts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e6ac082e3425225fad2e201d787bb6b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phsamuel</media:title>
		</media:content>
	</item>
	</channel>
</rss>