default cygwin terminal and environment

Posted by anton
on Sunday, February 05, 2006

anyone that installed cygwin and used it out of the box knows about the limitations of the default terminal: those awkward scrolling errors, resizing pain, limits on the scroll buffer, colors, etc.

i never bothered to get it fixed. until now that is. use rxvt instead (you need to install it first): create a shortcut with the following command line:

D:\programs\cygwin\bin\rxvt.exe \
-vb -sr -sl 20000 \
-fn courier \
-g 120x50 \
-e /usr/bin/bash \
--login -i
man rxvt to see what those actually mean. then edit your .bash_profile (in case your $HOME is unnatural and your .bashrc does not get read) and add the following:
alias less='/bin/less -r'
alias ls='/bin/ls -F --color=tty --show-control-chars'
you should also put the following in your .vimrc:
syntax enable
filetype on
filetype plugin on
set ts=2
set number
set ai
set si
and you also might want to grab rhtml syntax plugin for vim.

this will get the expected stuff working (ctrl-pgup/pgdn, colors, proper terminal handling when you login to remote hosts via ssh, etc). note that you copy on selection and paste with the middle mouse button or shift-insert.

Comments

Leave a response

  1. Muness AlrubaieJuly 31, 2007 @ 10:09 PM
    If, when launching rxvt you see the following error: "failed to load an X lib (cygX11-6, libX11)" make sure your DISPLAY environment variable is not set, or set to ":0". (See http://www.cygwin.com/ml/cygwin/2004-06/msg01212.html)
  2. Tad HadtrathAugust 15, 2008 @ 02:56 PM
    If you get the failed to load error message you can modify your cygwin.bat to fix it. Add -display :0 to the list of rxvt options. e.g. D:\programs\cygwin\bin\rxvt.exe \ -vb -sr -sl 20000 \ -fn courier \ -g 120x50 \ -display :0 \ -e /usr/bin/bash \ --login -i
  3. Andy KoppeDecember 30, 2008 @ 04:25 AM
    Hi, for an alternative with more of a Windows look&feel you might want to have a look at MinTTY, which is a new Cygwin terminal I wrote based on code from PuTTY. Its project page is at http://code.google.com/p/mintty .