Our Craft

Making it better

Defaulting to the bash shell

Posted by danielmeyer on December 2, 2008

A comment on a previous post got me thinking — why do I always drop to a Windows command prompt?  Why don’t I make more use of the Cygwin bash shell?  The shell script language is more structured than batch files (more flow control options, etc.)…

I decided to change over to using a Cygwin bash shell as the command prompt my keyboard shortcut is set up to drop me to.  At some point, though, all the output in the shell was colored blue.  Not liking this, I searched around and ended up with a better solution than I expected to get.

rxvt

I used Daniel Ambrósio’s customization of Eric Dobbs’ Cygwin + Rxvt post, to use rxvt instead of the Windows command prompt as the virtual terminal for Cygwin.  I followed these steps:

  1. Used the Cygwin setup program to install the rxvt package
  2. Created .Xdefaults as Ambrósio
  3. Created my cygwin.bat replacement, calling it cygwin-rxvt.cmd
  4. Placed a shortcut to cygwin-rxvt.cmd on my desktop and modified gave it the keyboard shortcut that had formerly launched a Windows command prompt (to get me in the habit of using this)

The rxvt terminal is resizable in the horizontal and vertical direction without having to go to the system menu, properties, and looks pretty nice!  Maybe now I’ll more easily notice when a problem would lend itself to being solved by a shell script.

Finally, Ben sends a link to the Advanced Bash-Scripting Guide — thanks!  Looks like a good resource I’ve been missing.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>