A “wasted” evening !

Yesterday I completed a long pending task. Something that I’d wanted to do for a very long time but never had the need, nor the compulsion to do it.

Over the past couple of days my router had been exhibiting DNS resolution issues. DNS resolution is the process of translating a URL like google.com to an ip address which a computer can understand.

This DNS resolution happens at multiple places:

1. Your internet service provider (ISP) has a DNS server. Which is like a constantly updating online table. Which maps URLs to ip addresses.

2. Your router (wifi modem) has another piece of software which stores (caches) the URL to ip mappings that the DNS server returns, so that it can get you to the URL faster.

3. Your computer (laptop or desktop) has software that caches the URL, ip mappings as well.

To identify the source of the problem I first connected the Ethernet cable that my ISP provides directly to my computer. All the URLs openednup fine. So the problem was not with my ISP’s DNS server. So problem with #1 is ruled out.
Some of you might not be able to follow this step signce your ISP gives you internet via a telephone cable which needs to go through a modem to connect to a computer.

Next, I cleared the DNS cache on my Mac (the command to do that is : dscacheutil -flushcache;sudo killall -HUP mDNSResponder) and tried to traceroute google.com , no change in latency. So, the only problem could be the DNS cache on my router.

So, I tried rebooting my router, Resetting it to factory settings, Flashing the latest firmware, to no avail.

Now, I had the motive, the will and the need to change the firmware of my router to dd-wrt. The open source router firmware running the latest linux kernel #superAwesome. After a couple of minutes of flashing the firmware and couple more to configure the settings I had the router working as new again !

Dd-wrt brings along with it, a bunch of goodies ! But that’s something I’ll leave for the dd-wrt website to explain.

Until next time ….

[1] http://dd-wrt.com/site/content/about


My Own Activity Logger Application.

Having been constantly coxed by my father to log whatever i do , i have been using sticky notes from KDE project forsome time now. But i have a habit of messing around with my installation and managed to screw up my box. And inturn i lost all my logs. 😦 so  i decided  to write a Portable Activity Logging Application. Working through yesterday evening i have come up with this , it comes with the Netbeans Project Folder in case you want to modify it. If you happen to modify it OR have a suggestion , please leave a comment to this post.

The Application JAR file. ( Needs Java Runtime Environment to run).

NTFSFIX a life saving command !

I had a dual boot linux + XP for which i had a huge NTFS partition of about 170GB to store my backup data, ebooks, project details, STAR TREK episodes , songs etc.Then having fixed my 5.1 audio problem ( which was the only reason i still had XP hanging around) in linux, i completely removed the XP partition, just yesterday, i thought of installing windows again because we are learning assembly language at college and our teachers insist we use only MASM ( an archaic microsoft assembler) so i thought of installing WIN2K as that was all i needed, in 2K’s partition menu i created the partition and just as i was going to hit enter, the Dreaded BLUE SCREEN came up and that was the start of all my problems.

Having thought, i had made some mistake i came back to linux to check if my data was ok .But then i realized  that the backup drive wouldnt mount, after having gone through a lot of misery (trying out Chkdsk /f) etc & having to battle the thought of losing my data ,I checked up the NTFSFIX command for the

error “$MFTMirr does not match $MFT” and using the syntax:

$ ntfsfix (path of the partition eg. /dev/sda4)

and wala !! it ( the partition ) started working again !

Hope this short essay of mine helps you.

Also, never loose heart when all odds are against you.

Kunal Ghosh


Please tune in for my next article on Practical Source Code Management

I have currently learnt the use of source code management and am using SVN for my CFF (Code For Freedom) Project which is related to creating a GUI for their Distro Constructor Application to create custom spin offs of openSOLARIS 2008.11 if you are wondering what openSOLARIS is !! head  to www.opensolaris.com for more info.

Its got some pretty cool features too !! I can bet you wouldn’t have seen those features before !

IDEs in LINUX the good bad and the not so ugly !!


Well in undergraduate college courses we all are taught to write programs in C/C++ etc we all are very happy and enthusiastic about it but little do we know about the stark realities of real word programming !!
the TURBO C++ IDE used in most colleges and homes by students is though easy ( if i may call it so :)) to learn doesn’t teach us good project management skills. I know that project management skill like code reuse , splitting the code into many files etc can be done even in this IDE but the point is that it doesn’t enforce it !!

So let me point out a few popular IDEs

(i will not feature CODE::BLOCKS as i myself have not used it fellow developers are welcome to leave comments about the use of CODE::BLOCKS IDE)

that are available to students using linux

( i am a staunch supporter of linux )


it is a very simple IDE and IDEAL for beginners if you are using UBUNTU you’ll most probably find it in the repositories.

NOTE: it does not have a debugger built in.And has very elementary project management features.

to compile a sample C code

/*————hello world.c————–*/

#include <stdio.h>

int main()


printf(“Hello, World !!\n”);




step 1.click on File->New

step 2.replace all the text with the code given above.

step 3.save the file

step 4.click Build->compile (it should not give any errors)

step 5.click Build->build (it should not give any errors)

step 6.click Build->execute.

Voila !! there you have your output.

Note: incase you are using math.h header file

goto build->set includes & arguments

and change the compile entry to gcc -Wall -c -lm “%f”

and build entry to gcc -Wall -lm “%f”


It is a very mature and stable and useful and …. IDE ideal for many practical uses but for now i will explain only how to write and compile a sample C code

1.click on File->New->project


3.Project Type select “Generic” under the C tab.

4.give a relevant project name (***without spaces***) and forward

5.destination :select the path of an empty folder.


7.in the files sidebar select “src”->”main.c”

8.you are by default given a sample hello world program

9.click on Build->compile


11.Build->execute program.

you should be able to see the “Hello world” output in a seperate window

NOTE:in case you are using the math.h header file

in files sidebar select “src”->MakeFile

in that replace the entry on the 86th line

“CPP = gcc -E” with “CPP = gcc -E -lm”

and save the makefile you may need to change the g++

entries if you are using c++ to code.

I am leaving KDEVELOP and NETBEANS for you to practice on.

incase this article of mine has been of any use to you please leave a message.

(you could help me monitarily by taking a survey by clicking the add snippet at the bottom right

when you make an account i will be credited with 1.25USD)

regards and Best of Luck

kunal ghosh


having a tough time adopting LINUX for my C programming :(

I accept the fact that linux is a brilliant and a very promising platform for every day use ! but I often find it very hard to use it for my elementary C programming needs . I use UBUNTU 8.04 and gcc for compiling my C programs.Also I do understand the fact that GCC is not giving me problems ( which many people donot understand ;-P) it is the header files. I am used to many outdated header files like CONIO.H and DOS.H , Graphics.H and ironically it is still being taught in college 😦 . Surfing around the web got me some solutions and a set of new problems 😦 (what the heck !!)

1.Use ncurses.h instead of conio.h for most of my needs i.e getch() etc !

2.Dos.h is obsolete because it was for single user OS and is not suitable for an Multiuser, Multiprocessing OS like LINUX.

3.Graphics.h is obsolete and we are encouraged to use GTK and other APIs for graphics programming which are far more capalbe.


1.well not as many as solutions but i cannot find ncurses.h in my installation CAN ANYBODY PLEASE HELP ME OUT WITH THIS !!

well that was my “SUKH DUKH ki BATEIN” and hope i get some solutions to them.

IF you happen to have any solutions please leave entries at my guest book

well i also found this article to be a bit of help 🙂


Article on AMD/ATI Drivers installation in openSUSE 10.3

The link below is a brilliant article which i have personally implemented in my openSUSE 10.3 distribution. follow this article word by word and you will definitely get your computer’s graphics card to run beautifully


NOTE: Please note that the initial 1 click installer did not work for me i had ATI integrated MB graphics card not a HD one so if you fall in my category please skip the 1st 1-click install and read onwards.

kunal ghosh


openSUSE10.3 got back it’s voice !!

for the past few weeks i had tried installing realted HD audio drivers in openSUSE10.3 x86_64. Tried downloading and installing many drivers from the realtek site but ended up uninstalling the sound drivers of ALSA(default) so mw and my SUSE had to lead a mute life after a lot of struggling i found out that i just needed a simple suse update that did the trick for me but still i can’t get my 5.1 channel speaker set to work.

by kunalghosh

(kunal ghosh)