Rxvt

From EggeWiki

rxvt is a great terminal emulator for Windows. I much prefer it over Putty, and especially the default cygwin command prompt. It's an optional cygwin package. Here's some tips on how to get the most out of it.

Install

Install through the Cygwin setup.exe package manager. Select rxvt under Shells.

After installing, launch rxvt-native from your Start menu.

Lastly, you may want to add export TERM=rxvt-cygwin-native to your ~/.bash_profile.

Background color

The cygwin rxvt background doesn't seem to support transparency or png files, however xpm's work just fine. Here's my file for the blue strips you see below.

<geshi> /usr/share/pixmaps/rxvt-darker-stripes.xpm /* XPM */ static char * rxvt_tile_xpm[] = { "16 18 3 1", " c #000000", ". c #000030", "+ c #000040", " ", "................", "++++++++++++++++", "................", " ", " ", " ", "................", "++++++++++++++++", "................", " ", " ", " ", "................", "++++++++++++++++", "................", " ", " "}; </geshi>

Geometry

You can have rxvt open your window in your preferred dimensions. The easy way to do this is to resize and existing Window, and type stty -a

<geshi> $ stty -a speed 38400 baud; rows 31; columns 155; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts -ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -tostop echoctl echoke </geshi>

Next, take the columns and rows output, and add that to your ~/.Xdefaults file.

256 colour

Here's the output of 256colors2.pl.

Here's some settings I use to tweek my default rxvt terminal.

My ~/.Xdefaults file:

rxvt*title:             Bash
rxvt*background:        darkslategray
rxvt*foreground:        wheat
rxvt*scrollBar_right:   true
rxvt*colorBD:           1
rxvt*font:              courier
rxvt*saveLines:         10000
rxvt.backspacekey:      ^?

XTerm*saveLines:        5000
XTerm*scrollBar:        true
XTerm*rightScrollBar:   true

My cygwin shortcut:

C:\cygwin\bin\rxvt.exe -sl 2000 -fn courier -sr -e bash.exe --login -i

Another useful rxvt trick I learned is using the shift-keypad-plus and shift-keypad-minus to change the font sizes of an open window. You can open a new window with a big font like this:

rxvt -fn 'Lucida Console-24''

vim

Be sure to add set t_Co=256 to ~/.vimrc below 'set nocompatible' <geshi> set nocompatible " We're running Vim, not Vi! set t_Co=256 </geshi>

terminfo

When I ssh to a Solaris I get this message when starting up vim: <geshi> E558: Terminal entry not found in terminfo 'cygwin' not known. Available builtin terminals are:

   builtin_riscos
   builtin_amiga
   builtin_beos-ansi
   builtin_ansi
   builtin_pcansi
   builtin_win32
   builtin_vt320
   builtin_vt52
   builtin_xterm
   builtin_iris-ansi
   builtin_debug
   builtin_dumb

defaulting to 'ansi' </geshi>

This is because Solaris doesn't know about my terminal. To fix, this I can change my TERM, or add cygwin to the terminfo.

On Cygwin, copy this directory to Solaris: /usr/share/terminfo/c/cygwin. If your Solaris install doesn't have a terminfo directory, or you can write to it, the solution is to copy the entire Cygwin terminfo directory, and then set the TERMINFO environment variable to point to this directory.

Currently, my rxvt setup sets these terminals: <geshi lang="bash"> $ env | grep TERM TERM=xterm COLORTERM=rxvt-xpm </geshi>