<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>sandipb.net</title>
	
	<link>http://blog.sandipb.net</link>
	<description>&gt; yours truly.</description>
	<lastBuildDate>Thu, 14 Jan 2010 11:49:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/SandipBhattacharya" /><feedburner:info uri="sandipbhattacharya" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><image><link>http://www.sandipb.net/blog/</link><url>http://www.sandipb.net/blog-images/sandip_face.jpg</url><title>sandipb.net - Sandip Bhattacharya</title></image><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site.</feedburner:browserFriendly><item>
		<title>Quick tip: Merging photos from two different cameras</title>
		<link>http://feedproxy.google.com/~r/SandipBhattacharya/~3/iW1D71jDlyQ/</link>
		<comments>http://blog.sandipb.net/2010/01/14/quick-tip-merging-photos-from-two-different-cameras/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 11:48:38 +0000</pubDate>
		<dc:creator>Sandip Bhattacharya</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[photos]]></category>

		<guid isPermaLink="false">http://blog.sandipb.net/?p=367</guid>
		<description><![CDATA[This time when we went to Pondicherry on the year end, we took two cameras &#8211; I took my Rebel XTi and my wife the LX3. While uploading our photos  to Flickr, we had a problem. We wanted to merge our photo sets, but because of the different photo naming conventions of the two [...]]]></description>
			<content:encoded><![CDATA[<p>This time when we went to <a href="http://en.wikipedia.org/wiki/Puducherry">Pondicherry</a> on the year end, we took two cameras &#8211; I took my Rebel XTi and my wife the LX3. While uploading our photos  to Flickr, we had a problem. We wanted to merge our photo sets, but because of the different photo naming conventions of the two cameras, the photos won&#8217;t be sorted according to time taken. The solution, as I found out after a bit of digging and trying out different exif tools, was simple enough. Install <a href="http://www.sentex.net/~mwandel/jhead/">jhead</a> and run:</p>
<p><code>jhead -n%Y%m%d-%H%M%S -ft *.JPG</code></p>
<p>This would rename all the photos dumped in the current directory using the YYYYMMDD-HHMMSS format. And even if some app you have doesn&#8217;t sort by the file name, this command would change the modification time of all the photos to the time the photo was taken.</p>
<p>And yes, it is a good idea of using this time format and not the default MMDD-HHSS format, else trips on the year end (like ours, this time) would get messed up while sorting.</p>
<img src="http://feeds.feedburner.com/~r/SandipBhattacharya/~4/iW1D71jDlyQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.sandipb.net/2010/01/14/quick-tip-merging-photos-from-two-different-cameras/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.sandipb.net/2010/01/14/quick-tip-merging-photos-from-two-different-cameras/</feedburner:origLink></item>
		<item>
		<title>Adding new CA certificates in Ubuntu (Jaunty)</title>
		<link>http://feedproxy.google.com/~r/SandipBhattacharya/~3/Kwhcv71xCwk/</link>
		<comments>http://blog.sandipb.net/2009/08/08/adding-new-ca-certificates-in-ubuntu-jaunty/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 21:33:31 +0000</pubDate>
		<dc:creator>Sandip Bhattacharya</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[fetchmail]]></category>
		<category><![CDATA[jaunty]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.sandipb.net/?p=359</guid>
		<description><![CDATA[A quick tip. I couldn&#8217;t find this from a quick search when I really needed it.
The problem &#8211; command line programs like fetchmail use the system wide openssl CA certificates to verify the authenticity of the server certificates they are provided when they connect to an SSL server like POP3 or IMAP.
Sometimes, you will have [...]]]></description>
			<content:encoded><![CDATA[<p>A quick tip. I couldn&#8217;t find this from a quick search when I really needed it.</p>
<p>The problem &#8211; command line programs like <a href="http://fetchmail.berlios.de/">fetchmail</a> use the system wide openssl CA certificates to verify the authenticity of the server certificates they are provided when they connect to an SSL server like POP3 or IMAP.</p>
<p>Sometimes, you will have providers like <a href="http://dreamhost.com/">Dreamhost</a>, who will <a href="http://www.dreamhoststatus.com/2007/06/17/ssl-certificate-renewal-for-most-customers/">get smart and ditch</a> the atrocious certificate issuing set up we have right now, and <a href="http://wiki.dreamhost.com/NDN_Certificate">give you a self-signed certificate</a> to verify their servers.</p>
<p>So fetchmail will, for example, belch out this error message every time they connect to Dreamhost&#8217;s mail servers:</p>
<p><code><br />
	$ fetchmail -v --nosyslog<br />
	fetchmail: 6.3.9-rc2 querying homie.mail.dreamhost.com (protocol POP3) at Saturday 08 August 2009 02:12:28 AM IST: poll started<br />
	Trying to connect to 208.97.132.208/995...connected.<br />
	fetchmail: Issuer Organization: New Dream Network, LLC<br />
	fetchmail: Issuer CommonName: New Dream Network Certificate Authority<br />
	fetchmail: Server CommonName: *.mail.dreamhost.com<br />
	fetchmail: homie.mail.dreamhost.com key fingerprint: 17:F7:F2:FF:4A:9D:C3:D3:2B:8A:E9:12:47:C4:A4:28<br />
	fetchmail: Server certificate verification error: unable to get local issuer certificate<br />
	fetchmail: Server certificate verification error: certificate not trusted<br />
	fetchmail: Server certificate verification error: unable to verify the first certificate<br />
</code></p>
<p>While you can mostly ignore this (Dreamhost itself <a href="http://wiki.dreamhost.com/NDN_Certificate#Why_not_get_a_REAL_certificate_signed_by_VeriSign.3F">says</a> they don&#8217;t care much about the &#8220;chain of trust&#8221; &#8211; all they care about is the encryption), you might want to be a little more careful and use the &#8220;<code>sslcertck</code>&#8221; keyword while connecting to your mail servers. This keyword will force fetchmail to only attempt fetching the mail if the issuer of the server certificate strictly matches a CA in your local CA certificates.</p>
<p>Note that this strict certificate check is going to be the default setting in fetchmail any day now. So you might want to pay more attention to these fetchmail warnings right now before they bite you later.</p>
<p>Dreamhost provides the CA certificate which issues their server SSL certificates <a href="http://wiki.dreamhost.com/NDN_Certificate">here</a>. </p>
<p>Installing this in Ubuntu was pretty simple once you know the program involved. So while this example is about Dreamhost, you can similarly install any CA certificates (even your own).</p>
<p>Steps are:</p>
<ol>
<li>Create a directory for the issuer under <code>/usr/share/ca-certificates/</code>. <br />
	<code>mkdir /usr/share/ca-certificates/dreamhost  </code>
	</li>
<li> Copy the CA certificate file into this directory. Use this directory to consolidate all the CA certificates of the common entity. <br />
	<code>sudo cp ~/ndn.ca.crt  /usr/share/ca-certificates/dreamhost </code>
    </li>
<li> Update the CA certificate hash symlinks used by openssl. This will open a text dialog asking you to confirm the CA certificates to be marked as trusted. Out of the box, a typical modern Linux distro would have a long list of certificates which would already be marked as trusted. You have to search for the authority you just copied (it would be unmarked), mark it and select OK.<br />
	     <code>sudo dpkg-reconfigure ca-certificates</code>
    </li>
</ol>
<p>That is it! Next time your run fetchmail, the CA warnings should have gone.</p>
<p>Note that GUI programs like Firefox and Thunderbird have their own CA storages and therefore their own process of adding CA certificates. Modern versions of these programs make it pretty easy to add them using a just a few clicks. This post was about installing them for mostly CLI based programs like fetchmail.</p>
<p>Another note, it seems that on Ubuntu, Postfix needs the config parameters <code>smtp_tls_CApath</code> and <code>smtpd_tls_CApath</code> to be set to /etc/ssl/certs to verify server and client certificates respectively.</p>
<img src="http://feeds.feedburner.com/~r/SandipBhattacharya/~4/Kwhcv71xCwk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.sandipb.net/2009/08/08/adding-new-ca-certificates-in-ubuntu-jaunty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.sandipb.net/2009/08/08/adding-new-ca-certificates-in-ubuntu-jaunty/</feedburner:origLink></item>
		<item>
		<title>Using the official Flickr uploadr on Ubuntu</title>
		<link>http://feedproxy.google.com/~r/SandipBhattacharya/~3/qlRuLVrRWCU/</link>
		<comments>http://blog.sandipb.net/2009/07/06/using-the-official-flickr-uploadr-on-ubuntu/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 20:26:51 +0000</pubDate>
		<dc:creator>Sandip Bhattacharya</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wine]]></category>
		<category><![CDATA[winetricks]]></category>

		<guid isPermaLink="false">http://blog.sandipb.net/?p=337</guid>
		<description><![CDATA[I normally use jUploader for uploading photos to Flickr from my Ubuntu Jaunty box. However, since I got the amazing Panasonic DMC-LX3 compact camera, I have been uploading HD videos too to Flickr. Now none of the FOSS tools that I know of support video right now. Since I insist on uploading photos in the [...]]]></description>
			<content:encoded><![CDATA[<p>I normally use <a href="http://juploadr.org/">jUploader</a> for uploading photos to <a href="http://flickr.com">Flickr</a> from my Ubuntu Jaunty box. However, since I got the amazing <a href="http://www.dpreview.com/reviews/panasonicdmclx3/">Panasonic DMC-LX3</a> compact camera, I have been uploading HD videos too to Flickr. Now none of the FOSS tools that I know of support video right now. Since I insist on uploading photos in the order that I have taken them, it makes my photo upload workflow really messy &#8211; <em>upload a few photos from jUploader, go to flickr.com and upload the video in the sequence, go back to jUploader for the next few photos, back to flickr.com for the videos</em>, and so on. Disgusting, but I don&#8217;t know anything better, and if you do, please tell me.</p>
<p>So I decided to do the next best thing &#8211; I have started using the latest official Flickr Uploadr for Windows in Ubuntu using Wine. No, it doesn&#8217;t work out of the box. It just takes an additional step.</p>
<ol>
<li>Install wine. (<code>apt-get install wine</code>)</li>
<li>Download <code>winetricks</code> from <a href="http://wiki.winehq.org/winetricks">http://wiki.winehq.org/winetricks</a>. This is a small script which automates installation of common wine program dependencies.</li>
<li> Install MS Visual C++ 2005 libraries. (<code>sh winetricks vcrun2005</code>). Some messages which look like errors come on screen. Ignore these.</li>
<li>Download Flickr Uploadr Windows executable from <a href="http://www.flickr.com/tools/uploadr/">http://www.flickr.com/tools/uploadr/</a>.</li>
<li>Install it! (<code>wine FlickrUploadr-3.2.1-2009.06.02.01-en.exe</code>)
</ol>
<p>That is it! Find Flickr Uploadr installed in your menu at <em>Applications-&gt;Wine-&gt;Programs</em>.</p>
<img src="http://feeds.feedburner.com/~r/SandipBhattacharya/~4/qlRuLVrRWCU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.sandipb.net/2009/07/06/using-the-official-flickr-uploadr-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://blog.sandipb.net/2009/07/06/using-the-official-flickr-uploadr-on-ubuntu/</feedburner:origLink></item>
		<item>
		<title>Akamai awesomeness and Opendns lameness</title>
		<link>http://feedproxy.google.com/~r/SandipBhattacharya/~3/GwYCfCnhWR0/</link>
		<comments>http://blog.sandipb.net/2009/04/23/akamai-awesomeness-and-opendns-lameness/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 20:42:30 +0000</pubDate>
		<dc:creator>Sandip Bhattacharya</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[akamai]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[dnscache]]></category>
		<category><![CDATA[opendns]]></category>

		<guid isPermaLink="false">http://blog.sandipb.net/?p=327</guid>
		<description><![CDATA[Akamai footprint awesomeness.
My IP address.
sandipb@pluto:~$ wget -O - -q http://www.whatismyip.com/automation/n09230945.asp;echo
122.167.0.79
sandipb@pluto:~$ host 122.167.0.79
79.0.167.122.in-addr.arpa domain name pointer ABTS-KK-Dynamic-079.0.167.122.airtelbroadband.in.

Akamai CDN for downloading Adobe AIR.
sandipb@pluto:~$ host airdownload.adobe.com
airdownload.adobe.com is an alias for airdownload.wip3.adobe.com.
airdownload.wip3.adobe.com is an alias for airdownload.adobe.com.edgesuite.net.
airdownload.adobe.com.edgesuite.net is an alias for a1396.g.akamai.net.
a1396.g.akamai.net has address 203.101.62.10
a1396.g.akamai.net has address 203.101.62.11
sandipb@pluto:~$ host 203.101.62.10
10.62.101.203.in-addr.arpa domain name pointer dsl-KK-static-010.62.101.203.airtelbroadband.in.

I am downloading from a server [...]]]></description>
			<content:encoded><![CDATA[<p>Akamai footprint awesomeness.</p>
<p>My IP address.</p>
<p><code>sandipb@pluto:~$ wget -O - -q http://www.whatismyip.com/automation/n09230945.asp;echo<br />
122.167.0.79<br />
sandipb@pluto:~$ host 122.167.0.79<br />
79.0.167.122.in-addr.arpa domain name pointer ABTS-KK-Dynamic-079.0.167.122.airtelbroadband.in.<br />
</code></p>
<p>Akamai CDN for downloading Adobe AIR.</p>
<p><code>sandipb@pluto:~$ host airdownload.adobe.com<br />
airdownload.adobe.com is an alias for airdownload.wip3.adobe.com.<br />
airdownload.wip3.adobe.com is an alias for airdownload.adobe.com.edgesuite.net.<br />
airdownload.adobe.com.edgesuite.net is an alias for a1396.g.akamai.net.<br />
a1396.g.akamai.net has address 203.101.62.10<br />
a1396.g.akamai.net has address 203.101.62.11<br />
sandipb@pluto:~$ host 203.101.62.10<br />
10.62.101.203.in-addr.arpa domain name pointer dsl-KK-static-010.62.101.203.airtelbroadband.in.<br />
</code></p>
<p>I am downloading from a server co-located at my ISP. Industry standard in US, but I feel really great for this to be happening in India. <img src='http://blog.sandipb.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Imagine. Download server in India, three hops, 25 ms away!</p>
<p><code>sandipb@pluto:~$ mtr  -i 10  203.101.62.10<br />
My traceroute  [v0.73]<br />
pluto (0.0.0.0)                                                               Thu Apr 23 01:41:38 2009<br />
Packets               Pings<br />
Host                                                        Loss%   Snt   Last   Avg  Best  Wrst StDev<br />
1. 192.168.1.1                                               0.0%     1    1.1   1.1   1.1   1.1   0.0<br />
2. ABTS-KK-Dynamic-001.0.167.122.airtelbroadband.in          0.0%     1   25.4  25.4  25.4  25.4   0.0<br />
3. ABTS-KK-Static-173.32.166.122.airtelbroadband.in          0.0%     1   24.9  24.9  24.9  24.9   0.0<br />
4. ABTS-KK-static-008.32.144.59.airtelbroadband.in           0.0%     1   39.0  39.0  39.0  39.0   0.0<br />
5. dsl-KK-static-010.62.101.203.airtelbroadband.in           0.0%     1   25.0  25.0  25.0  25.0   0.0<br />
</code></p>
<ul><b>Lesson learnt: OpenDNS hurts all this goodness</b></ul>
<p>Thank goodness, I moved off <a title="Opendns" href="http://www.opendns.com/">opendns</a> today. This is what opendns was giving me all this past year that I was using it.</p>
<p><code>sandipb@pluto:~$ dig @208.67.222.222 airdownload.adobe.com<br />
...<br />
;; ANSWER SECTION:<br />
airdownload.adobe.com.	85521	IN	CNAME	airdownload.wip3.adobe.com.<br />
airdownload.wip3.adobe.com. 218	IN	CNAME	airdownload.adobe.com.edgesuite.net.<br />
airdownload.adobe.com.edgesuite.net. 20721 IN CNAME a1396.g.akamai.net.<br />
a1396.g.akamai.net.	20	IN	A	204.2.160.24<br />
a1396.g.akamai.net.	20	IN	A	204.2.160.34</p>
<p></code><br />
<code><br />
sandipb@pluto:~$ host 204.2.160.24<br />
24.160.2.204.in-addr.arpa domain name pointer a204-2-160-24.deploy.akamaitechnologies.com.<br />
sandipb@pluto:~$ ping -c 1 204.2.160.24<br />
PING 204.2.160.24 (204.2.160.24) 56(84) bytes of data.<br />
64 bytes from 204.2.160.24: icmp_seq=1 ttl=54 time=259 ms<br />
</code></p>
<p>A download server 260ms and 11 hops away in US.</p>
<p>Using opendns is breaking anything which uses CDN. Now I have used opendns for a while and it is nice at its work. But believe me, we spend more time downloading videos and text than querying DNS, and if you have a DNS cache at home (like djbdns) or even your ISP&#8217;s DNS, it works a lot as well.</p>
<img src="http://feeds.feedburner.com/~r/SandipBhattacharya/~4/GwYCfCnhWR0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.sandipb.net/2009/04/23/akamai-awesomeness-and-opendns-lameness/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.sandipb.net/2009/04/23/akamai-awesomeness-and-opendns-lameness/</feedburner:origLink></item>
		<item>
		<title>Getting more printable PDFs from texinfo manuals</title>
		<link>http://feedproxy.google.com/~r/SandipBhattacharya/~3/ft0MvQksra8/</link>
		<comments>http://blog.sandipb.net/2009/02/12/getting-more-printable-pdfs-from-texinfo-manuals/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 07:22:13 +0000</pubDate>
		<dc:creator>Sandip Bhattacharya</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[fsf]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[gnupress]]></category>
		<category><![CDATA[tex]]></category>
		<category><![CDATA[texinfo]]></category>

		<guid isPermaLink="false">http://blog.sandipb.net/?p=318</guid>
		<description><![CDATA[Texinfo manuals are used primarily by various GNU projects like Glibc, gcc, gdb, etc. Texinfo is an extremely powerful format for writing high quality professional documentation and can be easily converted to HTML, PDF, Docbook XML and various other formats. The language features tex macros which are quite easy to pick up, and much easier [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Texinfo project home page" href="http://www.gnu.org/software/texinfo/">Texinfo</a> manuals are used primarily by various GNU projects like Glibc, gcc, gdb, etc. Texinfo is an extremely powerful format for writing high quality professional documentation and can be easily converted to HTML, PDF, Docbook XML and various other formats. The language features tex macros which are quite easy to pick up, and much easier to hand write as compared to the new fangled XML formats.</p>
<p>However, my pet grouse for a long time was that the PDFs, which look excellent on screen don&#8217;t seem to print too well on paper. A close examination and various posts on mailing lists <a title="Post mentioning the paleness of CM fonts" href="http://article.gmane.org/gmane.comp.tex.pdftex/3384">like this</a> made me discover the fact that this is primarily because of the Computer Modern fonts used by default by texinfo.</p>
<p>Interestingly, the GNU Press folks which print FSF manuals <a title="Font cusomization detail by gnu press" href="http://article.gmane.org/gmane.comp.tex.texinfo.bugs/795">customize the PDF by modifying font</a>s etc. so that they print better. At the very minimum, they replace the Computer Modern font with Palatino which prints better. And in the FSF&#8217;s spirit of sharing code, these customizations are available for download at the <a title="savannah gnu press project" href="https://savannah.gnu.org/projects/gnupress/">Savannah Gnupress project</a> cvs repository. A look here and at some brief instructions <a title="GNU doc team docs" href="http://www.gnu.no/doc/doc-team.html">here</a> let me arrive at these simple steps to generate a texinfo PDF with palatino fonts.</p>
<ol>
<li>Check out the CVS sources of GNU Press from the savannah repository. Here I am checking out in my home directory.<br />
              <code>cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/gnupress co gnupress</code>
        </li>
<li>Download the texinfo sources that you want to generate PDF from. </li>
<li>The first time, generate a pdf the normal way using texi2pdf. <br />
              <code><br />
               texi2pdf --clean gdb.texinfo<br />
              </code><br />
              This step is important as sometimes the document is broken and cannot be parsed by texinfo. Trying to use the gnupress&#8217;s code will only make it more difficult to troubleshoot and will introduce an unnecessary variable to consider while debugging. I have seen the downloadable libc texinfo sources as broken. So this i a realistic possibility.
        </li>
<li>
        Modify the texinfo source code by adding just this one line immediately after the line containing <code>\input texinfo</code> at the top of the file.<br />
        <code><br />
        @input palatino<br />
        </code></p>
<p>         So effectively, this would the how the top of the document looks after you added the line.<br />
        <code><br />
        \input texinfo      @c -*-texinfo-*-<br />
        @input palatino<br />
        @c Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,<br />
        @c 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006<br />
        @c Free Software Foundation, Inc.<br />
        @c<br />
        @c %**start of header<br />
        @c makeinfo ignores cmds prev to setfilename, so its arg cannot make use<br />
        @c of @set vars.  However, you can override filename with makeinfo -o.<br />
        @setfilename gdb.info<br />
        ...<br />
        </code>
        </li>
<li>Generate the pdf using texi2pdf and the gnupress code. I checked out their code in my home directory. If you checked out elsewhere, adjust paths accordingly.<br />
              <code><br />
               texi2pdf --clean   -I ~/gnupress/texpress/ -I ./ gdb.texinfo<br />
              </code>
</li>
</ol>
<p>That is it!</p>
<img src="http://feeds.feedburner.com/~r/SandipBhattacharya/~4/ft0MvQksra8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.sandipb.net/2009/02/12/getting-more-printable-pdfs-from-texinfo-manuals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.sandipb.net/2009/02/12/getting-more-printable-pdfs-from-texinfo-manuals/</feedburner:origLink></item>
		<item>
		<title>Removing encryption from (legitimate!) PDF files on Ubuntu</title>
		<link>http://feedproxy.google.com/~r/SandipBhattacharya/~3/d5v5UEhiAyE/</link>
		<comments>http://blog.sandipb.net/2009/01/10/removing-encryption-from-legitimate-pdf-files-on-ubuntu/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 09:22:53 +0000</pubDate>
		<dc:creator>Sandip Bhattacharya</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[pdftk]]></category>
		<category><![CDATA[qpdf]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.sandipb.net/?p=308</guid>
		<description><![CDATA[Many service providers have started encrypting the statements that they send you. While at some level, it does add some amount of security when the path to your inbox is not very secure. However, it is sometimes a major pain when you want to archive your emails. This is because every provider has decided on [...]]]></description>
			<content:encoded><![CDATA[<p>Many service providers have started encrypting the statements that they send you. While at some level, it does add some amount of security when the path to your inbox is not very secure. However, it is sometimes a major pain when you want to archive your emails. This is because every provider has decided on a different secret to encrypt your PDF. So if one day you wish to access a statement of your phone bill from three months back, you have to look up the bill from your archive <strong>and</strong> read the mail to find out what they used to encrypt it. With my credit card statements, phone bills etc coming in as encrypted PDFs, archiving them all becomes a major pain.</p>
<p>So I decided to only archive un-encrypted PDF statements from now on. I consider this as a very legitimate reason to bypass PDF encryption and do not see any legal (or at least moral) reason for doing so. So you corporate lawyers looking for a DMCA victim, get out of my face.</p>
<p>For years, I have been using <a title="PDFtk home page" href="http://www.accesspdf.com/pdftk/">pdftk</a> on my Ubuntu systems to manipulate PDFs. However, it being written in Java, installing it pulls in, among other things, the gcj runtime, etc. It was a minor irritation all this while. However, things finally came to a head when it refused to decrypt my credit card statement. PDFs have the concept of an <em>owner password</em> and an <em>user password</em>. The person who creates the PDF can set either one or both. Apparently, the ICICI credit card statements come with an owner password apart from an user password., and pdftk refused to decrypt the pdf without the owner password while all I had was the user password.</p>
<p>I searched around the net, and discovered another pdf manipulation gem, lying in the Ubuntu repositories no less, which can do what I want: <a title="QPDF home page on Sourceforge" href="http://qpdf.sourceforge.net/">QPDF</a>.</p>
<p>So here is how I went around decrypting my statement.</p>
<pre>$ sudo apt-get install qpdf
$ qpdf --decrypt --password=<strong>mypassword</strong> <strong>input.pdf</strong> <strong>output.pdf</strong>
$ evince output.pdf <span style="color:#808080;">#to check if it asks for password</span></pre>
<p>That is it!</p>
<img src="http://feeds.feedburner.com/~r/SandipBhattacharya/~4/d5v5UEhiAyE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.sandipb.net/2009/01/10/removing-encryption-from-legitimate-pdf-files-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://blog.sandipb.net/2009/01/10/removing-encryption-from-legitimate-pdf-files-on-ubuntu/</feedburner:origLink></item>
		<item>
		<title>One liner to convert Maildir/ to mbox using mutt</title>
		<link>http://feedproxy.google.com/~r/SandipBhattacharya/~3/fjNxS5PpZD8/</link>
		<comments>http://blog.sandipb.net/2009/01/07/one-liner-to-convert-maildir-to-mbox-using-mutt/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 13:59:57 +0000</pubDate>
		<dc:creator>Sandip Bhattacharya</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[mutt]]></category>
		<category><![CDATA[one-liner]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blog.sandipb.net/?p=293</guid>
		<description><![CDATA[If .news/ is the maildir that you want to convert to the mbox news, this one-liner will do the job for you.

mutt -f .news/ -e 'set confirmcreate=no; set delete=no; push "T.*&#60;enter&#62;;snews&#60;enter&#62;&#60;quit&#62;"'

(Gleaned from this mailing list post )
]]></description>
			<content:encoded><![CDATA[<p>If <code><span style="color:blue;">.news/</span></code> is the maildir that you want to convert to the mbox <code><span style="color:blue;">news</span></code>, this one-liner will do the job for you.</p>
<p><code><br />
mutt -f <span style="color:blue;">.news/</span> -e 'set confirmcreate=no; set delete=no; push "T.*&lt;enter&gt;;s<span style="color:blue;">news</span>&lt;enter&gt;&lt;quit&gt;"'<br />
</code></p>
<p>(Gleaned from <a title="Source" href="http://newsgroups.derkeiler.com/Archive/Comp/comp.mail.mutt/2006-06/msg00005.html">this</a> mailing list post )</p>
<img src="http://feeds.feedburner.com/~r/SandipBhattacharya/~4/fjNxS5PpZD8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.sandipb.net/2009/01/07/one-liner-to-convert-maildir-to-mbox-using-mutt/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://blog.sandipb.net/2009/01/07/one-liner-to-convert-maildir-to-mbox-using-mutt/</feedburner:origLink></item>
		<item>
		<title>Apple is as big a threat to FOSS as Microsoft</title>
		<link>http://feedproxy.google.com/~r/SandipBhattacharya/~3/DO2OchUVnVk/</link>
		<comments>http://blog.sandipb.net/2008/10/24/apple-is-as-big-a-threat-to-foss-as-microsoft/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 09:16:15 +0000</pubDate>
		<dc:creator>Sandip Bhattacharya</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[evangelism]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[Os X]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://sandipb.wordpress.com/?p=285</guid>
		<description><![CDATA[Many FOSS enthusiasts do not realize is that Apple is as, if not more, significant threat than Microsoft in the war for software freedom.
Most of the technical arguments that FOSS evangelists have, fall apart when you are talking about Apple and Mac Os X. Mac Os X has very less, if not none, of the [...]]]></description>
			<content:encoded><![CDATA[<p>Many FOSS enthusiasts do not realize is that Apple is as, if not more, significant threat than Microsoft in the war for software freedom.</p>
<p>Most of the technical arguments that FOSS evangelists have, fall apart when you are talking about Apple and Mac Os X. Mac Os X has very less, if not none, of the perceived instability of Windows. Default applications bundled with the OS do quite a decent job for many users. And OS being based on BSD itself makes most of the arguments about <em>unix-better-than-windows</em> moot. On top of this, a significant number of well known FOSS folks use Macs. I have seen several photos of FOSS conferences where a large number of the people were using Macs (I am assuming they use Os X. I could be wrong).</p>
<p>So the only argument left to fight about against Apple is the philosophical angle, one that has always been the toughest to get across.</p>
<p>I see this problem becoming bigger as Apple makes further inroads. According to <a title="appleinsider apple market share report" href="http://www.appleinsider.com/articles/08/03/17/apple_snags_14_percent_of_us_based_pc_retail_sales_in_february.html">some</a> market reports, they already are a market leader in $1000+ notebooks, and have increased their share to ~10+% in new PC sales in US.</p>
<p>Accordingly, it is very important that FOSS evangelists make sure that their arguments make as much relevance to Macs as to Windows. Stop talking about <acronym title="Blue Screen of Death">BSOD</acronym>s, or Viruses, etc. Talk more about the evils of closed source software.</p>
<img src="http://feeds.feedburner.com/~r/SandipBhattacharya/~4/DO2OchUVnVk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.sandipb.net/2008/10/24/apple-is-as-big-a-threat-to-foss-as-microsoft/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.sandipb.net/2008/10/24/apple-is-as-big-a-threat-to-foss-as-microsoft/</feedburner:origLink></item>
		<item>
		<title>Discussing Paul Graham’s essay on software patents</title>
		<link>http://feedproxy.google.com/~r/SandipBhattacharya/~3/0QukBaEBpv0/</link>
		<comments>http://blog.sandipb.net/2008/10/23/discussing-paul-grahams-essay-on-software-patents/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 10:37:17 +0000</pubDate>
		<dc:creator>Sandip Bhattacharya</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[patents]]></category>
		<category><![CDATA[software patents]]></category>

		<guid isPermaLink="false">http://sandipb.wordpress.com/?p=281</guid>
		<description><![CDATA[Thanks to Saurabh&#8217;s mail on ILUGD, found out about this nice essay by Paul Graham on software patents. Not being much of a lawyer or an expert on these things, but nevertheless having a conviction that software patents are evil, I have dared to comment on parts of this essay. Of course, you are right, [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to <a title="The mail which led me to this essay" href="http://article.gmane.org/gmane.user-groups.linux.delhi/21676">Saurabh&#8217;s mail</a> on <a title="ILUGD website" href="http://www.linux-delhi.org">ILUGD</a>, found out about <a title="Paul's essay on software patents" href="http://www.paulgraham.com/softwarepatents.html">this nice essay</a> by <a title="Bio of Paul Graham" href="http://www.paulgraham.com/bio.html">Paul Graham</a> on software patents. Not being much of a lawyer or an expert on these things, but nevertheless having a conviction that software patents are evil, I have dared to comment on parts of this essay. Of course, you are right, whenever possible I have quoted out of context to put him at a disadvantage. <img src='http://blog.sandipb.net/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<p>Now YOU have an incentive to <a title="Paul's essay on software patents" href="http://www.paulgraham.com/softwarepatents.html">go read the essay</a> to find out whether I make sense. <img src='http://blog.sandipb.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<blockquote><p>One thing I do feel pretty certain of is that if you&#8217;re against software patents, you&#8217;re against patents in general. Gradually our machines consist more and more of software. Things that used to be done with levers and cams and gears are now done with loops and trees and closures. There&#8217;s nothing special about physical embodiments of control systems that should make them patentable, and the software equivalent not.</p>
<p>Unfortunately, patent law is inconsistent on this point. Patent law in most countries says that algorithms aren&#8217;t patentable. This rule is left over from a time when &#8220;algorithm&#8221; meant something like the Sieve of Eratosthenes. In 1800, people could not see as readily as we can that a great many patents on mechanical objects were really patents on the algorithms they embodied.</p></blockquote>
<p>Yes, we believe that the patents system has moved much away from it&#8217;s original purpose but we especially believe the problem is in software patents/algorithms. Saying that algorithms nowadays are more complex and therefore is ok to patent is incorrect. Algorithms get built over others and with knowledge of previous algorithms, a lot of people are near about the same distance from the frontier. The chances of different people hitting the same method to solve a problem is much higher now than before. This is especially true in the entrepreneurial culture (startups) of today.</p>
<blockquote><p>To be patentable, an invention has to be more than new. It also has to be non-obvious.</p></blockquote>
<p>I have heard this several times. How do you define &#8220;obvious&#8221;? Leaving such a significant issue to such an ambiguous term itself breaks the system.</p>
<blockquote><p>Applying for a patent is a negotiation. You generally apply for a broader patent than you think you&#8217;ll be granted, and the examiners reply by throwing out some of your claims and granting others. So I don&#8217;t really blame Amazon for applying for the one-click patent. The big mistake was the patent office&#8217;s, for not insisting on something narrower, with real technical content.</p></blockquote>
<p>So the system requires applicants to attempt to overreach? And what is the implication of that on public freedom?</p>
<blockquote><p>Where Amazon went over to the dark side was not in applying for the patent, but in enforcing it. A lot of companies (Microsoft, for example) have been granted large numbers of preposterously over-broad patents, but they keep them mainly for defensive purposes. Like nuclear weapons, the main role of big companies&#8217; patent portfolios is to threaten anyone who attacks them with a counter-suit.</p></blockquote>
<p>Another example of how patents have moved away from their original intent. They are no longer an incentive to invent. They are more like tactical business weapons. Used as defense by the very people who have caused this situation to come about.</p>
<blockquote><p>We tell the startups we fund not to worry about infringing patents, because startups rarely get sued for patent infringement. There are only two reasons someone might sue you: for money, or to prevent you from competing with them.</p></blockquote>
<p>So startups, the really innovative side of the business today(Paul says the same thing at the end), don&#8217;t need patents to innovate? I find this argument very inconsistent myself. I thought most startups nowadays, who focus on innovation(rather than just providing &#8220;solutions&#8221;),  measure their success by the patents they manage to claim. But again, why have a system when it is not needed by the same people whom it is supposed to help?</p>
<blockquote><p>If your startup grows big enough, however, you&#8217;ll start to get sued, no matter what you do. If you go public, for example, you&#8217;ll be sued by multiple patent trolls who hope you&#8217;ll pay them off to go away.More on them later.</p>
<p>In other words, no one will sue you for patent infringement till you have money, and once you have money, people will sue you whether they have grounds to or not. So I advise fatalism. Don&#8217;t waste your time worrying about patent infringement. You&#8217;re probably violating a patent every time you tie your shoelaces.</p></blockquote>
<p>Well, this is exactly the problem we talk about.</p>
<blockquote><p>We do advise the companies we fund to apply for patents, but not so they can sue competitors. Successful startups either get bought or grow into big companies. If a startup wants to grow into a big company, they should apply for patents to build up the patent portfolio they&#8217;ll need to maintain an armed truce with other big companies. If they want to get bought, they should apply for patents because patents are part of the mating dance with acquirers.</p></blockquote>
<p>See how a system which was supposed to be a vehicle of invention is now more of a business weapon?</p>
<blockquote><p>Frankly, it surprises me how small a role patents play in the software business. It&#8217;s kind of ironic, considering all the dire things experts say about software patents stifling innovation, but when one looks closely at the software business, the most striking thing is how little patents seem to matter.</p></blockquote>
<p>I am confused now. What are we talking about here?</p>
<blockquote><p>I&#8217;m not sure what the proportions are of the preceding three ingredients, but the custom among the big companies seems to be not to sue the small ones, and the startups are mostly too busy and too poor to sue one another. So despite the huge number of software patents there&#8217;s not a lot of suing going on. With one exception: patent trolls.</p>
<p>Patent trolls are companies consisting mainly of lawyers whose whole business is to accumulate patents and threaten to sue companies who actually make things. Patent trolls, it seems safe to say, are evil.</p>
<p>&#8230;</p>
<p>Patent trolls seem to have caught big companies by surprise. In the last couple years they&#8217;ve extracted hundreds of millions of dollars from them. Patent trolls are hard to fight precisely because they create nothing. Big companies are safe from being sued by other big companies because they can threaten a counter-suit. But because patent trolls don&#8217;t make anything, there&#8217;s nothing they can be sued for. I predict this loophole will get closed fairly quickly, at least by legal standards. It&#8217;s clearly an abuse of the system, and the victims are powerful. [8]</p>
<p>But evil as patent trolls are, I don&#8217;t think they hamper innovation much. They don&#8217;t sue till a startup has made money, and by that point the innovation that generated it has already happened. I can&#8217;t think of a startup that avoided working on some problem because of patent trolls.</p></blockquote>
<p>So do startups innovate for the sake of innovation? And it is not about getting big one day? or not about getting rich one day? I consider this as a convoluted logic. Like saying &#8220;don&#8217;t worry about robbers till you have money they can rob&#8221;. It seems to make sense till you realize that most people don&#8217;t exactly like to live a life of penury.</p>
<blockquote><p>One thing I can say is that 99.9% of the people who express opinions on the subject do it not based on such research, but out of a kind of religious conviction. At least, that&#8217;s the polite way of putting it; the colloquial version involves speech coming out of organs not designed for that purpose.</p></blockquote>
<p>Guilty as charged. <img src='http://blog.sandipb.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p>Whether they encourage innovation or not, patents were at least intended to. You don&#8217;t get a patent for nothing. In return for the exclusive right to use an idea, you have to publish it, and it was largely to encourage such openness that patents were established.</p>
<p>Before patents, people protected ideas by keeping them secret. With patents, central governments said, in effect, if you tell everyone your idea, we&#8217;ll protect it for you.</p></blockquote>
<p>Given a choice between software patents or software trade secrets (encrypted php code, anyone?) what would you prefer? I would much prefer the latter. It is so much more of a level playing field that way &#8211; at least for FOSS. It would also give a more relaxed environment for innovators to work in.</p>
<blockquote><p>In the software business I know from experience whether patents encourage or discourage innovation, and the answer is the type that people who like to argue about public policy least like to hear: they don&#8217;t affect innovation much, one way or the other. Most innovation in the software business happens in startups, and startups should simply ignore other companies&#8217; patents. At least, that&#8217;s what we advise, and we bet money on that advice.</p>
<p>The only real role of patents, for most startups, is as an element of the mating dance with acquirers. There patents do help a little. And so they do encourage innovation indirectly, in that they give more power to startups, which is where, pound for pound, the most innovation happens. But even in the mating dance, patents are of secondary importance. It matters more to make something great and get a lot of users.</p></blockquote>
<p>So he ends the essay with a complete contradiction. Why have a system which doesn&#8217;t work the way it is intended to?</p>
<img src="http://feeds.feedburner.com/~r/SandipBhattacharya/~4/0QukBaEBpv0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.sandipb.net/2008/10/23/discussing-paul-grahams-essay-on-software-patents/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.sandipb.net/2008/10/23/discussing-paul-grahams-essay-on-software-patents/</feedburner:origLink></item>
		<item>
		<title>Catching up with Python</title>
		<link>http://feedproxy.google.com/~r/SandipBhattacharya/~3/cnIGTqEtvyk/</link>
		<comments>http://blog.sandipb.net/2008/10/20/catching-up-with-python/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 12:31:52 +0000</pubDate>
		<dc:creator>Sandip Bhattacharya</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://sandipb.wordpress.com/?p=277</guid>
		<description><![CDATA[Am trying to catch up with Python where I left off years ago.
&#60;rant&#62; What have they done to the language when I was gone? It is no longer the simple language as before. The decorator syntax looks so .. well, Perlish.  List comprehensions, in some ways very inappropriately named, took a few moments to [...]]]></description>
			<content:encoded><![CDATA[<p>Am trying to catch up with Python where I left off years ago.</p>
<p>&lt;rant&gt; What have they done to the language when I was gone? It is no longer the simple language as before. The <a href="http://wiki.python.org/moin/PythonDecorators">decorator</a> syntax looks so .. well, Perlish. <a href="http://www.python.org/doc/2.5.2/tut/node7.html#SECTION007140000000000000000"> List comprehensions</a>, in some ways very inappropriately named, took a few moments to sink in. It is great that it is concise, but then .. so was Perl! Look where it got &#8220;them&#8221; &#8211; Concise Perl programs looks not too different from a binary file open in a text editor.<br />
&lt;/rant&gt;</p>
<p>There are so many changes to the language since 1.5.2. Does anybody know a place where I can get a list? I am already quite late. They are already discussing about the next major version now.</p>
<img src="http://feeds.feedburner.com/~r/SandipBhattacharya/~4/cnIGTqEtvyk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.sandipb.net/2008/10/20/catching-up-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.sandipb.net/2008/10/20/catching-up-with-python/</feedburner:origLink></item>
	</channel>
</rss>
