<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3426585108368245649</id><updated>2012-02-16T07:10:58.781-08:00</updated><title type='text'>Santanu's Linux LogBook</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-2567105502843661542</id><published>2011-10-13T04:05:00.000-07:00</published><updated>2011-10-13T04:08:23.889-07:00</updated><title type='text'>RIP Dennis Ritchie</title><content type='html'>Today is indeed a very sad day for me. We have lost a great mind. Dennis Ritchie was one of my heroes. RIP Dennis Ritchie.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-2567105502843661542?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/2567105502843661542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=2567105502843661542' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/2567105502843661542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/2567105502843661542'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2011/10/rip-dennis-ritchie.html' title='RIP Dennis Ritchie'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-2397009281700375288</id><published>2009-12-19T14:18:00.000-08:00</published><updated>2009-12-19T14:52:59.052-08:00</updated><title type='text'>Skype in Linux</title><content type='html'>Recently I have started using Skype in Linux for video calls (calling home). My webcam (Logitech QuickCam Connect) works well in Linux but not directly under Skype (2.1.0.47). I am on Ubuntu 9.10. After some net surfing, I found two solutions that worked:&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Solution#1:&lt;/u&gt;&lt;br /&gt; Install gstfakevideo.&lt;br /&gt; If webcam is at &lt;code&gt;/dev/video0&lt;/code&gt;, then move it to, say &lt;code&gt;/dev/video1&lt;/code&gt; (gstfakevideo will use &lt;code&gt;/dev/video0&lt;/code&gt; for itself by default. This also means that in Skype Video settings, &lt;code&gt;/dev/video0&lt;/code&gt; is to be selected).&lt;br /&gt; Start Skype as follows:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;gstfakevideo v4l2src device=/dev/video1&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;u&gt;Solution#2:&lt;/u&gt;&lt;br /&gt; Install &lt;code&gt;libv4l&lt;/code&gt; (in Ubuntu it is libv4l-0).&lt;br /&gt; Start Skype as follows:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;(change the above path names depending on where the libv4l and skype are installed in your system)&lt;br /&gt;&lt;br /&gt;Now that I got video working under Skype, I faced another problem. The video was too dark, and the current Skype version for Linux does not provide any option to change the brightness, contrast, etc. Again, some net surfing, and the solution that works for me turns out to be &lt;em&gt;xawtv&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;xawtv includes along with it a tool called v4lctl, which allows one to control brightness, contrast, etc. of the video stream from v4l devices. For me, a simple &lt;br /&gt;&lt;br /&gt;&lt;code&gt;v4lctl bright 250&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;from the terminal during a Skype video call solved the brightness problem. For other options that can be changed via v4lctl, do a &lt;br /&gt;&lt;br /&gt;&lt;code&gt;v4lctl list&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;I can't exactly remember the URLs from where I collected those solutions, but I do remember that all of that info was from the Skype forums.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-2397009281700375288?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/2397009281700375288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=2397009281700375288' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/2397009281700375288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/2397009281700375288'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2009/12/skype-in-linux.html' title='Skype in Linux'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-5054319056644113921</id><published>2009-03-22T14:10:00.000-07:00</published><updated>2009-03-22T14:26:48.414-07:00</updated><title type='text'>Narrowing down to a region in Emacs</title><content type='html'>Emacs is awesome! What a piece of software! Recently, I discovered a very useful feature in Emacs.&lt;br /&gt;&lt;br /&gt;Let's say, you are writing some documentation in &lt;code&gt;text-mode&lt;/code&gt;. Inside it, you need to write a piece of C code with proper indentation. You can switch to &lt;code&gt;c-mode&lt;/code&gt;, but then the rest of your text starts looking weird with colors and all, and this is very distracting (to me at least). But Emacs, as usual, has a solution to this problem.&lt;br /&gt;&lt;br /&gt;Select a few blank lines (where you want to insert your code) within the text, and give the command &lt;code&gt;M-x narrow-to-region&lt;/code&gt; (the keyboard shortcut for this is &lt;code&gt;C-x n n&lt;/code&gt;). You will find yourself in a buffer with only the region you selected. Then you can enter &lt;code&gt;c-mode&lt;/code&gt; and write the code. When done, you can go back to your original full view by using the command &lt;code&gt;M-x widen&lt;/code&gt; (or &lt;code&gt;C-x n w&lt;/code&gt;) and switch back to whatever mode you were in (&lt;code&gt;text-mode&lt;/code&gt; in this case).&lt;br /&gt;&lt;br /&gt;I find this pretty useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-5054319056644113921?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/5054319056644113921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=5054319056644113921' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/5054319056644113921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/5054319056644113921'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2009/03/narrowing-down-to-region-in-emacs.html' title='Narrowing down to a region in Emacs'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-7677030351170919587</id><published>2009-03-22T13:50:00.000-07:00</published><updated>2009-03-22T14:10:39.807-07:00</updated><title type='text'>Using "Abbreviated Skeletons" in Emacs</title><content type='html'>In Emacs, you can use code templates (using 'skeleton's in emacs) as abbreviations to speed up your coding. Here is an example:&lt;br /&gt;&lt;br /&gt;Suppose I want to create a code-template for the &lt;em&gt;for loop&lt;/em&gt; in &lt;em&gt;c-mode&lt;/em&gt; in Emacs. To create the template, I can put the following function in my &lt;code&gt;.emacs&lt;/code&gt; file:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;(define-skeleton c-for&lt;br /&gt;  "Inserts a C for loop template."&lt;br /&gt;  nil&lt;br /&gt;  &gt; "for (;;){" \n&lt;br /&gt;  &gt; _ \n&lt;br /&gt;  "}" &gt; \n&lt;br /&gt;  )&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;(see the &lt;em&gt;Autotype&lt;/em&gt; section of the emacs info)&lt;br /&gt;&lt;br /&gt;After that, I can edit the abbreviation table by using the command &lt;code&gt;M-x edit-abbrevs&lt;/code&gt; (i.e., Press Alt+x, and then give the command edit-abbrevs and press enter). &lt;br /&gt;&lt;br /&gt;Then, under the heading (c-mode-abbrev-table), leaving a blank line, I can enter the following line:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;"forst"   0     ""      c-for&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then, I can save the changes by pressing &lt;code&gt;C-c C-c&lt;/code&gt; (i.e., press Control+c twice). That's it. &lt;br /&gt;&lt;br /&gt;Now, whenever I am writing a C program, if I need to use the template, I will just type "forst" (without the quotes), and if the abbrev-mode is turned on, then as soon as I enter a space, my template for the for statement gets entered with the cursor inside the for loop as follows:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;for (;;){&lt;br /&gt;  _&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;(If the abbrev-mode is turned off, "forst" can still be expanded to the template by pressing "C-x a e", which basically stands for "&lt;em&gt;a&lt;/em&gt;bbreviation &lt;em&gt;e&lt;/em&gt;xpand".&lt;br /&gt;&lt;br /&gt;Oh, of course I need to save my abbreviations using &lt;code&gt;M-x write-abbrevs-file&lt;/code&gt; if I want to use them in future emacs sessions. But that is obvious... although I have forgotten that on many occassions :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-7677030351170919587?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/7677030351170919587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=7677030351170919587' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/7677030351170919587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/7677030351170919587'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2009/03/using-abbreviated-skeletons-in-emacs.html' title='Using &quot;Abbreviated Skeletons&quot; in Emacs'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-8761468267170557887</id><published>2009-03-11T08:39:00.000-07:00</published><updated>2009-03-11T13:23:11.379-07:00</updated><title type='text'>How I connected to Internet from Linux via Airtel GPRS</title><content type='html'>First of all, I needed to activate Airtel's MO (Mobile Office) GPRS service. At the moment, they provide a form of this service by which I will be charged @ 30p/50KB (at least that's what I understood from their website). So, here is what I did:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Activating the MO service&lt;/span&gt;&lt;/br&gt;&lt;br /&gt;Dialed *567*1# to activate (*567*2# to deactivate) the service on my prepaid Airtel connection.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Configuring the mobile&lt;/span&gt;&lt;/br&gt;&lt;br /&gt;To configure the mobile for the MO service, I needed to set the active GPRS access point to &lt;span style="font-style:italic;"&gt;airtelgprs.com&lt;/span&gt;. I have a Nokia 3220. There I had to set &lt;code&gt;airtelgprs.com&lt;/code&gt; under &lt;span style="font-style:italic;"&gt;Settings -&gt; Connectivity -&gt; GPRS -&gt; GPRS Modem Settings -&gt; Edit Active Access Point -&gt; GPRS Access Point&lt;/span&gt;. Also, I set the &lt;span style="font-style:italic;"&gt;Alias for Access Point&lt;/span&gt;, and &lt;span style="font-style:italic;"&gt;Active Access Point&lt;/span&gt; to &lt;code&gt;airtelgprs.com&lt;/code&gt;. That was all I had to do on the mobile side.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Connecting the Mobile to my Linux box&lt;/span&gt;&lt;/br&gt;&lt;br /&gt;I connected the mobile (Nokia 3220) using the Nokia CA-42 cable to an USB port on my 4 yr old Compaq Presario 2203AL Laptop running Fedora 10. I made sure that the kernel had recognized my mobile as an USB modem. I checked that using the command &lt;code&gt;dmesg&lt;/code&gt;. Among the several lines of output, the following lines appeared:&lt;/br&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;usb 2-2: new full speed USB device using uhci_hcd and address 2&lt;br /&gt;usb 2-2: configuration #1 chosen from 1 choice&lt;br /&gt;usb 2-2: New USB device found, idVendor=0421, idProduct=0802&lt;br /&gt;usb 2-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0&lt;br /&gt;cdc_acm: This device cannot do calls on its own. It is no modem.&lt;br /&gt;cdc_acm 2-2:1.0: ttyACM0: USB ACM device&lt;br /&gt;usbcore: registered new interface driver cdc_acm&lt;br /&gt;cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/br&gt;&lt;br /&gt;Thus, my mobile was detected as an USB modem with device name &lt;code&gt;ttyACM0&lt;/code&gt; under the &lt;code&gt;/dev&lt;/code&gt; directory.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Linux side configuration&lt;/span&gt;&lt;/br&gt;&lt;br /&gt;First of all, I made sure that I had turned off my wi-fi connectivity on this laptop. Also, I don't use ethernet on this laptop. So, basically, I got totally offline. All I had to do now was to use &lt;span style="font-style:italic;"&gt;wvdial&lt;/span&gt; program to connect to the internet via the mobile. For that I needed to create the file &lt;code&gt;wvdial.conf&lt;/code&gt; in &lt;code&gt;/etc/&lt;/code&gt; directory, and put the following lines in it:&lt;/br&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;[Dialer Defaults]&lt;br /&gt;Init2 = ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0&lt;br /&gt;Modem Type = USB Modem&lt;br /&gt;Phone = *99***1#&lt;br /&gt;Stupid Mode = 1&lt;br /&gt;ISDN = 0&lt;br /&gt;Username = "none"&lt;br /&gt;Init1 = ATZ&lt;br /&gt;Password = "none"&lt;br /&gt;Modem = /dev/ttyACM0&lt;br /&gt;Baud = 230400&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Once that was done, I ran the command &lt;code&gt;wvdial&lt;/code&gt; from a terminal with root privileges. (Of course, later I intend to write a suitable udev rules file so that the permissions of the ttyACM0 device will be set such that I will be able to run wvdial as a normal user.) Connectivity was established, ppp was started, and along with several lines of output from wvdial, I found the following lines of information:&lt;/br&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;--&gt; local  IP address 117.99.41.9&lt;br /&gt;--&gt; remote IP address 10.6.6.6&lt;br /&gt;--&gt; primary   DNS address 202.56.230.5&lt;br /&gt;--&gt; secondary DNS address 202.56.250.6&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/br&gt;&lt;br /&gt;&lt;br /&gt;I checked using &lt;code&gt;ifconfig&lt;/code&gt; that ppp was up. Also, the command &lt;code&gt;route -n&lt;/code&gt; showed that my default gateway was 10.6.6.6 as expected from the above output. I then manually set the nameservers in the file &lt;code&gt;/etc/resolv.conf&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;That's all I had to do. I could now successfully ping any website, and surf the net, although very slowly... but who cares, it was fun :-)&lt;br /&gt;&lt;br /&gt;To stop the connection, I just had to stop wvdial by pressing Control-C.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-8761468267170557887?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/8761468267170557887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=8761468267170557887' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/8761468267170557887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/8761468267170557887'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2009/03/how-i-connected-to-internet-from-linux.html' title='How I connected to Internet from Linux via Airtel GPRS'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-8468973341917468799</id><published>2009-03-08T03:49:00.000-07:00</published><updated>2009-03-08T04:34:51.270-07:00</updated><title type='text'>Making Xmonad to show up in gdm session list</title><content type='html'>I am now for some reason having to use Fedora 10 on my home laptop... partly by choice, partly due to circumstances. As I expected, xmonad is not in yum repos (neither Fedora nor RPMFusion)... but thankfully, ghc and haskell libraries are. Anyways, I found an easy way to install haskell packages once ghc and friends are installed (more about that in a later post... probably). Well, installed xmonad, xmobar, etc. along with gmrun (this was in yum repos).&lt;br /&gt;&lt;br /&gt;But now that I have xmonad installed, I needed xmonad to show up in gdm session list so that I could choose it over gnome. I had done this quite a while ago, before I started using debian based distros... so I had to re-learn the process (&lt;a href="http://www.haskell.org/haskellwiki/Xmonad/Frequently_asked_questions"&gt;Xmonad FAQ page&lt;/a&gt; made the process trivial). Now that I know how it works, I thought I should blog about it so that I can look it up here again in case I forget again.&lt;br /&gt;&lt;br /&gt;Well, after so much blah blah, the process is pretty straightforward. As with most Unixy ways of doing things, you just have to add a .desktop file, say, xmonad.desktop to "/usr/share/xsessions/".&lt;br /&gt;The contents of this file is also quite straightforward:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;[Desktop Entry]&lt;br /&gt;Encoding=UTF-8&lt;br /&gt;Name=xmonad&lt;br /&gt;Comment=This session starts xmonad&lt;br /&gt;Exec=/home/sc/.cabal/bin/xmonad&lt;br /&gt;Type=Application&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;(OK, so you (assuming somebody other than me reads this) probably figured out by now that I used cabal to install xmonad... well, that saves me a blog post I guess :-)&lt;br /&gt;&lt;br /&gt;xmonad should show up along with others in your gdm session list.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-8468973341917468799?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/8468973341917468799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=8468973341917468799' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/8468973341917468799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/8468973341917468799'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2009/03/making-xmonad-to-show-up-in-gdm-session.html' title='Making Xmonad to show up in gdm session list'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-8109936850578530292</id><published>2009-02-16T01:03:00.000-08:00</published><updated>2009-02-16T01:17:32.695-08:00</updated><title type='text'>Creating a Calendar in Linux</title><content type='html'>Today I found a great program called "pcal". It can create good looking postscript calendars. Most importantly, it can mark holidays in the postscript output if a 'date file' (normally named .calendar) is provided to it. &lt;br /&gt;&lt;br /&gt;I created a holiday list in my .calendar file as follows (the * after the dates indicate a holiday):&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;8/1/09*         "Muharram"&lt;br /&gt;23/1/09*        "Netaji's Birthday"&lt;br /&gt;26/1/09*        "Republic Day"&lt;br /&gt;31/1/09*        "Saraswati Puja"&lt;br /&gt;10/3/09*        "Fateh-Duaz-Duham"&lt;br /&gt;....&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;and then used pcal as follows to generate a nice single a4 page calendar for 2009:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;pcal -P a4 -o cal2009.ps -E -f .calendar -g holiday -w 2009&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Here, &lt;br /&gt;'-P a4' generates output for A4 sheet,&lt;br /&gt;'-o cal2009.ps' names the output file,&lt;br /&gt;'-E' lets pcal know that my "date file" has dates in European format,&lt;br /&gt;'-f .calendar' tells pcal the name of my "date file",&lt;br /&gt;'-g holidays' tells pcal to use a particular color (in my case the default grey) for holidays,&lt;br /&gt;'-w' tells pcal to create a whole year calendar (i.e. a full year on a single page).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-8109936850578530292?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/8109936850578530292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=8109936850578530292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/8109936850578530292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/8109936850578530292'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2009/02/creating-calendar-in-linux.html' title='Creating a Calendar in Linux'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-586330796217455080</id><published>2009-02-14T05:37:00.000-08:00</published><updated>2009-02-15T23:01:36.201-08:00</updated><title type='text'>Setting "SHMConfig" to "true" for synclient to work in recent Linux distros</title><content type='html'>Situation:&lt;br /&gt;==========&lt;br /&gt;&lt;br /&gt;1. You use a synaptics touchpad on your laptop/netbook.&lt;br /&gt;&lt;br /&gt;2. You use a recent Linux distro (like Fedora 10) that comes with a&lt;br /&gt;blank /etc/X11/xorg.conf.&lt;br /&gt;&lt;br /&gt;3. You don't like the way your distro has configured your touchpad by&lt;br /&gt;default. For example, you would like to get a middle click by&lt;br /&gt;tapping the upper right corner of the touchpad.&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;=========&lt;br /&gt;&lt;br /&gt;To change the synaptics touchpad options at runtime (i.e. while the X&lt;br /&gt;Server is running), you need to use the command line program&lt;br /&gt;"synclient" (or graphical programs like gsynaptics, etc.).&lt;br /&gt;&lt;br /&gt;I prefer the command line "synclient" because it allows me to tweak a&lt;br /&gt;lot of things that gsynaptics does not allow me to.&lt;br /&gt;&lt;br /&gt;For example, to get a middle click by tapping the upper right corner&lt;br /&gt;of your touchpad, run synclient with the following option:&lt;br /&gt;&lt;br /&gt;synclient TapButton2=2 RTCornerButton=2&lt;br /&gt;&lt;br /&gt;Read the synclient manual page for more details. Do a 'synclient -l'&lt;br /&gt;to get the current user settings.&lt;br /&gt;&lt;br /&gt;In Ubuntu 8.10, synclient is provided by the package&lt;br /&gt;xserver-xorg-input-synaptics.&lt;br /&gt;&lt;br /&gt;In Fedora 10, synclient is provided by the package&lt;br /&gt;xorg-x11-drv-synaptics.&lt;br /&gt;&lt;br /&gt;But to get synclient working, you need to have the option "SHMConfig"&lt;br /&gt;set as "true" in your options to Xorg. This was earlier done by adding&lt;br /&gt;the line:&lt;br /&gt;&lt;br /&gt;Option "SHMConfig" "on"&lt;br /&gt;&lt;br /&gt;in your /etc/X11/xorg.conf file in the Synaptics InputDevice section.&lt;br /&gt;Now that this file is being deprecated, you need to find out how you&lt;br /&gt;can provide this option to Xorg. If you are on Fedora 10 like me&lt;br /&gt;(maybe this is also the case in Ubuntu 8.10, Fedora 9, etc.), you can&lt;br /&gt;put this option in a hal configuration file in /etc/hal/fdi/policy/&lt;br /&gt;&lt;br /&gt;Using root privileges, create a file named say, synaptics.fdi, in&lt;br /&gt;/etc/hal/fdi/policy/ using your favorite editor, and put the following&lt;br /&gt;there:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-1"?&amp;gt&lt;br /&gt;&amp;lt;deviceinfo version="0.2"&amp;gt&lt;br /&gt;&amp;lt;device&amp;gt&lt;br /&gt;&amp;lt;match key="info.capabilities" contains="input.touchpad"&amp;gt&lt;br /&gt;&amp;lt;match key="info.product" contains="Synaptics TouchPad"&amp;gt&lt;br /&gt;&amp;lt;merge key="input.x11_options.SHMConfig" type="string"&amp;gt;true&amp;lt;/merge&amp;gt&lt;br /&gt;&amp;lt;/match&amp;gt&lt;br /&gt;&amp;lt;/match&amp;gt&lt;br /&gt;&amp;lt;/device&amp;gt&lt;br /&gt;&amp;lt;/deviceinfo&amp;gt&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Next, restart by using the command (as root):&lt;br /&gt;&lt;br /&gt;/etc/init.d/haldaemon restart&lt;br /&gt;&lt;br /&gt;(The above command is for Fedora users. Use hal instead of haldaemon&lt;br /&gt;if you are on Ubuntu)&lt;br /&gt;&lt;br /&gt;Next, restart X Server using the command:&lt;br /&gt;&lt;br /&gt;killall -HUP Xorg&lt;br /&gt;&lt;br /&gt;Once X Server restarts, you should be able to use synclient without&lt;br /&gt;any problems.&lt;br /&gt;&lt;br /&gt;For more information regarding Synaptics Touchpad configuration&lt;br /&gt;and configuring other devices under Xorg, see&lt;br /&gt;http://wiki.ubuntu.com/X/Config/Input&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-586330796217455080?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/586330796217455080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=586330796217455080' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/586330796217455080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/586330796217455080'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2009/02/situation-1.html' title='Setting &quot;SHMConfig&quot; to &quot;true&quot; for synclient to work in recent Linux distros'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-2800387700383351787</id><published>2008-12-05T04:52:00.000-08:00</published><updated>2008-12-05T05:37:26.544-08:00</updated><title type='text'>Hacked an old driver to work under new linux kernels</title><content type='html'>Yesterday, I had to purchase a "PCI to parallel port" multi-I/O card to get the Xilinx Parallel IV cable to work on the Dell machines in our Lab (these PCs did not come with a parallel port, only USBs).&lt;br /&gt;&lt;br /&gt;The card was from EnterMultimedia based on WCH352 chip. I am currently on Ubuntu 8.10 with 2.6.27 kernel. But after connecting the card and rebooting, the card was not detected by Linux. Well, actually it did detect it, but as some serial device for which no driver was found, and I could not find any /dev/lp0 or /dev/parport0. So, I looked into the driver CD that came with it, and found a linux driver (I did not expect to find it though)!&lt;br /&gt;Tried to install it, but it turned out to be trying to use lp.o and parport_pc.o modules, both for old 2.4 linux kernels. No wonder the modules were not found in my system (and would not load even if they were present). To make matters worse, the 'installer' (well, hardly an installer... seemed to me more like a program that acted as some kind of wrapper using lp and parport_pc kernel modules for their work) was a compiled binary file without any source code provided on the CD.&lt;br /&gt;&lt;br /&gt;So, after some head scratching, I decided to open the binary file using vim, and searched for 'parport_pc.o' and 'lp.o'. Found it, and then replaced them with 'parport_pc.ko' and 'lp.ko' respectively. Tried to run the file again, and it promptly responded with a segmentation fault. I had definitely jumbled up the addresses of different instruction in the binary, which the linker had worked hard to setup.&lt;br /&gt;&lt;br /&gt;Then I did two things. First, changed the binary file so that now, 'parport_pc.ko' became 'parprt_pc.ko' and 'lp.ko' became 'l.ko' so that their length became same as their original names in the binary. Second, made a copy of the corresponding modules in my system and renamed them to reflect the new names for the binary file to be able to load them. Then, I ran depmod (I don't think it was required though, but well, did not hurt anyway).&lt;br /&gt;&lt;br /&gt;Now I ran the binary file again, and voila, new devices /dev/lp0, /dev/lp1, /dev/parport0 and /dev/parport1 (dunno how lp1 and parport1 appeared though) have now appeared in my system :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-2800387700383351787?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/2800387700383351787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=2800387700383351787' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/2800387700383351787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/2800387700383351787'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2008/12/hacked-old-driver-to-work-under-new.html' title='Hacked an old driver to work under new linux kernels'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-9060827559839182342</id><published>2008-04-18T06:05:00.000-07:00</published><updated>2008-04-18T20:14:47.917-07:00</updated><title type='text'>Compiled Metacity (from svn) to get drop shadows!</title><content type='html'>&lt;span style="font-size:100%;"&gt;Yesterday I tried compiling metacity downloaded from subversion.&lt;br /&gt;&lt;br /&gt;I read an article (from &lt;span style="font-style: italic;"&gt;epologetics.org&lt;/span&gt;) containing some information on&lt;br /&gt;compiling metacity from subversion. Following it, I first installed the&lt;br /&gt;following packages on my Ubuntu 7.10 (Gutsy) system:&lt;br /&gt;--------&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;sudo apt-get install gnome-common build-essential autoconf gnome-devel libtool&lt;/span&gt;&lt;br /&gt;-------&lt;br /&gt;&lt;br /&gt;Then, I tried to run:&lt;br /&gt;-------&lt;br /&gt;./autogen.sh&lt;br /&gt;-------&lt;br /&gt;which gave some errors about something like 'shift 370: can't shift that many'.&lt;br /&gt;Then I tried reading the autogen.sh file and noted somewhere that I required&lt;br /&gt;automake-1.10. My installed version was 1.9. So I installed 1.10 and tried again.&lt;br /&gt;&lt;br /&gt;This time it progressed much further, but again bailed out while trying to run&lt;br /&gt;aclocal-1.10. The error said something about '/usr/share/aclocal' being an invalid&lt;br /&gt;option. I tried reading up on the aclocal manual page, and found that, to include&lt;br /&gt;a directory of m4 files for aclocal, you need to use the -I option.&lt;br /&gt;Another reading of autogen.sh showed that it was somehow calling gnome-autogen.sh.&lt;br /&gt;Then I tried reading the relevant portion of gnome-autogen.sh where it was calling&lt;br /&gt;aclocal-1.10. Turns out that it was calling aclocal as 'aclocal-1.10 /usr/share/aclocal'.&lt;br /&gt;I tweaked this file a little so that it was now calling aclocal as&lt;br /&gt;'aclocal-1.10 -I /usr/share/aclocal'. After that I again ran ./autogen.sh.&lt;br /&gt;This time ran to completion... also invoking './configure' somehow, which also seemed&lt;br /&gt;to run fine.&lt;br /&gt;&lt;br /&gt;Now I ran 'make' and everything went smoothly. I was able to successfully compile&lt;br /&gt;metacity from subversion on my system. Oh I forgot to mention, I used the enable&lt;br /&gt;compositor option for configuring metacity, and now I get drop shadows in windows&lt;br /&gt;and the gnome panel in metacity... cool :-)&lt;br /&gt;&lt;br /&gt;By the way, I have the feeling that I would not have to do all these tweaking stuff&lt;br /&gt;and everything would have gone smoothly if I had used gnome-common from&lt;br /&gt;subversion (as was mentioned in one of the files I read) instead of the version&lt;br /&gt;available from Ubuntu's gnome-common package.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update: &lt;/span&gt;Just now (19th April, Saturday), I tried doing the same thing on a&lt;br /&gt;different computer (this too, an Ubuntu Gutsy, but this one has access to the&lt;br /&gt;internet and is regularly updated). Here, I did not need to put the '-I' option on the&lt;br /&gt;aclocal line in gnome-autogen.sh file (as mentioned in my original post). In fact,&lt;br /&gt;it gives me an error if I do so. But without that, the thing compiles just fine (with&lt;br /&gt;automake 1.10 installed).&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-9060827559839182342?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/9060827559839182342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=9060827559839182342' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/9060827559839182342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/9060827559839182342'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2008/04/compiled-metacity-from-svn-to-get-drop.html' title='Compiled Metacity (from svn) to get drop shadows!'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-892583778241588164</id><published>2007-12-22T22:59:00.000-08:00</published><updated>2007-12-22T23:09:07.680-08:00</updated><title type='text'></title><content type='html'>I have been using XMonad as my primary window manager for a few weeks now. No problems whatsoever. But today, I felt like playing with Netbeans a little. That's when I discovered that Java applications don't seem to be able to draw their windows on the screen (except the splash screens) when under XMonad. I have seen that under GNOME/Metacity, the same application works fine. So, I googled for a bit and found this: &lt;span style="font-style: italic;"&gt;http://www.haskell.org/pipermail/xmonad/2007-June/001078.html&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;It seems that the problem appears only with apps using the swing toolkit. But the solution is simply to set an environment variable:&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;--------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;export AWT_TOOLKIT=MToolkit&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;--------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Thats all that was required to solve the problem.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-892583778241588164?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/892583778241588164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=892583778241588164' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/892583778241588164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/892583778241588164'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2007/12/i-have-been-using-xmonad-as-my-primary.html' title=''/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-5880971447403994578</id><published>2007-11-09T23:00:00.000-08:00</published><updated>2007-11-09T23:26:34.958-08:00</updated><title type='text'>Manual install of a package and 'pkg-config'</title><content type='html'>&lt;span style="font-size:100%;"&gt;I tried to install the rtorrent package manually. So I downloaded &lt;/span&gt;&lt;span style="font-style: italic;font-size:100%;" &gt;http://libtorrent.rakshasa.no/downloads/rtorrent-0.7.9.tar.gz. &lt;/span&gt;&lt;span style="font-size:100%;"&gt;Now, rtorrent depends on libsigc++, libcurl and libtorrent. The required versions of libsigc++ and libcurl were already installed on my system. I decided to manually install (just for fun) libtorrent. So I downloaded &lt;span style="font-size:100%;"&gt;&lt;span style="font-style: italic;"&gt;http://libtorrent.rakshasa.no/downloads/libtorrent-0.11.9.tar.gz. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next I did the routine "untar, configure, make, make install' cycle on libtorrent (I used the configure option --prefix=$HOME). No problems. When I tried the same on rtorrent, 'configure' complained that libtorrent was not found.&lt;br /&gt;&lt;br /&gt;Well, after some poking around, I found that 'pkg-config' that is used for finding libraries needs the path to a file named &lt;span style="font-style: italic;"&gt;"library_name&lt;/span&gt;.pc" to be added to the environment variable PKG_CONFIG_PATH for it to able to find the library. In my case, libtorrent.pc was in ~/lib/pkgconfig. So, once I added to &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:100%;"&gt;PKG_CONFIG_PATH, rtorrent compiled and installed fine.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-5880971447403994578?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/5880971447403994578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=5880971447403994578' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/5880971447403994578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/5880971447403994578'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2007/11/manual-install-of-package-and-pkg.html' title='Manual install of a package and &apos;pkg-config&apos;'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-7931930696145447518</id><published>2007-11-08T02:16:00.000-08:00</published><updated>2007-11-08T02:36:39.220-08:00</updated><title type='text'>Skipping compiz blacklist check in Ubuntu Gutsy</title><content type='html'>Today, I upgraded one of our Ubuntu boxes at our lab from Feisty to Gutsy. I was expecting to see compiz-fusion in its full glory. But unfortunately, that was not to be.&lt;br /&gt;&lt;br /&gt;Although the upgrade went smoothly. But after the upgrade (followed by a reboot), I found compiz was not enabled by default. So, I manually tried to enable compiz (System -&gt; Preferences -&gt; Appearence -&gt; Visual Effects). But it failed with the message &lt;i&gt;"Blacklisted PCIID '8086:29a2' found". &lt;/i&gt;Turns out that the Intel i965 Video chipset used by our Dell Dimension has been blacklisted by Compiz in Gutsy. Fortunately, fixing this was easy. A little google search turned up the workround.&lt;br /&gt;&lt;br /&gt;Just put the line &lt;span style="font-style: italic;"&gt;"SKIP_CHECKS=yes" &lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;in &lt;span style="font-style: italic;"&gt;~/.config/compiz/compiz-manager &lt;/span&gt;and then tried again. This time it succeeded. (The file 'compiz-manager' and the directory 'compiz' was not there. So I had to create it first).&lt;br /&gt;&lt;br /&gt;Now, compiz is working! From what I read somewhere on the web, I might have problems playing videos with compiz enabled on this machine. But I also read that there is probably a compiz-fusion plugin to solve that problem too (didn't try it yet though)&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-7931930696145447518?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/7931930696145447518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=7931930696145447518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/7931930696145447518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/7931930696145447518'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2007/11/skipping-compiz-blacklist-check-in.html' title='Skipping compiz blacklist check in Ubuntu Gutsy'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-5174507114251574616</id><published>2007-11-02T05:51:00.000-07:00</published><updated>2007-11-02T06:17:13.144-07:00</updated><title type='text'>Worked around a keyboard problem in our lab</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:times new roman;"&gt;Today, I had to work with a broken keyboard where all the &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span style="font-family:courier new;"&gt;Shift+&lt;non-keypad&gt;(non-keypad number) keys  were broken. So, I could not get !@#$%^&amp;amp;*() characters. To work around this problem, I created a ~/.Xmodmap file containing the following. &lt;/non-keypad&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:times new roman;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;-----------------------------------------------------------------------------------&lt;br /&gt;# This maps the keypad number keys so that they generate&lt;br /&gt;# the exclam, at, etc. characters when pressed aong with&lt;br /&gt;# the Shift key. This rectifies a keyboard problem where&lt;br /&gt;# all the Shift+&lt;non-keypad&gt;(non-keypad number) keys were dead!&lt;br /&gt;&lt;br /&gt;keysym KP_1 = KP_1 exclam&lt;br /&gt;keysym KP_2 = KP_2 at&lt;br /&gt;keysym KP_3 = KP_3 numbersign&lt;br /&gt;keysym KP_4 = KP_4 dollar&lt;br /&gt;keysym KP_5 = KP_5 percent&lt;br /&gt;keysym KP_6 = KP_6 asciicircum&lt;br /&gt;keysym KP_7 = KP_7 ampersand&lt;br /&gt;keysym KP_8 = KP_8 asterisk&lt;br /&gt;keysym KP_9 = KP_9 parenleft&lt;br /&gt;keysym KP_0 = KP_0 parenright&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;Now, instead of pressing Shift+2 for the @ character, I have to press Shift+KP_2 produce the @ character.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/non-keypad&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-5174507114251574616?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/5174507114251574616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=5174507114251574616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/5174507114251574616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/5174507114251574616'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2007/11/worked-around-keyboard-problem-in-our.html' title='Worked around a keyboard problem in our lab'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-7880593286749521869</id><published>2007-10-30T07:15:00.000-07:00</published><updated>2007-11-08T02:38:18.473-08:00</updated><title type='text'>Emacs-23 can use great (Xft) fonts too</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-style: italic;font-family:times new roman;" &gt;Check out the following link for details:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:times new roman;" &gt;http://peadrop.com/blog/2007/01/06/pretty-emacs/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Basically you need to do the following if you are using ubuntu feisty like me (there is a repo for gutsy too):&lt;br /&gt;&lt;br /&gt;Add the following lines to your /etc/apt/sources.list:&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;---------------------------------------------------------------&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;deb     http://ppa.launchpad.net/avassalotti/ubuntu feisty main&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;deb-src http://ppa.launchpad.net/avassalotti/ubuntu feisty main&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;---------------------------------------------------------------&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;Then do a "&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;sudo apt-get update&lt;/span&gt;&lt;span style="font-size:100%;"&gt;" followed by&lt;br /&gt;"&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;sudo apt-get install emacs-snapshot emacs-snapshot-el&lt;/span&gt;&lt;span style="font-size:100%;"&gt;"&lt;br /&gt;&lt;br /&gt;This will install the required emacs package.&lt;br /&gt;&lt;br /&gt;Then add the required font line to your ~/.Xresources file. In my case, I wanted to use "Bitstream Vera Sans Mono" at 10 points size. So I appended the following line to my &lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;~/.Xresources &lt;/span&gt;&lt;span style="font-size:100%;"&gt;file:&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;--------------------------------------------&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;Emacs.font: Bitstream Vera Sans Mono-10&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;--------------------------------------------&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;Then in order for this to take effect, I did an&lt;br /&gt;"&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;xrdb -merge ~/.Xresources&lt;/span&gt;&lt;span style="font-size:100%;"&gt;".&lt;br /&gt;&lt;br /&gt;After that I fired up emacs, and lo and behold... the world's&lt;br /&gt;greatest 'editor' now with Xft font support :-)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-7880593286749521869?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/7880593286749521869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=7880593286749521869' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/7880593286749521869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/7880593286749521869'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2007/10/emacs-23-can-use-great-xft-fonts-too.html' title='Emacs-23 can use great (Xft) fonts too'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3426585108368245649.post-5686733067262064411</id><published>2007-10-27T14:10:00.000-07:00</published><updated>2007-10-27T14:22:17.802-07:00</updated><title type='text'>Reason for creating this blog</title><content type='html'>Whenever I have some free time, I play with my Linux box at home. During these fun times, I do some stuff, install cool software, and in the process, often figure out how to do certain things in Linux. But  till now, I never noted down the successfull attempts. So I tend to forget how I did certain things in the past. This blog is an attempt to rectify that situation.&lt;br /&gt;&lt;br /&gt;From now on, I will note down those fun moments here (... maybe even the unsuccessfull ones so that someone reading this might be able to help me out)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3426585108368245649-5686733067262064411?l=santanuchatterjee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://santanuchatterjee.blogspot.com/feeds/5686733067262064411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3426585108368245649&amp;postID=5686733067262064411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/5686733067262064411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3426585108368245649/posts/default/5686733067262064411'/><link rel='alternate' type='text/html' href='http://santanuchatterjee.blogspot.com/2007/10/reason-for-creating-this-blog.html' title='Reason for creating this blog'/><author><name>Santanu Chatterjee</name><uri>http://www.blogger.com/profile/01171841172389842111</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
