Console2 - A worthy cmd window replacement
Anywho, I have experimented with a few prompt replacements and have finally settled with Console2. This is an open source development effort, and is currently at version 2 (beta). I had a little bit of trouble with it and figured it deserved its own post, so here goes.
I downloaded the latest build from SourceForge’s repository (currently at build 120). You want this build because it adds all sorts of goodies over the stable (1.5) version. You don’t need the src zip. Having downloaded it to my default Downloads folder, and unzipped it (yes, there is no installation required) and double clicked Console.exe only to get the following error -
Quick note here - If you are to get an error dialog like this, merely hitting Ctrl-C with the dialog active will copy to the Windows clipboard. Didn’t know that one, did ya?
Anyways, Google returned with a link to dll-files.com and I managed to get the dll file, which I downloaded the Console2 folder (which still remained in my downloads folder). Cool. Think I am done. Double click Console.exe file again to get the following -
Ok. Hopefully I am done. Double click Console.exe and voila! There is the beautiful prompt. Thank you! Its beautiful. Resizable, copy-paste, nice looking fonts and colors, tabs (woohoo!). I have to admit, not a big fan of the transparency, so I changed Edit -> Settings… -> Appearance -> More -> Window transparency to None. Great.
After a few days of using it, I decided I liked it enough to venture into customizing it. As I mentioned earlier, I have a “projects” directory directly under the root, and prefer to have a console open at that location. Went to Edit -> Settings… -> Tabs, added a new tab, named it Projects (creative, don’t you think?) and pointed the open dir option to C:\projects. Hit Ok, and close Console.
Another quick note - Console does not seem to reload changes to its settings on the fly. If you make a change to the settings, you are better off restarting Console (thats been my experience anyways).
Click on File -> New tab -> Projects. Expecting a new tab? Nope. Console just hung on me. I had to go to the ProcessExplorer to kill it. I wonder what went wrong? Honestly, I never figured it out.
I figured I could always live without that. One thing I could not live without was Cygwin. So far, I had been using PuttyCyg as a prompt to Cygwin. I figured I could hook up Console to Cygwin. Again, Edit -> Settings… -> Tabs, added a new tab, named it Cygwin (yeah, I am that good), and this time pointed the “Shell” option to Cygwin.bat. Hit Ok, close Console.
Wash, rinse, repeat. Tried File -> New tab -> Cygwin, and guess what, Console freezes again!
I was reconsidering Console2 at this point. I could continue using PuttyCyg as the Cygwin prompt as I had been doing earlier. But being persistent (Ok, Ok, obstinate) I tried another tactic…
Rather than pointing the “Startup dir” or the “Shell” options to where I felt they would be most appropriate, I decided to hack the Console2 settings file directly. Console2 stores its settings in a console.xml file, which you can edit in any worthy text editor. This is what my xml file looks like (only the relevant portion) -
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | <tab title="Projects"> <console shell="cmd.exe /k cd c:\projects\" init_dir=""> <cursor style="" r="255" g="255" b="255"> <background type="0" r="0" g="0" b="0"> <image file="" relative="0" extend="0" position="0" /> <tint opacity="0" r="0" g="0" b="0"/> </image> </background> </tab> <tab title="Cygwin"> <console shell="cmd.exe /k C:\utils\cygwin\Cygwin.bat" init_dir=""> <cursor style="" r="255" g="255" b="255"> <background type="0" r="0" g="0" b="0"> <image file="" relative="0" extend="0" position="0"> <tint opacity="0" r="0" g="0" b="0"/> </image> </background> </tab> |
Restart Console, and everything works! Ctrl-2 opens a new command in my “projects” directory, Ctrl-3 opens a Cygwin prompt.
Now, I decided, it felt good. I think I got it doing kinda what I wanted it to do, so I went ahead and moved the folder from the downloads folder to my utils folder. Updated my shortcut in my “Quick Launch” menu, and when the right time came (which was a few seconds later) clicked the icon to get the exact same dll error that I got in the beginning! What is going on here people?!
Now I was really desperate, and hurt, and angry. I figured, take a copy of the two dll files and the console.xml file, paste it in my temp directory, and blast away the Console2 directory. Unzipped again, only this time I unzipped it right under my util folder. Pasted the dll files and console.xml, and clicked again. Everything works beautifully! My only explanation to this was that Console2 was holding on to the full path of the dll files, which previously was C:\…\downloads\Console2\xyz.dll, and that path no longer existed. I guess it makes sense. But now I am happy
Yet another quick note - Do not map your Ctrl-C to copy. The problem here is that Ctrl-C in cmd is mapped to canceling a running batch script. Rather, select the Edit -> Settings… -> Behavior “Copy on Select” option. You have to select to Copy, yes?
Hope this helped. Let me know how you managed to hack your Console2 install in the comments.