WiFi issues on Ubuntu 12.04

Hey ,

Recently installed ubuntu 12.04 on a fresh and clean system. While it works like a charm, a very irritating issue was that the inbuilt wireless card was not working. The ethernet connection using wire worked fine. Googled a lot and wasnt able to figure things out. Finally, backports saved my day. Here is the procedure I followed incase someone finds it useful.


Installing backports:

sudo apt-get install  linux-backports-modules-cw-3.8-precise-generic 

Some generic headers and libraries:

sudo apt-get install linux-headers-generic build-essential

Download this file and extract it at a location of your choice.
Navigate to the extracted directory using terminal and try:

make defconfig-ath9k
sudo make install

Reboot the system and ideally wireless should work!

Hope it helps.

Guake – Annoying feature of renaming tabs

I am a huge fan of guake terminal and after having used it for quite a while, I am literally addicted to it.

Recently, I encountered a very annoying feature which is when I rename a tab and perform any operation on that tab, the name I gave disappears and the absolute path is shown.

This was very painful because I am used to work with multiple tabs open and naming helps navigation.

After some googling, I found a solution which I present below.

Install gconf-editor.

sudo apt-get install gconf-editor

Start gcong-editor


Browse to apps/general/guake/general.

On the right hand side, uncheck the “use_vte_titles” item and close it and restart guake.

All tabs would be named “Terminal” and renaming would preserve it.

The technical reason for doing this is the following piece of code:

def on_terminal_title_changed(self, vte, box):
    use_them = self.client.get_bool(KEY("/general/use_vte_titles"))
    if not use_them:
    page = self.notebook.page_num(box)

As we can see ‘use_vte_titles' key prevents the autorenaming feature

Hope this helps and enjoy using guake.

I have a question !!!

I of-course know the fact how unfortunate I am. It is something I do not think I can change. Its a quality I have , like my blood group !  Cannot do anything about it.  Do I regret it ? …

I clearly remember the precise moment when I realized the exact nature of of my misfortune. I was told the unfortunate news in front of the world ! Ofcourse, its my humble duty and desire to inform the user that world for me at that time was the class I was studying in. Admitted in a reputed university, I was merry making in the cold weather of this glorious and wonderful city.The lecture hall location in the university, I promise were built by a student as the view was impeccably astounding. Breathtaking I must say ! The glorious mountains stood on one side of the building and on the other side, was a vast and deep ocean. As enigmatic was its nature, it was mystifying. Who knew , what ,lies beneath the deep fathoms of the water body. I was wondering , the same thing as how the mountains must have risen and these enigma of the ocean , we see everyday ,created.

On this precise moment, a stern, knowledgeable  voice fell on my ear. He asked “Do you agree?” . As human instincts are, and more on work here were the student instincts and I gave the most obvious answer “yes…ofcourse sir”, fearful, that if I said otherwise, I have to answer many more questions !

But as brilliant these highly developed , all knowing beings called “teachers” are , they , like the elves , know whats in the subjects mind. So, this voice (more sarcastic than stern now), enquired in a very curious tone, “why so ?”( I wish teachers saw some movies, they would know how to act curious !). Having no clue what to say,I found myself doing the most polite and thinking voice acting I can  , and saying “because the book says so”. I think I mist have surpassed “tom and jerry” in making my audience laugh their hearts out ! I suddenly found myself, in the vast and luxurious office of the man having the stern voice and heard him “son , you are a good guy. But unfortunately, I do not find you curious for knowledge. To gain knowledge, one has to ask questions. Never take anything at face value. Ask whether what the author says, makes sense ?”. I was inspired ! I truly was. And that moment, in that office, I was a changed man ! I was a inquisitive person now.

I went home. Like my habit of many years, I started watching cartoon(yes, i love them!) and to my delight, tom and jerry was being aired. I , usually laughed and had a great time watching this show , till today. I asked myself, can a cat fly an aeroplane ? Can a mouse build a bed of matchstick ? Holy crap! Can a mouse and cat walk on 2 legs and smile and own flats ? Can there be a city where cats stay in hotels ? Frankly, It made no sense and I switched it off ! Worst meal in years for me !!!

I ofcourse had no intention of reading my favorite books as I had anticipated the questions my newly reformed, inquisitive brain would ask. Superman, how is the discovery of a planet possible. Aliens with super powers ,  na, current science does not approve of it. Similar cases with Batman, arabian nights and all other books and stories I loved ! Even the great Tolkien was not able to answer my questions like how can a wizard live forever and where are the hobbits now.

So, I thought about watching some movies. I saw some “philosophically heavy” movies. I had assumed that atleast Shakespeare wont disappoint  me. But alas! Richard , the third, never provides the answer to as how can a mother hate her own child, however he is. How can a hump back impress a beautiful lady and how the hell he can do his corrupt things without anyone knowing ?

Atlast, I went to my granny. I told her, I cannot sleep and tell me a story , as you did when I was a child, so I can sleep. She readily started,”once upon a time, there was a king”. I stopped and asked her, who was this king, where was he born,  where and how many years he reigned , how many queens she had, how was the political situation in his kingdom ? Needless to say, I was thrown out of the room !

Next day, I  was in the class of the same stern voiced “teacher”. He was teaching us mathematics and I interrupted him as asked “why is the number one written as 1 ?”. I can clearly see his puzzled face (with linearly growing anger and irritation!). But I never got an answer.

Years have passed since and I have never got an answer to any of the above question. But I have the answer to one thing. Sometimes, not asking question and believing the person is helpful and enjoyable. We all enjoy the fairy tales and cartoons without asking questions. Try asking and see how it ruins the show !

I personally think, knowledge is not about knowing the right answer but the is about believing. Understanding. Asking questions and gaining answer will only add to information we have. Believing the thing and enjoying it will give us happiness, enjoyment, satisfaction. Knowing this is what knowledge is. We often confuse knowledge with curiosity and feel , if all our questions are answered, I will be knowledgeable.

Sometimes, the most knowledgeable are the ones who know nothing !


Resetting a Database in Heroku application

Recently I faced an issue when  I wanted to delete an existing database in an application deployed in heroku and create a new one.

I tried using

heroku run rake db:drop


I got an error saying “USER does not have connect privilidges”

The way to solve it is

heroku pg:psql

This logs in to your database and then type:

drop schema public cascade;
create schema public;

After this exit the prompt and type:

heroku rake db:migrate:reset

Hope it helps.


Editing a form in nested_form gem

This is a very very naive and simple thing but I quite lost my time on this so I thought might be helpful.

Recently I was using the ‘nested_form’ gem by the great Ryan Bates (https://github.com/ryanb/nested_form). The form to create a new form works like a real gem without any effort.

Now, when I clicked on ‘edit’ link, it created some issues as the nested models didnt come.

I had a simple thing like each question has many answers. When I created a question, I added 5 answers to it but when I edited the question, no answers were visible.

The simple solution for this would be that the <% f.fields_for :answers do |an| %> line in your form would be without an equal to sign so just add it.

Thus, it looks like

<%= f.fields_for :answers do |an| %>

Thats all and it works like a charm!

Hope it helps.

Install apache web server and passenger on Ubuntu 11.04(Natty)

I just Installed apache and passenger on Ubuntu 11.04 to run and deploy my ruby on rails applications Passenger is a gem and can work with apache as well as nginx…

The reason for choosing apache is that its an industry standard.

Also one thing I did with apache was created virtual hosts and ran my apps on local machine with domains like http://www.application1.com

In this post I will list the steps I followed in order to setup apache web server and passenger.

Here is my stack:

  •  Ubuntu 11.04
  •  ruby 1.9.2 via rvm
  •  rubygems 1.8.10

I will be using rails 3.1.10(lastest this morning).!!

So lets start !!

  • Install rvm

To install rvm just type the following in the terminal(ctrl+alt+t)

 user$ bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )

You can find more information about rvm on Here

  • Install ruby via rvm

Once rvm is installed you can install the latest or desired version of ruby by typing the following in terminal

rvm install 1.9.2

This will install ruby 1.9.2 on your system.

More information on how to make it your default ruby is available on here

  • Install rails.

just need to do

gem install rails

  • Install passenger

just do

gem install passenger

  • Install apache web server.

To install apache web server type:

sudo apt-get install apache2 apache2-mpm-prefork apache2-prefork-dev
  • Install passenger apache module.

Once this is done, we must install passenger , an apache module thats hepls us to rub rails apps on apache.

sudo passenger-install-apache2-module
  • Configure.

Finally everything is done.

When you run the passenger apache module, there would be some instructions that installer will give you.

The last thing it will tell is to paste some text in apache configuration file

The configuration file is located at /etc/apache2/apache2.conf

Now once this is done, we are ready to deploy.

This has a lot of information about deploying.

In my next post, I will show how to start rails apps on local machine with apache.

Hope it helps.!

A candid interview with Society !!

It feels so great !!! Amitabh bachchan in Hindi movies or clint eastwood in the 70s and 80s revolting against a society !!!

Wow, I hope I can be such a hero too ! Speak dialogues in front of an idol like vijay or fire a gun like eastwood does !!

Was it only the greatness of Salim-Javed and sergio leone( not related to sunny leone i presume!!) or we need such rebellions ??

I think like our economy , our society and our value system is at an all time low !!! We are  in midst of a moral recession.

Look in the mirror ! What are we doing ? Where are we headed ? Whats our objective ? whats with us ?? This is what I felt.

So, I decided to take an interview of the society on four basic factions of life. Childhood, youth, parents and old age. Here are the views of society on these factions in a summary:

We first talk about childhood. O ! childhood is an age of innocence. It is that period of life when everything is so beautiful. What are your views ?

O yes, child hood is a great phase of life. Probably the greatest. Now, what I do with childhood is very simple. For me , childhood is not a phase, to enjoy, childhood is a phase where I can impart value system in that small brain , or thats what people call that first floor of humans. I impart the knowledge like we believe in only a particular god. The choice of god varies depending on my wish. If I am Christian, I say, jesus is the true god and others are not. If I am a hindu, I say Shiv or Krishna is a true god nothing else. If I am islamic, I say Allah is path to salvation and nothing else. So I impart this invaluable knowledge to them. See, I am doing this for them . I am training them to fight for rest of their lives. If this is not taught, how will they fight ? What will they do ? Then I also somehow manage to convince them that the scriptures are very very true. They are very literal and you have to believe in miracles. That actually easy as they do not much about science at that time and to tell you a secret, I also tell them that of they ever ask me a question, they will be punished !! Isnt it cool ?  Then, I send them to school ! There I give information and tell them that this is knowledge. Those poor little beings believe it !! They actually think school and college is a place where they get knowledge. This is a greatest failure of knowledge isnt it ?? (hehe). Then when they say they have gained knowledge , I ask, how do I know. Prove it by getting good grades in the exams. Memory is the path way of knowledge for them and this I think is a very innovative idea by me. This is imparted in the human brain and is executed through out. Humans, stupid humans actually believe that intelligence is knowing things. In IO test, they ask some questions regarding who was who and who did what and when etc ! And they test their intelligence !!! (Hahahahahahha). Anyways, then is gradually expose them to outside world. I show them movies, give them books etc. I show them shows like “mahabharat” or “jesus story” and tell them television is true. But this has a side effect, when they see things like “original sin”, “ma mere” or “munni badnam” and “sheila jawan”, I scold them. I say thats not what you should learn. Though I allow the makers to make it and elders to watch it, but not for children.Some say what is does is confuses a childs mind, but I say, no, the only rule is follow my rules without question !! Thus, in childhood, I impart qualities like competition, rivalry, winning spirit and also gifts. I give gifts when you are successful and punish when you fail !!!

Then comes youth. Another good phase. Human at his/her prime in the life. Full of energy and enthusiam ! What about it.?

Well, yes, youth is a good stage. Its a good platform to teach advanced things now. Now, in this stage, I introduce them to money. I give them money but  not the permission to spend it. So, they are confused. Then I tell them whats good and whats bad without reasoning ! I say, drugs are bad. Not why are they bad. Ofcourse, as god has made humans curious , they wanna know why are drugs bad and hence consume it. Thats it, as soon as they consume it, I proclaim them as sinners. I punish them and I isolate them. The result, they take more drugs. And computer scientists thought recursion is their invention !!! Then for someone who has escaped this devious and brilliant plot, I surely trap them in marriage. See, I am a humanitarian, I allow you to love. But, as usual, the catch is you cant marry the person you love. There are things like cast and creed that I have to take care of. And then, I fill the human mind with the root cause of all troubles. “Expectations”. I teach them to expect from the person they wanna marry.I teach them:

We are the invincible ones. We are the most popular ones.Each and everyone needs us you see.But ofcourse, we are also humans and we have our requirements. We look into some basic qualities in our partner. Common, they are not very difficult. We are good people you see. All we expect is that the partner should be good looking. Have a good figure/physique. They should have style you see. We need it as when we introduce them to our friends, our style and status should be maintained. He/she should know how to behave in a 5 star hotel and  should know how to speak in english full of accent, How to drink wine and how to hold hands and dance in a party. He/she should like my friends and appreciate my habits. Even If I smoke, He/she should not. Even If I flirt with someone else, he/she should be faithful. Even if I do not give a damn about my parents, he/she should. Even If I courier her/him a gift, he she should be happy ! Thats all we ask for. Nothing more. And ya, ofcourse, they should not be married before. You see we need “fresh” people. And ofcourse, I many cultures, marrying a divorcee or widow is a crime. And kinda Post script: Their fathers must be rich. They should be able to fulfill our dreams ! I dream of buying a car and since I am a divine being, he should full-fill it as a duty !! Thats all, see how nice we are !!

See, isnt it good ?? Isnt it correct ?? I know I am a master, I can make it from your expression kid !!!

Then comes parenthood. gift of god! A birth of human life. How do you deal with that.

I start by seeing them cry. They cry when in the hospital, they hear the crying of the baby. But, for me , its an important phase. I start early. I say, if the baby is a girl, then you ought to cry you idiot ! How can you do this. Girls , I somehow manage to convince the people , are not creation of god. The idiots believe me.  They know their mother is a girl still in many times and cultures I have convinced man to kill girl !! I love it.  But I do not stop there.  Then there is a simple course for parents. Thats actually a result of what I thought in childhood. Rivalry, competition etc. Now the concepts are applied to children. The average guy is always told “learn from your brother/sister”. Isnt it ?? Now, I dont see anything wrong in it ! Ofcourse, studies and grades are everything ! People not good at studies or those who do not get good grades should understand that they have a responsibilities toward their parents ! What will their parents say to the relatives and neighbours ?? What do they talk if you do not top or you do not win a trophy on your sports day ??  ow will they say ” see this is my sons certificate” with a proud laugh on their face and a hidden feeling a achievement as the relatives son stood second !! Guys , we have to understand that world war 3 is all parallel ! Each house and family has its own version of world war 3 !!! Common, you cant be average !!   But what do we actually learn in school, college ? Its just information anyways. Knowledge is long lost when we used memory to test intelligence. How great of me that we expect our students to understand information !! One may ask how do you understand that a flight AI-103 is going from Bombay to London !! Isnt it same as teacher after teaching a chapter on Gandhi asks “Understood ” ???? Today I care more about translation of gita rather than understanding it !!

Then comes old age ! Probably the most difficult phase of life.

All traditions and religions in the world say we should respect our elders ! So I do. We make better old age homes ! I give them better facilities. I give them a garden to have an evening walk with those artistic looking sticks I gave them as birthday present and those arthritis inflicted legs which nature gave them. I give them library. Books to read with those armani glasses I  gave them and those eyes that cant see clearly which nature gave them. I give them cozy beds and heaters or Air conditioner so they can sleep properly forgetting that only closing eyes is not sleeping. I give them smart phones to stay in touch ! So they can contact us when in need ! Knowing that those shaking hands cannot dial or remember the number !! We give them good medical facilities so they do not feel any pain. I give them medicines  as their blood pressure increases when going to a doctor. They say, they need their children. Are they mad ? They are  busy ,they have a meeting to attend otherwise their company would go bankrupt. they have their car to be serviced,  they have wine to be purchased, they have extra language classes to attend, they have gym to go , they have to go to the temple or church for worship ! They are  so so busy! common, tell oldies to handle themselves. And then they say, all we need is your smile and I say, na I cant, I have to mourn for a train accident victim you see !. All they ask is can you spend one hour on a sunday and I say no,I have to go for mass and feed the homeless !! The old people must understand, I dont have time for their stupid emotions. I will talk to you only if the talking helps my bank balance in any way ! I do this much for them , be content with what you get. You get free money. What else do you need ??

Mr. Society, Arent you afraid of god ?

God ? Hahaha, tell me whats god? How did you came to know about the concept of god ? Its through me child. I created god. And god, where is he ? Can he do anything ? I am the one who stays with you everyday, every minute !! I am the one with you, always. I have been with you for ages and I will be with you forever. I am a parasite which eats you, which consumes you and you do not have a medicine for me. You cannot harm me. You cant live without me you see. After all, you are a social animal !!!

The Mayans said that world will end in 2012. While factually incorrect, I suppose they understood the parasite I am talking about.

A cancer, my interviewer friend kills you. I on the other hand give you life. Its true that I have now grown so so strong that living with a parasite like me is more difficult than getting killed by a cancer !!

Fixing Ubuntu GPG BADSIG error

Recently, I faced a error while updating my Ubuntu system.

When I ran “sudo apt-get update”,

it gave me the followinf error message:


W: GPG error: http://archive.canonical.com intrepid Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key


The way I fixed it was:


$ sudo -i

# apt-get clean

# cd /var/lib/apt

# mv lists lists.old

# mkdir -p lists/partial

# apt-get clean

# apt-get update


Hope it helps. !!

Changing the text color of your Icons on Desktop in Ubuntu

Recently. I encountered a weird requirement.

I had changes my background image to a white colored image due to which the text on the icons was not visible.

Thus I wanted to change the text color of the icons on Desktop to black.

It turns out that is fairly simple.

Here are the steps :

Go to


NOTE: I use the radiance theme and hence this path. In case you are using a different theme, replace “Radiance” with your theme name.

Here open a file called as “nautilus.css” in a simple text editor.

Somewhere near line 8-10 , there is a desktop mode where you can make your changes.

Find the line


Instead of removing it, comment this out and below that, copy the same line and use the hex code of the color you want to use.

For example, in my case it looks like:


Not a big deal but hope it helps !!