Saturday, September 1, 2007, 03:34 PM - Technology
Today as I start my Netotto blog, I thank all open-source software contributers, to start with, with Alexander Palmo, the author of the Simple PHP Blog. This blog wouldn't have made it live so soon without his contribution. I will talk more about Netotto and Simple PHP Blog sometime later.
Talking and thinking of open source software, I was wondering the other day -- "Which is the one open source software which has helped me the most?", filtering the Mama of all Open source, Linux. I was specifically thinking of applications and tools.
I, like most software developers, use a lot of open-source tools/applications, and take these freebies for granted. Coming to think of it hard, they have made life easier for me so many times. They helped me earn my bread and butter too.
So, which is my favorite? Cygwin.
Yes Cygwin.
When I entered the IT industry as a software developer 7 years back, I was working on UNIX for the first 3.5 years. College was also all UNIX. Windows was only for checking emails, playing games and chatting (IM). When it comes to work, I was quite afraid of windows.
After three years, when I changed my job, they gave me a box with Windows 2000 Professional and I found myself working like a handicapped person. It was difficult to move the mouse all day long. I did not even know how to write simple tools in DOS. Without shell and Perl, my productivity was taking a hit.I was missing something seriously.
But fortunately it was a pleasant accident to stumble upon Cygwin while Googling. This tool claimed that I can run any UNIX command on my windows machine. Its an emulator. Since then I have never been able to live without Cygwin at my workplace or even at home.
For those those who dont know what Cygwin is, you must visit its website to find out more, but here it is as I see it.
In layman's terms:
Once you install Cygwin on your Windows box, and start the app, it opens a window just like your Windos Command Prompt. At this command prompt you may RUN ALL UNIX COMMANDS AND WINDOWS COMMANDS. dir or ls. It works. You can even change and see file permissions in rwxrwxrwx formats. Dont believe it. Try it.
All my UNIX scripting languages, XEMACS editor, vi, Perl, Bash, gcc, everything that a user on UNIX can think of is available on your Windows box. For a moment you think, WOW --this is called cross breeding.
Click the icon below to have a look:
(If you are wondering what /usr/bin/gcc maps to in my C drive, it is actually C:\cygwin\bin. In short, the way you see files on your Windows OS is made usable for you in UNIX format)
In technical terms:
# Cygwin is a Linux-like environment for Windows. It consists of two parts: A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
# A collection of tools which provide Linux look and feel.
# Cygwin is not a way to run native linux apps on Windows. You have to rebuild your application from source if you want it to run on Windows.
# Cygwin is not a way to magically make native Windows apps aware of UNIX ® functionality, like signals, ptys, etc. Again, you need to build your apps from source if you want to take advantage of Cygwin functionality.
Add to Cygwin a Window Manager over an X Server, you have a Linux-KDE or your Exceed(HummingBird) like environment on your Widnows desktop. Can life be more cool free of cost?
There are many free Window Managers available like Cygwin/X, CyGNOME, KDE-Cygwin. However, I personally have been using WindowMaker and so far I haven't faced any trouble using it.It consumes about 4MB of your RAM with no applications loaded and when left idle, the memory usage goes down to 1.5MB. 99% of the times I use the WindowMaker just opening multiple ssh sessions. I generally work with multiple UNIX servers and end up having 10+ ssh logins neatly organized over work-spaces. Being an X manager, you could also set the DISPLAY and open UNIX GUIs on your X, but thats very rare for me.
Installation tricks and hacks:
If you are going to install Cygwin and WindowMaker, here are some of the tricks and hacks which might be useful.
1. Downloading Cygwin is the first step. You get the setup.exe and run it. Choose to download all files first and then install in another session of setup.exe. While downloading I would suggest you download all packages (650MB+). The package choosing part is not very obvious to most first time users. You need to click on a rounded arrow as shown in the screen shot below. Wait for a few seconds after you click. Wait till it all becomes "Install".
The screen shot by default will be.
Click the rounded arrows to make it look like:
The same trick holds true while installing. Keep you Download dir and install dir separate. I generally choose C:\Downloads\cygwin and C:\cygwin respectively.
I haven't seen a single team member so far who did not do this mistake the first time.
2. While installing WindowMaker, you need to build it the GNU-style. configure, make, make install. While running he configure script, if you get permission denied errors, go to the WindowMaker dir and get write permissions for yourself. There is a high chance you will get this error, if you are using Windows XP and are logged on in a domain.
3. While running the configure, run it with the --enable-kde option. You will get a lot of useful kde-like GUI on your X.
Once you are done with make-install, you type in the following commands:
x& --- this will start your Xserver.
wmaker& --- this will start the Windowmaker.
If you dont face trouble while running wmaker and see a purple workspace on your X, you are lucky. You are however very likely to get the two following errors:
1. Display not set. To fix this type:
export DISPLAY=localhost:0.0
2. You get lots of errors like "Could not create directory". This will most probably happen if you are at office and not at home. This is because you have a space in your home directory. Example: "C:\Documents and Settings\shuva". wmaker apparantly does not like spaces in the path. It actually tries to create a dir called GNUstep" where it would keep all preferneces. You can override this by setting the environmental variable GNUSTEP_USER_ROOT. I keep it in my C:\Documents and Settings\shuva\.bashrc file.
alias ll='ls -l'
export DISPLAY='localhost:0.0'
export GNUSTEP_USER_ROOT='/usr/local/GNUstep'
So whenever you start your computer fresh you do these steps:
1. Double click on the Cygwin icon on your desktop.
2. source .bashrc
3. x&
4. wmaker&
It may appear that its a pretty difficult thing to setup in your computer, but it actually is not. Once you start using the power of cygwin.dll on your Windows box, you will know what its worth.




( 2.9 / 69 )

Calendar




