Main menu:

Site search

Categories

Archive

Console for hacking Mozilla on Windows

This post is just a little tip for hacking Mozilla on Windows. It’s well known that the basic Windows console program is, uh, not good, compared to a Unix console. But it turns out there’s a really nice project on SourceForge named Console that provides multiple tabs, good fonts and scrollback, keyboard shortcuts, and a few other goodies.

Chris Leary asked me to write this up so that other people know about it (and people have been asking lately). Justin Dolske was the person who pointed me to the project in the first place.

Anyway, a few tips for using Console for Mozilla hacking:

  1. It’s just a zip file containing a program. There’s no install, you just run it.
  2. For mozilla-build, you want to create a new “Tab” in the settings. For example, I have one called “Mozilla ia32″, with Shell set to “C:\mozilla-build\start-msvc9.bat” and Startup dir set to “C:\mozilla-build”.
  3. With the latest version of mozilla-build, it doesn’t work right if you just do that. What will happen is that the tab will start up, then shut down as a standard Windows console opens. (Very annoying, because if it’s the only tab, it’ll even close down Console, so you can’t easily fix it.)

What you need to do is find your startup batch file (e.g., start-msvc8.bat) and change the last line from:

    start /d "%USERPROFILE%" "" "%MOZILLABUILD%"\msys\bin\bash --login -i

to

    "%MOZILLABUILD%"\msys\bin\bash --login -i

Console project on SourceForge

Comments

Comment from Kyle Huey
Time: March 29, 2011, 3:19 pm

FWIW, we’re going to fix 3 in the next version of mozilla-build.

Comment from Shawn Wilsher
Time: March 29, 2011, 3:43 pm

Does setting the startup directory actually work for you? I’ve had no luck in getting to to change anything.

Comment from dmandelin
Time: March 29, 2011, 3:45 pm

Great, thanks!

Comment from dmandelin
Time: March 29, 2011, 3:47 pm

Hah! No, it doesn’t work for me either, and I never noticed. Maybe the .bat file changes it?

Pingback from Console for hacking Mozilla on Windows
Time: March 29, 2011, 4:37 pm

[...] Unix console. But it turns out there’s a really nice project on SourceForge named Console… [full post] dmandelin David Mandelin's blog uncategorized 0 0 0 0 [...]

Pingback from David Mandelin's blog » Console for hacking Mozilla on Windows « Blogs About Everything
Time: March 29, 2011, 4:55 pm

[...] Read the original here: David Mandelin's blog » Console for hacking Mozilla on Windows [...]

Comment from Harsh86
Time: March 29, 2011, 7:43 pm

Wow. I just started hacking on Mozilla code a few days ago and I was just thinking how crappy the Windows console is compared to a Unix console. A day later, this blog post. Awesome.

Comment from Steve Fink
Time: March 29, 2011, 8:00 pm

I’ve always used rxvt (the dumb way — I open a standard mozilla-build console, then type rxvt & into it.) It is a proper terminal (key bindings, scrollback, escape sequences, etc.) though it doesn’t have tabs. I’ll have to try Console to see how it compares.

Comment from Neil Rashbrook
Time: March 30, 2011, 1:21 am

Rather annoyingly, vim72 is also able to temporarily disable scrollback in Console2.

mozillabuild used to start rxvt, so someone must have thought that the regular console was an improvement. (Maybe there should be some sort of setting to choose which sort of console you want.)

Comment from geeknik
Time: March 31, 2011, 10:49 am

I’m digging this app. Much more useful then the standard Windows 7 command prompt. =)