Wednesday, December 16, 2009

Winning Cygwin ....

During my initial days at Wipro, I used to see lots of people in my team using Cygwin. I was a fresher back then in IT industry and also I spent most of the time during my engineering working on our friendly easy to use, Windows. So I felt this cygwin stuff is only for "advanced programmers". Being a fresher most of the times I was learning things fast, but only the things that are taught, but was a lousy self learner. On top of that So, I just stayed away from that.But still I had it installed in my system to open few Motif applications strictly for project reasons and no personal interests. Putty was my best friend then, still now it is. Two years passed by and my friendship with putty grew stronger and stronger. Now its just part n parcel of my life.


But after Wipro, suddenly my inner Comp Engg woke up .. ya it took a really long time abt 2 years. It made me do experiments, ask questions(most of them silly) and li'l bit of careless attitude. After joining NSN, I got some platform to continue my experiments. And I got reminded of my days in wipro when I used to see my colleagues working on cygwin and me on dull putty. And thats how the conquest starts ...

To my luck I found cygwin already installed on my desktop. Cygwin comes with a default window manager i.e twm .Its very light but not attractive at all, you will start hating cygwin once you see that. Then I gave a search for various window managers for cygwin. I came across this link .
http://xwinman.org/others.php
It has this big list of Windowmanagers that one can try out. From my faint memory of Wipro, I recollected that it was WindowMaker that everybody was using. That was it , I went to http://www.windowmaker.info/ and downloaded the latest source(gzip). Cygwin also by default has another window manager, xwin. So, I was using it until I downloaded the source of WindowMaker.I was careful as it was the first time I was extracting a source and trying to build it.I extracted the source code and was ready to build it. But everyting I give "./configure" it failed giving an error "as not found" so I thought c++/g++ is not installed properly. So, wht I do is I download cygwin again and install it again, and then I found some people do not have admin rights to install any softwares. And supervisors are skeptic to provide the privileges to new joinees as though they will blow up the organization using admin rights. Whatever, I just suppressed my conquest for more resources(admin rights).

Eight months passed and I was still enjoying putty. Then on a lucky day my Dell360 crashed. Actually it was expected to crash as another colleague of mine had already faced it. And the IT guy is asking me "what the hell were you doing with the system?? " :-). And then I got even more luckier when that backup system that I got also crashed, and there were no backup desktops for me. Finally my manager had to request for a laptop. Ya, this is how I got my laptop. And the best part is all laptops have need to have admin privileges.


Then bammm I installed cygwin will all the packages, necessary unnecessary. Then started the installation of Windowmaker. As I had the source I configured as usual and after hit "make" it went nicely for some time, then suddenly I see a scary compilation error. Though I can solve compilation error in code written by me but I had never faced compilation error in such kind of 3rd party code. Ok, the error said something like "undefined reference to __Xsetlocale" . Ok without wasting any time I copied the error and put in google with reference to Windowmaker. And to my luck there was thi sguy who had also faced the same problem and solved it .Its just a matter of changing the inclusion X11/Xlocale.h to locale.h in the files that were reporting errors.Cooool.

Now next step is to install it, so I gave "make install", so it installed the required libraries and binaries in required locations. I went ahead to make it start whenever I start cygwin. For that I had to edit /etc/X11/xinit/xinitrc file and add "wmaker&" at the end of file. Alternatively startxwin.bat file can be edited, but for me because of some paranormal forces it was not working out, so I made peace with it. So, I am proud to present my cygwin desktop running WindowMaker, and its just the beginning.