Hoylen's Weblog

Sun, 10 Jan 2010

Cygwin rxvt: a better terminal

After installing Cygwin (a very powerful Unix like environument for Microsoft Windows) I usually set up my home directory and create a shortcut to rxvt.

I make the Windows "My Documents" directory my Cygwin home directory:

cd /home
mv username username.bak
ln -s "/cygdrive/c/Documents and Settings/username/My Documents" username

Setup xrvt as the shell window, since it is much better than the default Windows Command Prompt:

  1. In Windows Explorer, go to C:/cygwin/bin.
  2. Right click on xrvt.exe and create a shortcut for it.
  3. Rename the shortcut to "Cygwin rxvt".
  4. Right click the shortcut and select "Pin to Start menu".
  5. Right click on the shortcut and select "Properties".
  6. Change the Target property of the shortcut to:
C:\cygwin\bin\rxvt.exe -sl 1500 -fn "Consolas-16" -bg black -fg orange -e bash --login -i

The -sl arguments sets the number of lines in the history buffer. The -fn argument sets the font. If you haven't got the Consolas font, use "Courier New-16" instead. The -bg and -fg sets the colours. The -e bash --login -i runs the bash shell.

The rxvt here is a Cygwin Windows program. It does not require X11 to operate. But it does use the X11 method of copying and pasting (i.e. selecting the text copies it, and the middle mouse button is paste).

Note: Cygwin version 1.7 (or later) now installs a shortcut to rxvt called "rxvt-native", so the above instructions are no longer necessary. However, I still customise its font and colours by modifying the command as described above. There is also now Mintty a terminal emulator written especially for Cygwin.