Archive for April, 2008
Ramayanapedia, based on a W(alm)iki!
http://krishashok.wordpress.com/2008/01/10/ramayanapedia/
Krishashok’s is probably the most entertaining blog I’ve come across till date. Thanks Prasanna, for the introduction.
1 comment April 28, 2008
Farewell treat by Varun and KMap
We have two major FOSS icons of IIT Madras leaving the institute this year – Varun Hiremath, going to become an MTech in Aerospace Engg, Debian Developer, Contributor to Jajuk, going to Cornell; and Kumar Appaiah, going to become an MTech in Electrical Engg, Debian Developer, Contributor to SciPy etc, going to University of Texas at Austin.
We demanded a treat! A wonderful treat it was, indeed. [Thanks a lot Varun, Kumar!]
Group photo after we came back to our campus:

Everyone wore a “Linux” T-Shirt to the treat, except for Prakash, who woke up just then and came in a hurry.
4 comments April 26, 2008
How I started Kontributing!
I used to love programming in dirty non-standard C++ using Borland’s Turbo C++ IDE v3.0 on MS-DOS. I ‘wasted’ much of my time during my high school (and college, to some extent) on trying to build a GUI “library” for MS-DOS, which could do command buttons, checkboxes, menus, blah blah blah. (While this taught me some OOP concepts, and some debugging skills, I was trying to reinvent the wheel. I don’t think it was worth spending so much time on it, now, but I was a FOSSn00b at that point of time.)
I wanted to develop, for no productive reasons, a Sky atlas software for MS-DOS. So I decided to use KStars’ catalogs. I downloaded the KStars source and tried to understand how to use these catalogs. I also borrowed the RADectoXY conversion from KStars. While looking through the code, I saw that the KStars code was so beautifully written, so well encapsulated, that I decided that there was absolutely no point in re-inventing the wheel, and decided to join the KStars project and try to kontribute.
So I wrote out a mail to Jason Harris, author of KStars, saying that I’m an amateur astronomer who was inspired into the same by KStars, know some C++, and want to try and kontribute in my own small way. Jason said that I could try picking out bugs, try fixing small bugs, and asked me to join the kstars-devel at kde dot org mailing list. After some bug-finding, bug-fixing, I sent in my first patch.
Sometimes, the desire to improve software that I use (“Why does that software have this feature, while this software that I use does not?” for instance) drives me to contribute. I did something for mcabber because gajim had a gajim-remote but mcabber did not (unfortunately, it is not working now
– example of bad code). I think that’s what happened with KStars, although I don’t remember clearly. KStars lacked the star depth offered by Cartes du Ciel, and the amount of information about DSOs, or accuracy in magnitudes was more in other software. That’s where I decided to jump in.
Add comment April 22, 2008
What does my Desktop look like?
I ran Xnest to test KDE 4 (devel), after a fresh update and rebuild yesternight. Here’s what I got:

Add comment April 18, 2008
KSConjunct – Konjunctions for KStars – Backends
Finally, the code to predict conjunctions is complete and de-bugged. The bug that took so much time to resolve was that I hadn’t called m_Earth -> findPosition(…), i.e. I was trying to compute Geocentric positions of planets without updating the position of the Earth! This swatted, and another bug with LST swatted, the code now works (hopefully).
The code, along with can be found here for the time being. This is the first ‘feature’ I’ve written for KStars, after quite a few small bugfixes that I kontributed so far. It wasn’t as tough as I thought it was!
The frontend still needs to be done, and I don’t know when I’ll find time for that. Currently, it is an open request to all who are enthu about kontributing to help write the interface.
The approaching end semester examinations call for a halt to all other activities, and this might (or might not be, if I’m too tempted to blog about something) be the last blog post for a few days to come.
Add comment April 17, 2008
DBus for MCabber
I desperately wanted this, so I coded it over a night. Comment on this post if you want a tarball.
Now I can set the mcabber status to the current playing track from mocp using a script.
2 comments April 14, 2008
IIT Madras “Server” Uptimes
Several years ago, my opinion of a ’server’ was a computer with amazing hardware (that of a fairly affordable workstation 4 years from now) that would open up a black and white terminal with some completely ununderstandable prompt. By my 11th standard, I could ‘understand’ what that prompt meant, after sufficient experience with the pseudo tty’s in Linux. But I still was under the misconception that a server was a computer with amazing hardware. Soon I realised that my system could become a server! All it needed to do was run a daemon that did some job and could accept connections over the network. So a ’server’ was some system, with enough resources for catering to the demands of all clients, running a daemon, with amazingly tight security and huge uptimes of the order of years.
However, my entry into IIT Madras further required a redifinition of server. A ’server’ is defined as follows:
A server, is a machine with amazing hardware resources and no matter how amazing – exploited in all possible ways by the student community, with the most well known security holes left unpatched (because they are never updated
), and with uptimes less than that of the average workstation in the hostel zone.
What do the uptimes of these ’servers’ look like? Let’s see a few examples:
- The Central Web Server: 11 days
- The “Updated” Central Web Server: 22 days – This one is called ‘updated’ because it has PHP5, while the central web server is still on some ancient version of PHP4. It runs CentOS kernel 2.6.18-8.el5 (which is well known to be susceptible to the Local Root Exploit, if it has vmsplice or whatever enabled.)
- The Institute Mail Server (smail.iitm.ac.in – so called because it runs squirrel mail): Probably about 3 days. This server manages the institute’s email updates. Important email including those from The Dean Students, IIT Madras to the students are sent to email accounts on this server. All the students of the institute use this server for institute-related email as well. Interestingly, ftp.iitm.ac.in, the local Debian / Ubuntu / Kernel mirror’s harddisk is on this server – so down goes the repository, used India-wide, every 3 days
- The Students’ Server (students.iitm.ac.in) – This one has a whoopingly high uptime of 450+ days. And why? It is student managed!!
- The Physics Dept. DCF server: Now it is 142 days, but earlier, this one had been up for about an year in the recent past. And why? No CC-interference. Managed by Physics Dept. – and that too by brilliant research scholars and professors. Runs CentOS release 4.3, 2.6.9-34 : Looks safe. Atleast here, your mail to the professor about why the server should be updated, if it needs to be, will be well received and not marked as spam.
- Random Workstation in the DCF: 8 days now, was 46 days once upon a time. This one’s one of my favourite comps there. Has TWM, runs Fedora and NOT Ubuntu
. This is a workstation, so I don’t care if it is not updated. - My Computer: 15 days. Better than the Central Web ‘Server’. I run a web server with a lot of shared stuff, so I like to keep this thing on. I try to save power by putting off my monitor, but not a good idea. I have just been lazy to put it on auto hibernate at 1:00 AM and auto wake-up at 7:00 AM. Apparently, the institute spends a whole fortune on power for the hostels, just because of comps like mine
– More worse, some people leave their monitors on. This one runs Debian (testing), but still is on a vulnerable, outdated kernel
(Lazy to update, despite friends threatening to try the local root exploit – because only good friends have logins.)
Interestingly, I find ‘corporate’ web ’servers’ with similar uptimes. 6 days 11:00 hours on this server I have access to. It runs Debian 3.1 but its load is overwhelming with load averages above 9. I wonder how the processor hasn’t gotten fried as yet. Kernel = 2.4.32 – hopefully safe.
6 comments April 13, 2008
Spam Filtering for Jabber?
I am frequently pained when Isomeone asks me a technical question on Jabber. I’d want to redirect them to the IRC channel #iitm-linux but I feel “obliged” to respond, and I hate to hide. So, I wanted some filtering, just like I have procmail for mail filtering, for Jabber chats as well – that way, I’ll be blissfully ignorant of unwanted messages.
So I hacked the MCabber source to introduce a programmable filter that any messages are passed through, before they flash my bulb. The modified files in the src directory of the mcabber tarball on the MCabber site are available here temporarily.
Just create an executable ~/.mcabber/filter and chmod it to atleast u+rx to get the filter working.
The filter can accept four command line args – The JID of the sender, The resource of the sender, The Message, and The Type of Message (as defined by MCabber) and must output the processed message to stdout. If the filter outputs nothing, then no message is displayed.
I’ve done something extremely dumb: I could’ve piped the message into stdin, instead of putting it as a command line argument. Most of my time went into trying to escape the quotes in the message, encountering lot of dumb bugs – I could’ve saved on that. Late realisation.
Anyway, will fix that in future. There are many more interesting things to left to do – like passing the current status into the filter, so that you can vary the action of the filter depending on whether you’re away, busy or available, and hacking MCabber to get DBus support and writing a MCabber Remote to create programmable autoresponders!
Add comment April 12, 2008
Poetry in Segfaults
[o]
DEBUG: nqoutes = 1sh: -c: line 0: unexpected EOF while looking for matching `”
sh: -c: line 1: syntax error: unexpected end of file
DEBUG: nqoutes = 0DEBUG: Escaped string = Viola! In view a humble vaudevillian veteran,
cast vicariously as both victim and villain
by the vicissitudes of fate.
This visage, no mere veneer of vanity,
is it vestige of the vox populi, now vacant, vanished.
However, this valorous visitation of a by-gone
vexation, stands vivified, and has vowed to
vanquish these venal and virulent vermin
vanguarding vice and vouchsafing the violently vicious
and voracious violation of volition.
The only verdict is vengeance; a vendetta,
held as a votive, not in vain, for the value
and veracity of such shall one day
vindicate the vigilant and the virtuous.
Verily, this vichyssoise of verbiage veers
most verbosei.tiASegmentation fault
—
That’s a segfault which I encountered while trying to hack mcabber to put a programmable filter. This thing happened to be my friend’s status message on Jabber, and I had some bug that was not terminating strings appropriately with a during some copy operation!
Add comment April 11, 2008