<?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>Pebbles in the Sand</title>
	<atom:link href="http://pebblesinthesand.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://pebblesinthesand.wordpress.com</link>
	<description>Tales from the information era - tips related to Linux / computer science</description>
	<lastBuildDate>Wed, 22 Apr 2009 16:37:44 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='pebblesinthesand.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/723d9f8afa1366c528968c828b4bd9f8?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Pebbles in the Sand</title>
		<link>http://pebblesinthesand.wordpress.com</link>
	</image>
			<item>
		<title>Linking shared libraries: overcoming runtime errors</title>
		<link>http://pebblesinthesand.wordpress.com/2009/04/22/linking-shared-libraries-overcoming-runtime-errors/</link>
		<comments>http://pebblesinthesand.wordpress.com/2009/04/22/linking-shared-libraries-overcoming-runtime-errors/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 16:37:44 +0000</pubDate>
		<dc:creator>kawakamasu</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[dynamic linker]]></category>
		<category><![CDATA[linking library]]></category>
		<category><![CDATA[shared library]]></category>

		<guid isPermaLink="false">http://pebblesinthesand.wordpress.com/?p=28</guid>
		<description><![CDATA[Say you&#8217;re developing a program in C++ and you need to use some exotic library called libAAA.
You have been able to download the sources and build the package ( by adding -I/path/to/the/library/include to the compilation options, for example) and linking it ( by adding something like -L/path/to/the/library/lib -lAAA to the linker options, for example).
But running [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=28&subd=pebblesinthesand&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Say you&#8217;re developing a program in C++ and you need to use some exotic library called libAAA.<br />
You have been able to download the sources and build the package ( by adding <code>-I/path/to/the/library/include</code> to the compilation options, for example) and linking it ( by adding something like <code>-L/path/to/the/library/lib -lAAA</code> to the linker options, for example).</p>
<p>But running the program raises an error:<code><br />
&gt;&gt;./program_a<br />
./program_a: error while loading shared libraries: libAAA.so: cannot open shared object file: No such file or directory<br />
</code></p>
<p>This is due to the fact that although you have informed the compiler and the linker about the location of your libAAA files, the system cannot find them at runtime. In fact, the <code>program_a</code> would call a dynamic linker that searches for shared libraries in the system. It, however, searches only in default locations where libraries are commonly installed (such as <code>/usr/lib).</p>
<p>You can check the dynamic libraries by invoking <code>ldd</code> command on the executable:<code><br />
&gt;&gt;ldd program_a<br />
        linux-gate.so.1 =&gt;  (0xb7f48000)<br />
        liblapack.so.3gf =&gt; /usr/lib/liblapack.so.3gf (0xb7836000)<br />
        libAAA.so =&gt; not found<br />
        libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0xb76c4000)<br />
        /lib/ld-linux.so.2 (0xb7f49000)<br />
</code><br />
Here it is clearly seen that the linker cannot find the library. A remedy is to add the custom library path to the <code>LD_LIBRARY_PATH</code> environment variable (this example is for bash shell):<code><br />
&gt;&gt;export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/the/library/lib<br />
</code><br />
 Now the library can be located at runtime:<code><br />
&gt;&gt;ldd program_a<br />
        linux-gate.so.1 =&gt;  (0xb7f48000)<br />
        liblapack.so.3gf =&gt; /usr/lib/liblapack.so.3gf (0xb7836000)<br />
        libAAA.so =&gt; /path/to/the/library/lib/libAAA.so (0xb77da000)<br />
        libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0xb76c4000)<br />
        /lib/ld-linux.so.2 (0xb7f49000)<br />
</code> </p>
<p>Another option is to do a manual system-wide install by copying the library to <code>/usr/lib</code>, for example, or modifying the dynamic linker look-up path (in file <code>/etc/ld.so.conf</code>). Naturally such problems should not appear if the library is well-built so that <code>make install</code> will do a system-wide installation automatically.</p>
<p>More information can be found in <a href="http://www.ibm.com/developerworks/linux/library/l-shlibs.html">here</a> for instance.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pebblesinthesand.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pebblesinthesand.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pebblesinthesand.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pebblesinthesand.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pebblesinthesand.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pebblesinthesand.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pebblesinthesand.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pebblesinthesand.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pebblesinthesand.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pebblesinthesand.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=28&subd=pebblesinthesand&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pebblesinthesand.wordpress.com/2009/04/22/linking-shared-libraries-overcoming-runtime-errors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9c8c3acf9ef3a7418df075b217d30d3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kawakamasu</media:title>
		</media:content>
	</item>
		<item>
		<title>Duplex printing for HP Color printers in Ubuntu</title>
		<link>http://pebblesinthesand.wordpress.com/2009/04/16/duplex-printing-for-hp-color-printers-in-ubuntu/</link>
		<comments>http://pebblesinthesand.wordpress.com/2009/04/16/duplex-printing-for-hp-color-printers-in-ubuntu/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 10:38:09 +0000</pubDate>
		<dc:creator>kawakamasu</dc:creator>
				<category><![CDATA[Kubuntu]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Duplex printing]]></category>
		<category><![CDATA[HP Laserjet]]></category>
		<category><![CDATA[Printer setup]]></category>

		<guid isPermaLink="false">http://pebblesinthesand.wordpress.com/?p=18</guid>
		<description><![CDATA[In office we have this fast HP Color LaserJet CP3505 printer, that should be able to print on both sides. I installed the driver using some GUI (system-config-printer I think) and everything worked like a charm, except the duplex printing. Trying to enable duplex printing in kprinter, for example, resulted an error &#8220;Some options selected [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=18&subd=pebblesinthesand&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In office we have this fast HP Color LaserJet CP3505 printer, that should be able to print on both sides. I installed the driver using some GUI (<code>system-config-printer</code> I think) and everything worked like a charm, except the duplex printing. Trying to enable duplex printing in <code>kprinter</code>, for example, resulted an error &#8220;Some options selected are in conflict&#8221; as the Duplex Unit was not installed.</p>
<p>The printer setup can be changed (as instructed in this <a href="http://ubuntuforums.org/s&lt;/a&gt;howthread.php?t=189388">thread</a>) in the CUPS HTML interface, accessible via any browser:</p>
<p><code>http://localhost:631</code></p>
<p>1) Choose <em>Manage Printers</em> and <em>Set Printer Options</em> of the printer at hand.</p>
<p>2) In <em>Options Installed</em> change radio button to <em>Duplex Unit</em> : <em>Installed</em>.</p>
<p>3) Click <em>Set Printer Options</em>.<br />
You may be asked for a user name and password. Type in your local login user name and password. Sometimes, as in my case, you may need to input <code>root</code> and the superuser password.</p>
<p>Presumably the same configuration can be done in the GUIs as well, for example:<br />
<code>sudo system-config-printer</code> and tick <em>Duplex Unit</em> in <em>Installable Options</em> tab. (In KDE use <code>kdesu</code> instead of <code>sudo</code>.)</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pebblesinthesand.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pebblesinthesand.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pebblesinthesand.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pebblesinthesand.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pebblesinthesand.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pebblesinthesand.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pebblesinthesand.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pebblesinthesand.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pebblesinthesand.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pebblesinthesand.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=18&subd=pebblesinthesand&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pebblesinthesand.wordpress.com/2009/04/16/duplex-printing-for-hp-color-printers-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9c8c3acf9ef3a7418df075b217d30d3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kawakamasu</media:title>
		</media:content>
	</item>
		<item>
		<title>Floppy drive access in Ubuntu Hardy Heron</title>
		<link>http://pebblesinthesand.wordpress.com/2008/09/24/floppy-drive-access-in-ubuntu-hardy-heron/</link>
		<comments>http://pebblesinthesand.wordpress.com/2008/09/24/floppy-drive-access-in-ubuntu-hardy-heron/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 12:32:48 +0000</pubDate>
		<dc:creator>kawakamasu</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[floppy drive]]></category>
		<category><![CDATA[mounting]]></category>

		<guid isPermaLink="false">http://pebblesinthesand.wordpress.com/?p=16</guid>
		<description><![CDATA[For those who still need to use floppies, it seems that floppy drives are not fully supported in Ubuntu anymore as there is no out-of-the-box solution that would work.
However, you can always mount the floppy manually:
1) Make sure that the floppy drive is properly connected to motherboard and that (internal) floppy access is enabled in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=16&subd=pebblesinthesand&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>For those who still need to use floppies, it seems that floppy drives are not fully supported in Ubuntu anymore as there is no out-of-the-box solution that would work.</p>
<p>However, you can always mount the floppy manually:<br />
1) Make sure that the floppy drive is properly connected to motherboard and that (internal) floppy access is enabled in system BIOS.<br />
2) Start Ubuntu and create directory <code>/media/floppy</code> or something similar.<br />
3) Mount the floppy by <code>sudo mount /dev/fd0 -t auto /media/floppy</code>.</p>
<p>You should be able to access the floppy either trough terminal or GUI programs.<br />
Make sure to unmount manually when you&#8217;re done to prevent data loss: <code>sudo umount /media/floppy</code>.</p>
<p>Note that the GUI access *does not* work so do not try to access the floppy via Nautilus or Konqueror or such before mounting manually (step 2).</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pebblesinthesand.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pebblesinthesand.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pebblesinthesand.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pebblesinthesand.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pebblesinthesand.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pebblesinthesand.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pebblesinthesand.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pebblesinthesand.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pebblesinthesand.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pebblesinthesand.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=16&subd=pebblesinthesand&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pebblesinthesand.wordpress.com/2008/09/24/floppy-drive-access-in-ubuntu-hardy-heron/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9c8c3acf9ef3a7418df075b217d30d3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kawakamasu</media:title>
		</media:content>
	</item>
		<item>
		<title>Recovering files from ext3 filesystem with foremost</title>
		<link>http://pebblesinthesand.wordpress.com/2008/08/15/recovering-files-from-ext3-filesystem-with-foremost/</link>
		<comments>http://pebblesinthesand.wordpress.com/2008/08/15/recovering-files-from-ext3-filesystem-with-foremost/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 13:59:10 +0000</pubDate>
		<dc:creator>kawakamasu</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[ext3]]></category>
		<category><![CDATA[file recovery]]></category>
		<category><![CDATA[foremost]]></category>
		<category><![CDATA[undelete]]></category>

		<guid isPermaLink="false">http://pebblesinthesand.wordpress.com/?p=12</guid>
		<description><![CDATA[So you accidentally removed some files on Linux ext3 partition and you want them back.
Here&#8217;s a procedure that worked for me:
1) Get foremost recovery tool. In Ubuntu it is in the universe repositories.
2) Unmount the partition where the files were. If it&#8217;s the root partition (say, /dev/sda1) , you cannot unmount it. In this case [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=12&subd=pebblesinthesand&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So you accidentally removed some files on Linux ext3 partition and you want them back.<br />
Here&#8217;s a procedure that worked for me:</p>
<p>1) Get <a href="http://foremost.sourceforge.net/">foremost</a> recovery tool. In Ubuntu it is in the universe repositories.<br />
2) Unmount the partition where the files were. If it&#8217;s the root partition (say, <code>/dev/sda1</code>) , you cannot unmount it. In this case use Ubuntu Live CD or such to reboot into a system that does not mount the <code>/dev/sda1</code>.<br />
3) Run (note that you must run with <code>sudo</code>):<br />
<code>sudo foremost -i /dev/sda3</code>.</p>
<p>foremost will create a directory called <code>output</code> where all the recovered files are stored, separated in subdirectories according to filetype. If you need to recover only certain files, use the <code>-t</code> option:<br />
<code>sudo foremost -t jpeg,gif -i /dev/sda3</code><br />
would only recover <code>jpeg</code> and <code>gif</code> files.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pebblesinthesand.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pebblesinthesand.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pebblesinthesand.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pebblesinthesand.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pebblesinthesand.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pebblesinthesand.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pebblesinthesand.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pebblesinthesand.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pebblesinthesand.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pebblesinthesand.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pebblesinthesand.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pebblesinthesand.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=12&subd=pebblesinthesand&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pebblesinthesand.wordpress.com/2008/08/15/recovering-files-from-ext3-filesystem-with-foremost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9c8c3acf9ef3a7418df075b217d30d3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kawakamasu</media:title>
		</media:content>
	</item>
		<item>
		<title>kdm cannot see logins provided by NIS (Hardy Heron)</title>
		<link>http://pebblesinthesand.wordpress.com/2008/07/04/kdm-cannot-see-logins-provided-by-nis-hardy-heron/</link>
		<comments>http://pebblesinthesand.wordpress.com/2008/07/04/kdm-cannot-see-logins-provided-by-nis-hardy-heron/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 11:15:36 +0000</pubDate>
		<dc:creator>kawakamasu</dc:creator>
				<category><![CDATA[Kubuntu]]></category>
		<category><![CDATA[kdm]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[nis]]></category>
		<category><![CDATA[yellow page server]]></category>

		<guid isPermaLink="false">http://pebblesinthesand.wordpress.com/?p=11</guid>
		<description><![CDATA[At boot-up, KDE login manager (kdm) shows only local logins, but none of those that are provided by a remote Network Information Service (NIS, it&#8217;s yellow page server, in fact). One needs to manually restart kdm:
sudo /etc/init.d/kdm restart,
which gets frustrating in the long run. It seems that for some reason, kdm is loaded before the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=11&subd=pebblesinthesand&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>At boot-up, KDE login manager (kdm) shows only local logins, but none of those that are provided by a remote Network Information Service (NIS, it&#8217;s yellow page server, in fact). One needs to manually restart <code>kdm</code>:</p>
<p><code>sudo /etc/init.d/kdm restart</code>,</p>
<p>which gets frustrating in the long run. It seems that for some reason, <code>kdm</code> is loaded before the NIS services and thus it cannot see the remote logins. To fix this, move <code>kdm</code> later in the startup process:</p>
<p><code><br />
cd /etc/rc2.d<br />
sudo mv S13kdm S30kdm<br />
</code></p>
<p>This workaround worked for me. Postponing the <code>kdm</code> startup seems to have no side effects. </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pebblesinthesand.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pebblesinthesand.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pebblesinthesand.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pebblesinthesand.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pebblesinthesand.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pebblesinthesand.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pebblesinthesand.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pebblesinthesand.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pebblesinthesand.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pebblesinthesand.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pebblesinthesand.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pebblesinthesand.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=11&subd=pebblesinthesand&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pebblesinthesand.wordpress.com/2008/07/04/kdm-cannot-see-logins-provided-by-nis-hardy-heron/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9c8c3acf9ef3a7418df075b217d30d3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kawakamasu</media:title>
		</media:content>
	</item>
		<item>
		<title>Japanese input method in KDE 3.5 (Hardy Heron)</title>
		<link>http://pebblesinthesand.wordpress.com/2008/05/28/japanese-input-method-in-kde-35-hardy-heron/</link>
		<comments>http://pebblesinthesand.wordpress.com/2008/05/28/japanese-input-method-in-kde-35-hardy-heron/#comments</comments>
		<pubDate>Tue, 27 May 2008 23:32:35 +0000</pubDate>
		<dc:creator>kawakamasu</dc:creator>
				<category><![CDATA[Kubuntu]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[input method]]></category>
		<category><![CDATA[Japanese]]></category>
		<category><![CDATA[scim]]></category>
		<category><![CDATA[scim-bridge]]></category>
		<category><![CDATA[Terminal]]></category>

		<guid isPermaLink="false">http://pebblesinthesand.wordpress.com/?p=9</guid>
		<description><![CDATA[The easiest (and recommended) way to enable Japanese input in KDE is through System Settings -&#62; Regional &#38; Accessibility -&#62; Country/Region &#38; Language. Installing support for Japanese also installs the scim-anthy input method. If you need to use Japanese in terminal, the easiest way is to set Japanese as system language (but that indeed changes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=9&subd=pebblesinthesand&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The easiest (and recommended) way to enable Japanese input in KDE is through System Settings -&gt; Regional &amp; Accessibility -&gt; Country/Region &amp; Language. Installing support for Japanese also installs the <code>scim-anthy</code> input method. If you need to use Japanese in terminal, the easiest way is to set Japanese as system language (but that indeed changes the default language, e.g. most man pages and system commands like apt-get will be in Japanese).</p>
<p>However, this will not enable Japanese input in non-KDE programs like Firefox. For this you need to install <code>scim-bridge-client-gtk</code> and <code>im-switch</code>. Then run</p>
<p><code>im-switch -s scim-bridge</code></p>
<p>to set <code>scim-bridge</code> as default input method for all applications. </p>
<p><code>scim-bridge</code> is a new socket based input method module that fixes the many annoying problems that were present with <code>scim</code>, like various crashes in Firefox and Thunderbird and whitespace mapping bugs in KDE. The only thing that doesn&#8217;t work is Japanese input in Skype, which is a pity. Apparently this is fixed in KDE 4.0.</p>
<p>All in all this is very painless procedure compared to what it used to be in Dapper or Edgy.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pebblesinthesand.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pebblesinthesand.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pebblesinthesand.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pebblesinthesand.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pebblesinthesand.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pebblesinthesand.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pebblesinthesand.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pebblesinthesand.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pebblesinthesand.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pebblesinthesand.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pebblesinthesand.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pebblesinthesand.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=9&subd=pebblesinthesand&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pebblesinthesand.wordpress.com/2008/05/28/japanese-input-method-in-kde-35-hardy-heron/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9c8c3acf9ef3a7418df075b217d30d3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kawakamasu</media:title>
		</media:content>
	</item>
		<item>
		<title>A srcipt for running processes in parallel in Bash</title>
		<link>http://pebblesinthesand.wordpress.com/2008/05/22/a-srcipt-for-running-processes-in-parallel-in-bash/</link>
		<comments>http://pebblesinthesand.wordpress.com/2008/05/22/a-srcipt-for-running-processes-in-parallel-in-bash/#comments</comments>
		<pubDate>Thu, 22 May 2008 17:40:12 +0000</pubDate>
		<dc:creator>kawakamasu</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[parallel computing]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[concurrent processing]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://pebblesinthesand.wordpress.com/?p=8</guid>
		<description><![CDATA[In Bash you can start new processes (theads) on the background simply by running a command with ampersand &#38;. The wait command can be used to wait until all background processes have finished (to wait for a certain process do wait PID where PID is a process ID). So here&#8217;s a simple pseudocode for parallel [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=8&subd=pebblesinthesand&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">In Bash you can start new processes (theads) on the background simply by running a command with ampersand &amp;. The <code>wait</code> command can be used to wait until all background processes have finished (to wait for a certain process do <code>wait PID</code> where <code>PID</code> is a process ID). So here&#8217;s a simple pseudocode for parallel processing:</p>
<pre class="brush: ruby;">
for ARG in  $*; do
    command $ARG &amp;
    NPROC=$(($NPROC+1))
    if [ &quot;$NPROC&quot; -ge 4 ]; then
        wait
        NPROC=0
    fi
done
</pre>
<p style="text-align:justify;">I.e. you run 4 processes at a time and wait until all of them have finished before executing the next four. This is a sufficient solution if all of the processes take equally long to finish. However this is suboptimal if running time of the processes vary a lot.</p>
<p style="text-align:justify;">A better solution is to track the process IDs and poll if all of them are still running. In Bash <code>$!</code> returns the ID of last initiated background process. If a process is running, the corresponding PID is found in directory <code>/proc/</code>.</p>
<p style="text-align:justify;">Based on the ideas given in a Ubuntu forum  <a href="http://ubuntuforums.org/showthread.php?t=31339">thread</a> and a <a href="http://unmaintainable.wordpress.com/2007/08/05/cmdline-options-in-shell-scripts/">template</a> on command line parsing, I wrote a simple script &#8220;<code>parallel</code>&#8221; that allows you to run virtually any simple command concurrently.</p>
<p style="text-align:justify;">Assume that you have a program <code>proc</code> and you want to run something  like <code>proc *.jpg</code> using three concurrent processes. Then simply do<br />
<code><br />
parallel -j 3 proc *.jpg<br />
</code><br />
The script takes care of dividing the task. Obviously <code>-j 3</code> stands for three simultaneous jobs.<br />
If you need command line options, use quotes to separate the command from the variable arguments, e.g.<br />
<code><br />
parallel -j 3 "proc -r -A=40" *.jpg<br />
</code><br />
Furthermore, <code>-r</code> allows even more sophisticated commands by replacing asterisks in the command string by the argument:<br />
<code><br />
parallel -j 6 -r "convert -scale 50%  * small/small_*" *.jpg<br />
</code><br />
I.e. this executes <code>convert -scale 50%  file1.jpg small/small_file1.jpg</code> for all the jpg files. This is a real-life example for scaling down images by 50% (requires imagemagick).</p>
<p style="text-align:justify;">Finally, here&#8217;s the script. It can be easily manipulated to handle different jobs, too. Just write your command between <code>#DEFINE COMMAND</code> and <code>#DEFINE COMMAND END</code>.</p>
<pre class="brush: ruby;">
#!/bin/bash
NUM=0
QUEUE=&quot;&quot;
MAX_NPROC=2 # default
REPLACE_CMD=0 # no replacement by default
USAGE=&quot;A simple wrapper for running processes in parallel.
Usage: `basename $0` [-h] [-r] [-j nb_jobs] command arg_list
 	-h		Shows this help
	-r		Replace asterix * in the command string with argument
	-j nb_jobs 	Set number of simultanious jobs [2]
 Examples:
 	`basename $0` somecommand arg1 arg2 arg3
 	`basename $0` -j 3 \&quot;somecommand -r -p\&quot; arg1 arg2 arg3
 	`basename $0` -j 6 -r \&quot;convert -scale 50% * small/small_*\&quot; *.jpg&quot;

function queue {
	QUEUE=&quot;$QUEUE $1&quot;
	NUM=$(($NUM+1))
}

function regeneratequeue {
	OLDREQUEUE=$QUEUE
	QUEUE=&quot;&quot;
	NUM=0
	for PID in $OLDREQUEUE
	do
		if [ -d /proc/$PID  ] ; then
			QUEUE=&quot;$QUEUE $PID&quot;
			NUM=$(($NUM+1))
		fi
	done
}

function checkqueue {
	OLDCHQUEUE=$QUEUE
	for PID in $OLDCHQUEUE
	do
		if [ ! -d /proc/$PID ] ; then
			regeneratequeue # at least one PID has finished
			break
		fi
	done
}

# parse command line
if [ $# -eq 0 ]; then #  must be at least one arg
	echo &quot;$USAGE&quot; &gt;&amp;2
	exit 1
fi

while getopts j:rh OPT; do # &quot;j:&quot; waits for an argument &quot;h&quot; doesnt
    case $OPT in
	h)	echo &quot;$USAGE&quot;
		exit 0 ;;
	j)	MAX_NPROC=$OPTARG ;;
	r)	REPLACE_CMD=1 ;;
	\?)	# getopts issues an error message
		echo &quot;$USAGE&quot; &gt;&amp;2
		exit 1 ;;
    esac
done

# Main program
echo Using $MAX_NPROC parallel threads
shift `expr $OPTIND - 1` # shift input args, ignore processed args
COMMAND=$1
shift

for INS in $* # for the rest of the arguments
do
	# DEFINE COMMAND
	if [ $REPLACE_CMD -eq 1 ]; then
		CMD=${COMMAND//&quot;*&quot;/$INS}
	else
		CMD=&quot;$COMMAND $INS&quot; #append args
	fi
	echo &quot;Running $CMD&quot; 

	$CMD &amp;
	# DEFINE COMMAND END

	PID=$!
	queue $PID

	while [ $NUM -ge $MAX_NPROC ]; do
		checkqueue
		sleep 0.4
	done
done
wait # wait for all processes to finish before exit
</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pebblesinthesand.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pebblesinthesand.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pebblesinthesand.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pebblesinthesand.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pebblesinthesand.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pebblesinthesand.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pebblesinthesand.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pebblesinthesand.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pebblesinthesand.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pebblesinthesand.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pebblesinthesand.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pebblesinthesand.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=8&subd=pebblesinthesand&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pebblesinthesand.wordpress.com/2008/05/22/a-srcipt-for-running-processes-in-parallel-in-bash/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9c8c3acf9ef3a7418df075b217d30d3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kawakamasu</media:title>
		</media:content>
	</item>
		<item>
		<title>Print directory tree disk usage on the command line</title>
		<link>http://pebblesinthesand.wordpress.com/2008/05/20/print-directory-tree-disk-usage-on-the-command-line/</link>
		<comments>http://pebblesinthesand.wordpress.com/2008/05/20/print-directory-tree-disk-usage-on-the-command-line/#comments</comments>
		<pubDate>Tue, 20 May 2008 11:27:50 +0000</pubDate>
		<dc:creator>kawakamasu</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[directory tree]]></category>
		<category><![CDATA[disk usage]]></category>

		<guid isPermaLink="false">http://pebblesinthesand.wordpress.com/?p=7</guid>
		<description><![CDATA[Suppose you have a large tree of directories containing lots of data (such as source code of a big project or numerical output of your simulations) and you need to estimate the total size of the whole tree. In graphical user interface this can be done by examining the directory properties. But as usual things [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=7&subd=pebblesinthesand&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Suppose you have a large tree of directories containing lots of data (such as source code of a big project or numerical output of your simulations) and you need to estimate the total size of the whole tree. In graphical user interface this can be done by examining the directory properties. But as usual things can be done faster on the command line, where the suitable command is <code>du</code> (for Disk Usage).</p>
<p>An example (assuming that the root of your directory tree is called <code>data</code>)</p>
<p><code>du -h --max-depth=1 data<br />
1.1G    data/soln<br />
3.0M    data/binary<br />
1.1G    data<br />
</code></p>
<p>The <code>-h</code> option tells <code>du</code> to use human readable format, i.e. MB, GB etc instead of bytes. Option <code>--max-depth=1</code> means that only the first subdirectories are listed. For more info on the options run <code>man du</code>.
<ul>
<p>It is convenient to create an alias for shortening the long command such as<br />
<code>alias disku='du -h --max-depth=1'</code><br />
For the alias to be present in all future sessions, add the line to your shell initialization file (for bash shell <code>~/.bashrc</code> for example).</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pebblesinthesand.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pebblesinthesand.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pebblesinthesand.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pebblesinthesand.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pebblesinthesand.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pebblesinthesand.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pebblesinthesand.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pebblesinthesand.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pebblesinthesand.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pebblesinthesand.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pebblesinthesand.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pebblesinthesand.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=7&subd=pebblesinthesand&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pebblesinthesand.wordpress.com/2008/05/20/print-directory-tree-disk-usage-on-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9c8c3acf9ef3a7418df075b217d30d3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kawakamasu</media:title>
		</media:content>
	</item>
		<item>
		<title>Keep processes running even if you close terminal / log out</title>
		<link>http://pebblesinthesand.wordpress.com/2008/05/17/keep-processes-running-even-if-you-close-terminal-log-out/</link>
		<comments>http://pebblesinthesand.wordpress.com/2008/05/17/keep-processes-running-even-if-you-close-terminal-log-out/#comments</comments>
		<pubDate>Sat, 17 May 2008 19:26:19 +0000</pubDate>
		<dc:creator>kawakamasu</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[Terminal]]></category>

		<guid isPermaLink="false">http://pebblesinthesand.wordpress.com/?p=6</guid>
		<description><![CDATA[You left the office in a hurry on Friday and forgot to run one process. Of course you can ssh to your desktop from home and put it running. But the problem is that the process takes several hours (or days) to complete. Do you need to keep you terminal and ssh connection open for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=6&subd=pebblesinthesand&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>You left the office in a hurry on Friday and forgot to run one process. Of course you can <code>ssh</code> to your desktop from home and put it running. But the problem is that the process takes several hours (or days) to complete. Do you need to keep you terminal and <code>ssh</code> connection open for all that time??</p>
<p>The answer is no. There are several ways of detaching a process from any display and thus killing the connection will not kill the process. The easiest method that I have encountered is <a href="http://www.gnu.org/software/screen/"> <code>screen</a>. It is usually in the linux repositories, so for example in Ubuntu you can download it though <code>apt</code>. Note that you need to install it on the machine where want to run the executable.</p>
<p>Here's how it works.<br />
1) Log in to the remote machine.<br />
2) Run <code>screen</code> in command line. A new "virtual" shell will open (after you have pressed space or enter). The new shell is the one that will be detached.<br />
3) Run your process.<br />
4) Detach the display by pressing <code>ctrl+a</code> and <code>ctrl+d</code> in sequence. The original shell (where you typed <code>screen</code>) is displayed. You can now freely log out without affecting the detached process.<br />
5) To resume to the virtual shell, log in again and run <code>screen -r</code> on the remote machine.<br />
The detached shell is displayed again just as you left it. As if you had never logged out at all!<br />
6) When you're finally done kill the virtual shell by running <code>exit</code> as usual.</p>
<p>It is also possible to use command <code>nohup</code> for this task, but it's not as advanced as <code>screen</code> and it stores all output to logfiles.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pebblesinthesand.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pebblesinthesand.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pebblesinthesand.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pebblesinthesand.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pebblesinthesand.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pebblesinthesand.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pebblesinthesand.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pebblesinthesand.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pebblesinthesand.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pebblesinthesand.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pebblesinthesand.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pebblesinthesand.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=6&subd=pebblesinthesand&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pebblesinthesand.wordpress.com/2008/05/17/keep-processes-running-even-if-you-close-terminal-log-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9c8c3acf9ef3a7418df075b217d30d3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kawakamasu</media:title>
		</media:content>
	</item>
		<item>
		<title>Using kompare to view Subversion differences</title>
		<link>http://pebblesinthesand.wordpress.com/2008/05/16/using-kompare-to-view-subversion-differences/</link>
		<comments>http://pebblesinthesand.wordpress.com/2008/05/16/using-kompare-to-view-subversion-differences/#comments</comments>
		<pubDate>Fri, 16 May 2008 16:00:15 +0000</pubDate>
		<dc:creator>kawakamasu</dc:creator>
				<category><![CDATA[Kubuntu]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[difference]]></category>
		<category><![CDATA[Kompare]]></category>
		<category><![CDATA[revision]]></category>

		<guid isPermaLink="false">http://pebblesinthesand.wordpress.com/?p=5</guid>
		<description><![CDATA[When you&#8217;re using Subversion (svn) repositories for code development, it is sometimes useful to check differences between code revisions (i.e. when things went wrong for the first time). If you are using KDE, Kompare is a graphical difference viewer that can be easily used for this task. Simply run

svn diff -r 1020:1047 &#124; kompare -o [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=5&subd=pebblesinthesand&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When you&#8217;re using Subversion (<code>svn</code>) repositories for code development, it is sometimes useful to check differences between code revisions (i.e. when things went wrong for the first time). If you are using KDE, <a href="http://www.caffeinated.me.uk/kompare/">Kompare</a> is a graphical difference viewer that can be easily used for this task. Simply run<br />
<code><br />
svn diff -r 1020:1047 | kompare -o -<br />
</code><br />
in a directory that belongs to the svn tree. Kompare window will open showing comparison of all the changed files in that directory tree. The numbers refer to revision numbers, i.e. in this case revisions 1020 and 1047 are being compared. The revision switch <code>-r</code> accepts other formulations, too:<br />
<code><br />
'{' DATE '}' revision at start of the date<br />
'HEAD'        latest in repository<br />
'BASE'       base rev of item's working copy<br />
'COMMITTED'  last commit at or before BASE<br />
'PREV'       revision just before COMMITTED<br />
</code></p>
<p>For more information on the <code>svn</code> difference command run <code>svn -h diff</code>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pebblesinthesand.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pebblesinthesand.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pebblesinthesand.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pebblesinthesand.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pebblesinthesand.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pebblesinthesand.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pebblesinthesand.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pebblesinthesand.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pebblesinthesand.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pebblesinthesand.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pebblesinthesand.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pebblesinthesand.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pebblesinthesand.wordpress.com&blog=3734144&post=5&subd=pebblesinthesand&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pebblesinthesand.wordpress.com/2008/05/16/using-kompare-to-view-subversion-differences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9c8c3acf9ef3a7418df075b217d30d3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kawakamasu</media:title>
		</media:content>
	</item>
	</channel>
</rss>