Saturday, October 16, 2010

Cygwin + Poderosa = bye bye cmd.exe

Does your job require you to boot up your box in Windows instead of Ubuntu? Do you miss the vi-mode on the command line? Do you become nostalgic at the mention of multiple shell tab sessions? Do you feel like bashing your boss's head if he says he won't shell out any extra money to buy you a shiny new Windows power shell (I think it should be worth a try)

Fear not, for the open source world has made efforts to bring you closer to your $HOME.
 
Cygwin - a Linux like environment for Windows gives you all the tools that you missed on cmd.exe - find, grep, ls and many more. You can download Cygwin from Cygwin home

Just remember one thing - when you install it for the first time - do a basic installation - i.e. do not select too many packages. Let the default installation do its job. You can always add new packages by running the setup again (no - it won't erase the previous setup - that's just cygwin's way of adding new packages).

And while I see some of you drooling and foaming at the mouth with this knowledge, while others rubbing their palms in anticipation and clearing your throats for a wicked mad scientist laugh, a little info which saved me some more time while installing cygwin - the clear command is a part of the ncurses package, which is not a part of the default installation. So check that one on if you can type clear faster than you can do a ctrl-l.

And so with cygwin, it is a cyg-win-win situation. I will try to keep the wordplay at a minimum - I promise :) Please read on.

Cygwin gives you find but not the vi-mode on the shell. And neither does it give you tabbing.

That prophecy is fulfilled by Poderosa. Its pre-requisite is the presence of Cygwin (I don't think it does check but it has a cygwin icon on which you click to open up tabbed cygwin sessions). Download it. Its a simple 'click-next-click' installation.

But whenever I try to connect to cygwin via Poderosa I get an error "The registry key SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/ is not found. Cygwin may not be installed correctly" (Damn you windows for not giving copy-paste on error dialog boxes :) ). But like a good ignorant Windows user I click OK and it works.

<jingle_bells_tone>
    multi tabs, multi tabs - bashing all the way.
    oh what fun, it is to type, in the vi-mode today. 
</jingle_bells_tone>

I have been using Cygwin + Podersoa as per the recommended dosage and the doctor says my recovery is pretty fast.

Get well soon. :)

1 comment:

Dustin said...

Add the following registry key:

HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/

The [...]\mounts v2 key should already exist, but you need to create a new key inside "mounts v2" with the name "/" (forward slash). Then set the (default) value to be the root of your Cygwin install (c:\cygwin or something like that).