Friday, April 16, 2010

Using rxvt in Cygwin

What is  rxvt ?

Here it is http://infrablue.tripod.com/cygwin.html  , notice the installation part, it is under Shells: rxvt  .

And I get this command

C:\cygwin\bin\rxvt.exe -sl 1500 -fn "Lucida Console-12" -bg black -fg grey -sr -e bash --login -i


However, when I follow it , the terminal crash upon click (window open and immediately disappear . It is also reported here :  http://cygwin.com/ml/cygwin-xfree/2006-07/msg00146.html  , saying crash with "-e" option (not true to my case , find answer below ) .

Finally , I get below command from  http://www.khngai.com/emacs/bash.php

D:\Programs\Cygwin\bin\rxvt.exe -sl 500 -fn courier -bg wheat
-sr -title "Bash Sailor" -e D:\Programs\Cygwin\bin\bash.exe 
--rcfile %HOME%\.bashrc


But , it is still not working for me, however slightly better . Window remains open with error message complaining .bashrc.

Comparing above two commands carefully,  finally I get my working version, which is need to specify full path for bash.exe


c:\cygwin\bin\rxvt.exe -sl 25000 -fn 'Lucida Console-16' -bg wheat -sr -title "Bash Sailor" -e c:\cygwin\bin\bash.exe --login -i

And my final cygwin.bat is like this.


-- content of cygwin.bat

@echo off
C:
chdir C:\cygwin\bin

 set EDITOR=vi
 set VISUAL=vi
 set CYGWIN=codepage:oem tty binmode title

rem change font size below
rem c:\cygwin\bin\rxvt.exe -sl 5000 -fn courier -bg wheat -sr -title "Bash Sailor" -e c:\cygwin\bin\bash.exe --login -i

rem c:\cygwin\bin\rxvt.exe -sl 25000 -fn 'Courier New-18' -bg wheat -sr -title "Bash Sailor" -e c:\cygwin\bin\bash.exe --login -i
c:\cygwin\bin\rxvt.exe -sl 25000 -fn 'Lucida Console-16' -bg wheat -sr -title "Bash Sailor" -e c:\cygwin\bin\bash.exe --login -i

-- end of content of cygwin.bat

*** -sl 25000  : stands for number of scrollback lines, 25000 lines here
*** -fn 'Lucida Console-16' : font Lucida Console with size 16, change it to suit you best .

References:

http://www.khngai.com/emacs/bash.php
http://www.petersblog.org/node/1583
http://cygwin.com/ml/cygwin/2005-09/msg00741.html
http://c2.com/cgi/wiki?BetterCygwinTerminal
Configuring the Command Prompt Window  http://commandwindows.com/configure.htm