< March 2006 >
SuMoTuWeThFrSa
    1 2 3 4
5 6 7 8 91011
12131415161718
19202122232425
262728293031 
Tue, 21 Mar 2006:

This is not an admission that's going to cost me much - I love xterms. If you peek into my desktop at any random time, you'll find a bunch of xterms all ssh-ed into different boxes. And you'd notice one thing, they are all black and with green text scrolling down it. For some Matrix fans here, that'd sound like the only way to watch compiling code scroll by. Other than the nostalgic rush of blinking green monochrome monitors, there is a more pragmatic reason behind this. I just find it easier to read green than white text - it seems to have more contrast than white on black, as strange as that might sound.

So all my xterms are green on black, but that's because the shortcut configured spawns them with xterm -fg green -bg black. But I've got a few scripts which spawn xterms in a loop and I really didn't want to pass these args there directly. Before I go deep into xterm land, let me explain why exactly you'd need that.

APACHE_CHILDREN=`ps fax | grep "\_ /usr/sbin/httpd" | cut -f 2 -d' '`

for pid in $APACHE_CHILDREN;  do
    xterm -e "gdb --pid=$pid -x c.gdb" &
done

That is what I use to debug multiple apache children for APC. It is a pretty straight forward script, except that I run it on different boxes. Now, I want to make the background and foreground colour configured per user+box rather than hard-code it in a script. The man page has absolutely no information on this particular subject - merely mentions that /usr/lib/X11/app-defaults/XTerm-color is where the system wide configuration lives.

A further read through shows that all such X resources defined can be overriden using ~/.Xdefaults file. But that didn't work. This is exactly where users stop and developers continue probing. One of my favourite tools for finding configuration files read by an app is strace.

[gopal@phoenix ~]$ strace -e open xterm 2>&1 | grep "gopal"
open("/home/gopal/.Xauthority", O_RDONLY) = 4
open("/home/gopal/.Xdefaults-phoenix", O_RDONLY) = -1 ENOENT
....

So in this version of xterm, the code hits the ~/.Xdefaults-hostname file to pick up the configuration values and then it all pretty much fell into place - here's what that file had to contain.

*VT100*foreground: green
*VT100*background: black

Now, to go and play around with a few more interesting xterm configuration parameters - *saveLines and *VT100.utf8Fonts.font. I'm probably reinventing a lot of wheels and documentation here, but as long as it is fun ...

--
He is a man capable of turning any colour into grey.
               -- John LeCarre

posted at: 18:44 | path: /hacks | permalink | Tags: ,

The organization of FOSS @ NITC surprised me, compared to what I'd seen at other similar conferences. Compared to what went on at GNUnify, these guys are a lot more decentralized in organization and had quite a feel of a student run tech fest. I hardly saw any faculty running around, except for Amarjeet. The faculty was more of facilitiating the event rather than running the event and their pulls on the event was not quite obvious, if any. Quite heartening indeed from my point of view.

When we stopped the narrative last, I'd just reached NIT. We were put up in an AC room in the guesthouse on campus, with carpeting. After a cold bath and basic dressing, we headed out into the canteen for breakfast. Sadly, no appams or idiyappams were on the menu. After a strong coffee inside, we headed out towards the auditorium which was already fairly packed.

Fox2mike was delayed at the station and Pradeepto got the first slot of the day for the mere fact that he'd got there the day before. While pradeepto was trying to teach these kids how to use Qt and KDevelop, I was sitting outside with Premshree and his cousin building pnet on a borrowed laptop. It wasn't a very warm day, but the humidity was uncomfortable for someone from Bangalore. Despite the fact that I was sweating like a pig, I got the builds and presentation functional before I actually walked into the hall to talk.

My presentation had barely any technical content at all. It was basically about the history of dotgnu and how a few basic things in it are built. All that mixed with a few of the interesting incidents that all FOSS projects invariable end up having. People from various places just helping and keeping the project ahead of the curve - that kind of thing.

After that, we sort of hung around the corridors while fox2mike was preaching gentoo from up on the stage. I think except for a few ya maga or something like that at ti22, the rest of it was all in English. Out in the corridor, we got to see premshree talk to his cousin in malayalam. To put it mildly, if I hadn't laughed I'd have choked.

There were students from everywhere - I even found a group who had come all the way up from Trivandrum to attend this event. During lunch, I met a couple of CS students from my college. The point to be noted is that Trivandrum is further away from Calicut than Bangalore is.

After all that, we were treated with bluesmoon's Creative Commons talk. It basically had the flickr creative commons movie and a few walkthroughs in the creativecommons.org. Of course, the moves were amusing if not outrightly funny.

After that, there was a delay while the quake demos were being setup. We spent that time doing a sort of BoF with questions and a bit of interactive demo'ing. We did a bunch of stuff that was basically eyecandy, but made a good impact with the crowd. Shreyas demo'd out his collection of firefox extensions, including the one that makes those tabs come out in pretty colours. Bluesmoon played around with some of his javascript code and dragged around a few divs in a few pages. We all did our extra bit demos till the next presentation was ready.

Basically, that's where the first day at the conference ended. Then we all rushed off to the beach to see the sunset and basically loosen up. And loosen up I did. I'll write about it later, so let's head onto the next day of the conference.

day 2: I woke up late on Sunday and reached the conference centre late. Premshree had already finished his talks and Kalyan's talk was in progress when I walked in. Quite near to where I was sitting, I found a guy from chengannur engineering college trying to break through the cyber-roam security system in the crowd. He has got a fair idea of how MAC address spoofing works now.

Coming back to Kallu's demos, I have never talked on stage about exploiting any system, especially among a crowd of enthusiastic kids. I've sort of tried to stay away from the l33t h4x0r image as far as possible. Considering that was how I came into the world of FOSS, it maybe ironic that I do not actually want these new kids on the block to take that path. The temptation to stray is too high and the opportunities to exploit are higher than it was in 1999. You can happily talk about buffer overflows and cracking binaries, but actually breaking a website when you're in the same legal jurisdiction is just stupid. I'm afraid some kids might actually try some of these tricks, despite being told Kids, don't try this at home. I don't want the guilt of having spoiled some kid's career because he tried to copy my stunts online. So what Kalyan showed at NITC, viz breaking rediff.com's payment system, sort of left me uneasy. But as someone remarked rather sarcastically, if everyone wrote secure code, Kallu would be out of business.

Fox2mike was breaking the college's keyword restriction on the keyword babes using ssh and there were people who were quite interested in knowing how. My answer to all of them is man ssh has enough info - read, learn, understand and use.

We were planning to demo Kororaa which is a live CD based on Gentoo which includes XGL and all associated eye candy. To download that, we went to the college CS labs - there were Fedora login screens as far as you could see. And then the debian workshop started.

And finally, it was time for the day's last talk - Shreyas' FOSS foundry. That was basically a sort of rush through of why you should be helping FOSS and why people aren't already. He made the mistake of asking the audience what he should do and I am almost reflexively replied Dance. Anyway, his talk was basically about Something, something and everything, not to forget the zen of something something. Basically, the idea was to show these kids what they could actually do to get started - report bugs, write docs etc. After all, if it isn't fun, it isn't worth doing.

We borrowed one of the student's souped up boxes and went through a bunch of reboot cycles of Kororaa with increasing amounts of RAM till it worked smoothly. We basically stripped all nearby machines of their RAM to get this one box upto smoking fast and silk smooth operation. On that, we demo'd XGL and all the compiz features we could. It took quite some effort to actually drag ti22 away from the box to give the rest of the audience a chance to even try the basic bits.

After that and a quick awards ceremony we all split up and went on our seperate ways. Our bus was at 9:15 and it was only 5:40 at that point. We spent the rest of the time playing basketball and watching the sunset. We had dinner (idiyappams and ishtu) and headed out on the bus.

--
People who go to conferences to talk are the ones who shouldn't.

posted at: 12:23 | path: /conferences | permalink | Tags: ,

I am not the most organized traveller around, but this time it wasn't my fault that the plans were a mess. When shres and me planned out a trip to Calicut, it involved a day time drive through Wayanad and two extra days for the drives. But what came to be was a final and hasty booking on an AC bus from madiwala. We can take the rough with the smooth and we were prepared for a rough trip. We had got the seats 27 and 28, which are right above the rear tyres of the bus. If that wasn't enough someone else had already booked those seats from Kalasipalayam due to some mixup with the ticketing. We got the seats re-allocated to 21-22. But the guys who had got ours weren't really particular about sitting anywhere and we managed to hold on to the seats.

Shreyas slept on, while I was listening to Zeppelin and singing along. And at around 2 AM, the bus broke down. There was some problem with shifting gears and the guy managed to drag it to a nearby hotel. When I walked into the hotel, I was surprised to find someone sitting at the far end in a Yahoo! T-shirt. It turned out to be Jemshad, who was headed for Lakshadweep. We had tea and went our seperate ways, forever more.

In an hour, another bus coming in the opposite direction was flagged down and we swapped buses. By about 4 AM, we hit the ghat section of the road. Intially till we got to Muthanga, the road was pretty flat and minor gradients round the hills. After we got into Wayanad for real, the hairpins started. At around 5, we started our descent from the hills and towards kalpatta.

Because of our delays, we saw the hills of wayanad in the light of the rising sun. The camera had almost run out of batteries and the road was very bumpy - half the photos I took of the dawn are blurry and wavy lines of sun. But the hills looked ethereal in the morning mists. The curves of mist around the foothills, the bright glow of the sun behind the big ones - so beautiful.

We had a bit of early morning confusion about where we were supposed to get down. Since both our phones were unreachable, by the time I got into coverage, there was a huge number of SMS messages about where we are and all that. We were told that we could get down at Kunnamangalam, which around 8 Kms away from the NIT. I called up the reception party about that, who first said "no, come straight to calicut" and called back to check if we could get down there after we were about 2-3 kms beyond the circle. Finally, we got to Palayam, where they picked up us and took us about the same way we came for 20kms to get back to the NIT.

The time - quarter to nine.

--
When you ascend the hill of prosperity may you not meet a friend.
                                                                -- Mark Twain

posted at: 09:03 | path: /travels | permalink | Tags: ,