Tuesday, September 09, 2008

RXVT and Cygwin

I don't like the dos-window that Cygwin launches in by default. Instead, I install the RXVT package.

1) Copy and paste doesn't break lines.
2) Completely customizable xterm-like window (scrollbars, colors, sizes, etc)
3) Completely resizable to almost your entire screen (nice for tailing log files, looking at exception stack traces, etc)
4) More pleasing

1) About the only thing I have found that I don't like about RXVT (which I bet there is a solution for) is that it uses middle-mouse to paste. Since I use Putty a lot, and Putty uses right-mouse to paste, I always get them mixed up and end up doing the wrong darn thing.

Installation and Configuration:
1) Run the Cygwin setup app -- http://cygwin.com/setup.exe
2) Install the RXVT package
3) Create a new shortcut for "E:\cygwin\bin\rxvt.exe -e /bin/bash -login"
4) Create .Xresources file in your Cygwin $HOME dir:

rxvt.font: Lucida Console-12
rxvt.boldFont: Lucida Console-12
rxvt.scrollBar: True
rxvt.visualBell: True
rxvt.loginShell: True
rxvt.background: Black
rxvt.foreground: White
rxvt.saveLines: 3000
rxvt.cursorColor: Green
rxvt.scrollBar_right: True
rxvt.geometry: 125x50

That's it. An alternative option is to specify all the options on the rxvt cmd line.

Update: I was curious to see if there was an easy way to change PASTE from middle-click to right-click. Found this posting, but it requires you to compile RXVT from source: http://mpuentes.blogspot.com/2007/11/cygwin-rxvt.html


Anonymous said...

SHIFT-left-click works for pasting from the clipboard

Anonymous said...

You can try X-Mouse Button Control to swap right and middle click. Be sure to set this as an Application configuration for only rxvt.exe.