I used to be a singer

May 24th, 2008

Back in the olden days when I used to listen to POP and Tamil and Hindi songs, I used to be a singer. People admired me and loved to listen to me.

But as I started to move away to Rock music, I was having a very hard time living up. I didn’t want to sing along in public anymore. Once when I lost control and sang along with my headphones on, a friend pulled my headphone off and told me to “Stop making that noise!”.

Now, after having listened to a considerable amount of Rock and Metal and other similar kinds of music, these are my observations:

  1. In Rock, you don’t sing. You shout.
  2. Rock vocalists or the whites in general work a lot more on voice modulation than we do.
  3. Some of the best Rock songs were created under the influence of LSD or other strong drugs.
  4. Alternative Rock bands (Linkin Park, etc.) suck.
  5. The more you likes Rock, the more you will loathe other forms of music.

Well, I also listen to Carnatic music. I don’t know if that’s normal for Rock fans but Carnatic pleases me too. Now that college is over for me, I wonder what the people I work with like to listen to.

Sharing an Internet Connection between two Ubuntu Computers

May 19th, 2008

If you follow my blog regularly, you would have known that my father has brought a new computer running Ubuntu, and that I have completed my BE degree course and have brought my computer home from college.

At home, we have a broadband Internet connection that we share between the two computers. Here’s how I setup my father’s computer as a gateway for my computer.

Both computers had an inbuilt ethernet port and we bought an extra ethernet card for my father’s computer and use it as an internet gateway. Sharing internet on two windows computers is a very straight forward procedure. You just have to connect the broadband modem to one of the ethernet ports and use additional ethernet ports to connect other computers to the gateway.

In Linux however, this doesn’t work automatically. Port forwarding is disabled by default in Ubuntu. This has to be enabled if the computer should forward packets it recieves to other computers. Here’s how this is done.

On the computer you want to use a gateway

  1. You need to connect the internet cable to eth1 and the client computer to eth0. Since the computer has two network cards, you have to figure out which one is connected to the internet and which one to the other computer. Here’s an easy way to do this
    1. Pull out the cable connecting the two computers
    2. Goto Applications -> Accessories -> Terminal and enter the following command
    3. $ sudo ifconfig

    4. You will be shown 2 or more sections with eth0 and eth1 being the first two. In the two sections, one of them will have a line similar to this:
    5. inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0

    6. The section that has this line is the one connected to the internet. If this is in eth0, remove the internet cable and plug it in the other ethernet port and the cable from the client to eth0. If it is in eth1, you can connect the client cable back to its original port
  2. Next you have to give a static ip address to eth0. In terminal, type
  3. $ sudo gedit /etc/network/interfaces

  4. And add the following lines to the file and save it
  5. auto eth0
    iface eth0 inet static
    address 10.8.16.1
    netmask 255.255.255.0
    broadcast 10.8.16.0
    network 10.8.16.0

  6. This will assign the static ip address 10.8.16.1 to eth0, but these changes take effect only after a reboot. To use these settings temporarily for the current session, use the command
  7. $ sudo ifconfig eth0 10.8.16.1

  8. Once your network card serving the client has a static ip address, the next thing to do would be to enable port forwarding:
    1. Goto terminal and open the local startup script as root. To do this, type
    2. $ sudo gedit /etc/rc.local

    3. Add the following lines before the exit 0 line in the file.
    4. sysctl -w net.ipv4.ip_forward=1
      /sbin/iptables -P FORWARD ACCEPT
      /sbin/iptables --table nat -A POSTROUTING -o eth1 -j MASQUERADE

    5. Before closing the script, make sure it is enabled. See the first line of the script. If it isn’t present already, just add a '-e' to the first line so that it would look like '#!/bin/sh -e'
  9. That’s all you have to do on the server. Just do a restart for the settings to take effect. If that’s not possible, you have to execute all the commands you have added to the rc.local script one by one for all of them to take effect

On the client

  1. Go to System -> Administration -> Network There should be a wired connection. Select it and click ‘properties’. Choose ‘Static IP Address’ in the Configuration list box.
  2. Use 10.8.16.2 as the ip address and set the gateway address to 10.8.16.1
  3. Network manager should give you a subnet mask automatically. You won’t have to change that.

This should be enough. This is what I did. If this doesn’t seem to work, just let me know and I’ll help you out.

P.S. You can use a Windows computer to connect to Internet through the linux gateway too. Nothing needs to be changed on the server. Just make 10.8.16.2 the IP address of the client in LAN Settings which can be found in Network Connections. Also, set 10.8.16.1 as the default network gateway address.

Correcting Errors in Synaptic Package Manager

May 12th, 2008

I don’t know if this happens to everyone often, but I usually screw up the Synaptic Package Manager in my computer very often. Most often, there errors are due to some stupid packages that don’t get installed properly or have some compatibility issues with other installed packages.

The most grave error is this:

sahasranaman@sahasranaman-desktop:~$ sudo apt-get install flock
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package awcommon needs to be reinstalled, but I can’t find an archive for it.

When apt-get or Synaptic Package Manager gives this error, I would always have to reinstall Ubuntu because there is no direct way to correct this. A few days ago, I came across this hack to correct all package related errors in Synaptic Package Manager.

There is a file in Debian based Operating Systems called /var/lib/dpkg/status that stores a list of all installed packages. It is a text file in Human-Readable format. All you have to do is to remove the entry of the software package that is causing trouble from the list. Here’s a step by step procedure that can help you solve the problem:

  • Press Alt + F2 to open the “Run Command” dialog box.
  • In the Run Command dialog box, type gksu gedit /var/lib/dpkg/status and hit Enter.
  • Type your password when asked. This step opens the package list in a text editor.
  • In the text editor, look for the package that is causing the trouble. Press Ctrl + F to find the package that you want to remove
  • Once you find the entry of that particular package, remove it completely.

For example, if I want to remove a package called finger, I start removing from the line

Package: finger

and remove all lines upto the start of the next Package entry.

I’m not sure if this is the best way to solve such problems, because what we actually do here is remove the entry from the list of packages installed without actually uninstalling it, but it does the trick anyway.

Ubuntu - The OS for all Parents

May 12th, 2008

My father bought his first computer a few weeks back. They had given a free Ubuntu 7.10 CD, but had not installed any operating system. My guess is that they hadn’t installed Linux on the computers is that they expected the users to install pirated Windows on purchase. When companies give computers with Windows preinstalled, why can’t they install Ubuntu, which is faster and easier to install?

Anyways, upon my recommendation, my father decided to install Linux. And right now, he’s browsing and listen to Carnatic music on Rhythmbox. And he’s safe online. Nothing can really hurt his computer, he won’t have crashes and so, won’t have to wait for the engineer to come and fix his computer. He thinks Firefox, OpenOffice.org, spell check and stuff are really easy to use, but needs to get used to the cut-copy-paste thingy.

So if your parents are buying a new computer or are having trouble with their Windows installation, I’d suggest that you install an easy to use Linux distro like Ubuntu on their computer. Please don’t try to teach them all things you do to keep viruses away from your windows computer, they’d find learning a new operating system much easier.

The Dead Letter Office

May 8th, 2008

There is one site that gives me goosebumps whenever I visit it. The Dead Letter Office. You should visit it too. Here are two of the letters I like the most: 1 2

Its a collection of letters written from the point of view of dead people. Several of them are very inspirational. Its like dead people telling you how to live life. Its really appealing. There is this general belief among Hindus that dead people would always want the best for those alive. And that’s exactly what you see in this site.

You can add your own letters too. I’m in the middle of writing one, but I guess I’ll just keep it anonymous.

College days

May 7th, 2008

My four years at National Engineering College has come to an end. My final semester exams ended yesterday and I packed up my stuff from hostel and came home.

Four years back when I had finished schooling, I had managed to score an engineering entrance cut-off of only 226 out of 300. I should have done better but I was bored of physics and chemistry. (Chemistry was the first paper in which I got an arrear at college. :D ) Since I was from the Forward Community and looking for a seat in Computer Science and Engineering, I knew Anna University Counseling was not going to help me find a decent college.

My father had plans to get me a management seat in Mepco Schlenk Engineering College, Sivakasi but they said they couldn’t take me because my marks were too low. We finally went to National Engineering College for a management seat in Computer Science and Engineering, but we were too late for that. All seats were filled and only a few seats in Electronics and Instrumentation Engineering were remaining.

I don’t know how I managed to say yes right away when my father asked me if I wanted to take it. I could have taken a CSE seat in some other smaller college, but I went for EIE. And I guess that’s the best decision I have ever made in my life. College taught me a lot of new things (well, atleast there were quite a few good books in the library and I had time to read).

Though I can’t say I made the best out of the what college had to offer, college is where I got started with several things, a few of which are Blogging, Linux, Rock music, Embedded systems, Cryptography and ofcourse Instrumentation and Process control. My department had the best staff in the entire college and my class was the best and most fun loving class in the entire college. Well, I don’t have too many good memories from first and second years. I remember wanting to just get out of the hell, but right now, I can’t explain how much I miss the place and the people.

Daily tests are the one thing about which I disobeyed my staff the most, but I don’t regret it because I know that if I had spent every evening studying for the next day’s test, I wouldn’t have been able to find time for all the stuff I have learned. I hope they understand atleast now.

My only prayer now is that the days ahead are at least half as good.

We have created a mailing list for out class and I hope all of us stay in touch and meet often. I also have plans to give back a lot to the college, but I don’t want to disclose any of that right now.

I have a few more weeks to join work at Accel Animation Studios and I have planned to read Salman Rushdie’s The Moor’s Last Sigh. I managed to find a copy at a second hand book store here. And I also have to improve my animation skills during this break.

After all this activity, having nothing to do for weeks together is bound to make me sick, I know. I want the future to come right now. I can’t wait.