Firefox download getting stuck. ‘wget’ to the rescue!

The firefox download manager has been giving me quite a headache whenever I try to do big downloads. Even if it is a 70MB download, after 25 or so MB, it gets stuck. Then I have to pause and hit continue for the download to proceed again. It so happens that many times an error occurs and I can’t continue the download from where it got stuck and I have to download the whole thing again… and again… and again…

Ha! But I’m not to be trifled with. Not as long as ‘wget’ is there! ‘wget’ is a GNU free software package that is used for retrieving files over the web. If you have got it installed, then all you have to do is to get the download link and use wget to download it.

In order to get the download link, right click on whichever download you want in the firefox download manager. There will be an option ‘copy download link’. Click on it.

Then open a terminal and go to whichever folder you want the file downloaded to. Assuming it is in the Desktop, type the following command at the prompt:

haris@asylum:~/Desktop$ wget <paste the download link>

Now even if it gets stuck in the middle, you can resume from wherever it was interrupted by giving the option ‘-c’ to ‘wget’. That is, the command will be like

haris@asylum:~/Desktop$ wget -c <paste the download link>

And there it continues beautifully.


A surprising blood test.

I was new in town and wasn’t accustomed to the way of life there. I was getting along fine. Making friends, talking with strangers and getting to know them and all.

However, one unfortunate day, I got the flu. My body temperature began to rise and I happened to consult a nearby doctor. He prescribed a tablet temporarily and told me to get my blood tested.

Fine. A medical laboratory was within the vicinity and I went there with the doctor’s prescription.

It was a small lab. Entering into it, the reception desk was to the left and there was a settee for the patients to wait on the right. Someone was already sitting there and I shared the seat with him.

I expected a nurse to come out from the room within with a needle and a rubber tube in her hand in order to take my blood. But waiting for about ten minutes, no nurse came. Instead, the door opened and a tall and handsome man came into the waiting area. He was quite tall, dressed in a long black coat just like the ones that were wore by the old British royal families. A graceful scent came flowing from him and everything suddenly seemed much more joyful. It was as if there was nothing more to worry about now that he was there even though he was a complete stranger to me.

He had a warm smile on his face which made me feel comfortable. It was reassuring that everything was fine. With that smile on his face, he slowly came near me, laid his hand on my shoulder and sat beside me. I was really honored that a person like him would take the time to notice me.

“You have come to have your blood tested son?”, he asked with an air of self-importance.

“Umm.. Yes kind sir. I have come for that.”, I replied.

The smile on his face widened and I turned my face to look at the door expecting a nurse to come at any moment now.

At that moment, I was vaguely aware of a slight warmth on my neck. I realized that it was his breath. But why? I asked myself. I dare not turn and cross a man like him. I sat like a statue staring at the door itself.

His breath came nearer and nearer and then all of a sudden, “ARGH!”, I screamed!

He bit my neck!

I jumped up in disgust and stared at him. He was sitting there calmly gargling something in his mouth. I looked at the other person sitting there and he was engrossed in the magazine that he was going through. I did not know what to do.

After rinsing for a while, he took out a test tube from his coat pocket and spat into it. There was half a test tube of blood!

“Please take a seat son. I’ll give you the results in a few moments.”, he said.

I was in a trance. I sat down looking at him. He gave me a sponge and made my hand hold it where he had bitten. He went over to the reception and took a pen and paper.

He took a small sip from the test tube and after a few questioning looks and a bit of gargling, swallowed it. He wrote something down on the paper. He repeated this process until he had emptied the entire test tube.

Finally he folded the paper in which he had jotted down a lot of stuff and handed it over to me. “Here you go son. You’re fine. Just a slight fever. It’ll pass soon. Go and show it to the doctor. See you.”

With that, he went back into the room. I was thunderstruck at the whole ordeal and could not decide what to do. What in the world had just happened? I had no clue. I just had to make myself believe that this was how things worked out over there. I walked out of the lab holding the piece of paper the handsome man had given me free of charge.

Vampires taking courses?

Seems like I still have a lot of catching up to do in this new life of mine.

Configuring wireless (Wi-Fi) on Debian squeeze.

Before beginning the post, I would like to convey my gratitude to Ershad who has been there for me whenever I was in need of assistance.


It so happened that one fine day I decided to do my entire main project in the Debian distro. As if to motivate me, Debian came out with their latest release 6.0, squeeze, just then itself. So I decided to go with it.

I downloaded the CD-ROM iso from this site and made a bootable flash with it. I installed it in my netbook in the middle of which it fetched about 1120 packages from the net (which inhibited all my work for almost three long hours) and installed them. I hadn’t created the ‘root’ account deciding to use ‘sudo’ for administrative privileges whenever I needed them.

The installation was successful and I booted into it. Everything was fine. There stood the bluetooth applet proudly in the notification area alongside whom stood the network manager applet displaying the message ‘wired connection auto eth0 active’. Life was good.

Happily when I was just about to retire back to my room, I pulled out the Ethernet cable. And to my dismay I noted that the internet was disconnected. That is, the Wi-Fi connectivity was not there.

I tried left clicking on the applet and it did not show any wireless reception. I realized that my system was not detecting the presence of my modem’s wireless signal in the vicinity. The problem? Wireless not working in Debian 6.0, squeeze.

I had feeling that the trail I was about to blaze was going to be long and hard.


What was the first thing to do? Google for the problem, of course. All the sites that I referred to told me to install the package ‘wireless-tools’ before going any further. Well, I went ahead and installed it.

sudo apt-get install wireless-tools

It installed peacefully. I remembered that there was a command called ‘iwconfig’ within this package. So just to try out what it did, I typed in ‘iw’ and pressed tab for the tab completion. Nothing happened.


I typed the entire thing in as ‘iwconfig’ and hit enter. I was greeted with a friendly message.

bash: iwconfig: command not found


Okay, so the package was not installed? I had no clue. Just to try it, I typed in ‘ifconfig’ and hit enter whose output was no more helpful than a banana peel.

bash: ifconfig: command not found

So where the heck were these packages?? Being as irritated as I was, I don’t know why, but I craved for more power and accessed my root account with ‘sudo -i’. Ha! And then in that flow I simply just typed in ‘iw’ and tried tab completion and viola! There it was! ‘ifconfig’ was there too.

Debian really doesn’t appreciate its local ignorant users tinkering with super cool tools I guess. After that moment onwards, everything that I did was as root.

However, I really was sitting without any clue so as to what to do next. But then I noticed that Ershad was online by this time. We entered into a casual chat me mocking his status message in gtalk. His status was, ” ‘Reboot’ has the magical power of fixing issues sometimes 😉 “. Although in my case, ‘suspend’ was a magician too. However, after a while, I presented my problem to him.

He asked me which was my wlan hardware. I, being the genius that I am, had no clue what he was talking about. He told me to run the following command.

dmesg | grep -i wireless

Its output was:

[ 13.312354] eth1: Broadcom BCM4315 802.11 Hybrid Wireless Controller

Ah! So there it was. My wlan device was Broadcom and its model number was BCM4315. He mentioned that Broadcom needed proprietary drivers in order to work. He also mentioned that Broadcom had gone open source lately and its drivers were available in the latest Linux kernel releases. The article regarding that is here.

So I had two options. One, to fix the wireless issue by installing the driver and playing with the wireless tools. Second, by updating my kernel by downloading and compiling the latest stable version.

The second option sounded too much fun. But if doing that fixed the wireless issue, I thought that it would deny me the chance of learning what all would happen in manually trying to fix the wireless issue by itself. So I promised I would compile the kernel separately after fixing my wireless and thus decided to go with my option numero uno.


I googled for a way to install the Broadcom drivers and found quite a good description in this page. I had to add a non free repo to my Debian repository. So by accessing my /etc/apt/sources.list file, I added the following line to it.

deb squeeze main contrib non-free

Mind you, I am doing everything in root. After saving the file, I ran:

apt-get update

and then installed the package that I required by doing:

apt-get install firmware-brcm80211 

The installation finished successfully. And since the driver is a part of the kernel, you needed to load it into the kernel. For that we do:

modprobe -r brcm80211 ; modprobe brcm80211

Alright. I was good to go. But wasn’t that too easy? Yes it was. And as such, something was bound to go wrong and guess what? It did! Nothing had changed except that I had wasted a huge amount of my time. So what went wrong?

An obvious fact that my device was BCM4315 and not brcm80211! Oh how silly I was!

THE CORRECT DRIVER (or chauffeur?)

I was narrowing down to the point where my answer lay. I could feel that the end was near. Googling for BCM4315 drivers, I found the site here. The names of the drivers that the BCM43xx series wanted was given there. And I, in all the happiness, went and installed the first one.

apt-get install firmware-b43-installer

It started to work. Yes! Was I done? Oh no… Of course not. The installation showed an error. And the line that caught my eye was:

Not supported low-power chip with PCI id 14e4:4315!

Whoa! They had mentioned something about the PCI id not being sufficient enough to identify the chipset. And that itself caused the problem. So I followed the next link they had provided and reached here.

I learned a few things over here. One was that the PCI id was a pair of hexadecimal numbers just like the one that we saw above. (14e4:4315). The first four indicated the vendor and the last four indicated the device. But I hadn’t figured this out then. It was after I did the following command that I understood it.

lspci -vnn | grep 14e4

Its output was:

02:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)
    Subsystem: Broadcom Corporation Device [14e4:04b5]

And there in the first square brackets was the PCI id. It was the same one as earlier. The following table lists whether mine is supported or not.  (I have italicized and made bold my PCI id in the table). And the table says mine is supported.

PCI-ID Supported? Chip ID Modes PHY version Alternative
14e4:0576 no BCM43224 ? ? wl (aka STA)
14e4:4301 yes (b43legacy) BCM4301 b B
14e4:4306 yes (b43legacy) BCM4306/2 b/g G
14e4:4307 yes BCM4306/3 b/g G
14e4:4311 yes BCM4311 b/g G wl
14e4:4312 yes BCM4311 a/b/g G (r8) wl
14e4:4313 not tested BCM4311 a ? wl
14e4:4315 yes (2.6.33+) BCM4312 b/g LP (r1) wl
14e4:4318 yes BCM4318 b/g G (r7)
14e4:4319 yes BCM4318 a/b/g G
14e4:4320 yes (b43legacy) BCM4306/2 b/g G
14e4:4320 yes BCM4306/3 ? ?
14e4:4320 (USB) no (USB device) BCM4320 a/g ? rndis_wlan
14e4:4321 partially in 2.6.39+ BCM4321 ? N (r2)
14e4:4322 no BCM4322 b/g/n N (r4)
14e4:4323 (USB) no (USB device) BCM4323 a/b/g/n ? ndiswrapper
14e4:4324 yes (b43legacy) BCM4306 ? G (r1/2)
14e4:4325 not tested BCM4306 ? ?
14e4:4328 partially in 2.6.39+ BCM4321 b/g/n N (r2) wl
14e4:4329 partially in 2.6.39+ BCM4321 b/g/n N (r1) wl/brcm80211
14e4:432a not tested BCM4321 ? N wl
14e4:432b partially in 2.6.39+ BCM4322 ? N (r4) wl
14e4:432c not tested BCM4322 ? N wl
14e4:432d not tested BCM4322 ? N wl
14e4:4331 no (WIP) BCM4331 ? HT (r1)
14e4:4353 yes (3.1+) BCM43224 a/b/g/n N (r6) wl/brcm80211
14e4:4357 yes (3.1+) BCM43225 a/b/g/n? N (r6) wl/brcm80211
14e4:4358 not tested BCM43227 ? ? wl
14e4:4359 not tested BCM43228 ? ? wl
14e4:435a not tested ? ? ? wl
14e4:4727 no BCM4313 b/g/n LCN (r1) wl/brcm80211
14e4:5354 not tested ? b/g LP
14e4:a99d not tested BCM43421? ? ? wl

Now what? Mine is supported so what do I do? I again went back to the site from where I had mentioned earlier I had installed the first command shown. And there, a careful reading revealed to me that it was the second one that I had to install and I did:

apt-get install firmware-b43-lpphy-installer

Thank goodness! The installation was completed successfully. And in order load the driver into the kernel, I did

modprobe b43

modprobe b43legacy

Alright the drivers were loaded nice and smooth. But there remained the task of actually getting our good old wireless device up and running. And as for that matter, what we have to do, quite literally, is:

ifconfig wlan0 up

Viola! I was done! Was I? Yes I was! Left-clicking on the network manager applet now showed my modem’s Wi-Fi signal! But when clicking it, nothing happened. It was then that I remembered the magic Ershad had taught me. Reboot!

I rebooted my system and here I am blogging from my room while my modem is sitting way far away in the hall.

It was a day well spent. 🙂

32 or 64 bit? The magic of pointers.

Thinking and talking about the issue of whether my OS is 32-bit or a 64-bit one, I found out there were many ways to know that. But we discuss none of them over here. Here we discuss a cool way in order to find it out.

We all know about pointers in C right? It points to a memory location. That is it holds an address whose contents maybe dereferenced using the ‘*’ operator. There I already said it! The pointer stores an address.

But what is the size of an address? And who determines it?

That is where the matter of 32 and 64 bit comes in. A 32-bit OS means that its addresses are of size 32-bits and it can address upto 2^32 memory locations. As such, a maximum of 4GB. In a previous post of mine, I have mentioned the fact of the file system FAT32 not supporting files larger than 4GB. It is because that file system uses 32-bit addressing.

But our concern is with the OS. The OS determines the addressing and as such, a 32-bit OS allocates 32 bits to a pointer whereas a 64-bit OS allocates 64 bits to a pointer.

We can exploit this allocation to find out if the OS running on our system is 32 or 64 bit. For that, we write a small C code as follows:


int main(){

     int *p;

     printf(“Size is : %d\n”, sizeof(p));

     return 0;


Compile the code using gcc as:

gcc filename.c

And run it as:


See what number you get as your output. If it is 4, your OS is 32-bit and if it 8, your OS is 64-bit. This is because the 4 and 8 are shown in bytes.

I was hoping to get a way of knowing what my system’s architecture is. But this method can only recognize the OS and not the system.

Happy hacking!

An unusual paragraph.

What is so unusual about this paragraph? It is so fairly obvious that you wouldn’t know it at your first try. So what must you do? Right! Try again and again without giving up at all. Go through it again and you will find out what is that much amazing about this paragraph. Just sit vigilantly and scan through top to bottom staring at all of this and it shall dawn upon you. You might not gain any cool information or so going through this, but all in all, this paragraph has a shock to part. You might think what I am upto by making you go through this crap, but mark my words, at last coming to know what fact lay so plainly in front of you, will probably kill you. Frankly, if you had Batman’s instincts, you could by now sit back and sip a cup of your most tasty drink. I stop now. If you still got nothing as a solution, do drop a mail. May your skills grow always.

Etsuko’s picnic. (In the memory of August 6th, 1945)

“Tomorrow we’re going on a picnic!”, thought the 4-year-old Etsuko in excitement hugging her teddy.

Etsuko was the only child of the Shimizu couple. A beautiful child who was the world of her mom and dad. It was almost time for starting her school education. But her mom wanted her near for an year more to give her all her love all the time.

She would wake up in the mornings and be with her mom while watering the garden. She had even planted a sapling which was bearing leaves. Her first experience of a new life coming into existence on God’s Green Earth. But little did she knew how easily one could be taken away as well.

She was aware of her mom and dad discussing something that day. “Grown-up matters”, she thought and she continued playing with her doll house. She was aware that something she couldn’t understand was going on out there. A child’s curiousness took her doubts to her dad who consoled her saying that it was picnic time in their country and everyone was busy going on picnic in huge planes. That was satisfying enough for her and she was thrilled that they were going on one the very next day.

She saw her mom and dad packing. She retired for the day and fell asleep listening to her dad reciting her a poem…

The next day she woke up early only to find that her mom and dad were already up and walking about. She waited for a while hoping that her mom would go to water the garden. But she did not come to her disappointment. So she decided to water the sapling on her own and went out with the watering kettle into the garden.

She heard a few unusual cries from strange birds. She stroke the new leaf gently watering at its root with care. She sat and looked up at the flying planes wondering where she would be going today. She thought of the new and strange place that would greet her and how she would take care of her sapling if she was to go there. She arrived at the conclusion that mom must have already thought about it. Its a thought all of us have. You don’t get to be mom and dad unless you can fix everything.

It was five minutes past eight. They already had breakfast and she noticed a bit of anxiety on both of their faces. Her mom agreed that she had asked their neighbor to take care of the sapling while they were away.

Etsuko went out to bid good bye to her sapling.

It was past eight thirty…

She bent down, sat on her knees, held the newly sprouted leaf and went close to kiss it.

Suddenly she felt a rumble, something like a quake. It was natural to have slight quake now and then and she was not alarmed. But the thundering sound that accompanied the quake made her freeze.

“Etsuko!!!”, she heard her dad shouting.

She looked back at her home. She saw her dad running towards her. Her mom was behind him. She started to stand up to run towards them. Her body rose and her limbs started to move…

But the flash came.

She saw her dad and mom falling down choking and screaming. She tried to shout but found that no voice came. She fell… And the last thing that she saw was the leaf burning away.


In the memory of all the innocent people who died with dreams just like us on that unfortunate day on which ‘little boy’ was dropped on Hiroshima at 8:45am.

August 6th. Hiroshima day.

Cloud – A menace? The future of cloud computing.

If you still haven’t figured out the new look and personality (not to mention existence) of the word that used to refer to the beautiful white, sponge like stuff hanging high above your heads since the day of your birth, then you are yet to welcome a new caretaker into your lives.

Cloud computing – the buzz word these days. Everything is being taken over to the Internet. And getting that to be the maximum is what the cloud does.

The idea is just like renting space to do your work. You don’t need to worry about the infrastructure at all. You just pay the money and say you need this much memory, hard disk space, processor power and so on along with other software services that you might need like compilers and text editors. Once you’ve paid, you’ll be given all this whose maintenance will be their responsibility and you just need to concentrate only on your work, which will be simply writing code mostly.

However, something here scares me very much personally. You can visualize the cloud like a huge building where everything is available. All you have to do is to ask for a place in it, thereby which they will allocate a small portion of the building for you, walk in through the front door and do your stuff. You’re not the only one who is going to be availing this facility. So thousands and millions of people (or rather renters) are going to be there side by side with you.

Now what scares me is this. What happens if they close the front door?

People, cloud is where a few people will cluster together and provide all the services that we need. All our works, personal informations, everything will be out there with some others. What if ‘they’ decide to take over the world? It will be the end of the world as we know it. Is this a plan for 2012? Lot of questions and zero answers. Only time will tell.

I feel the whole situation like Sauron waiting for the Ring and instead of trying to destroy it, all of us are desperately trying to get it back to him.