Change cygwin.bat to use rxvt as terminal instead of the the dos prompt:
start rxvt -e bash --login -ior even better, make a shortcut that calls rxvt directly instead of a bat file. Like this:
C:\misc\cygwin\bin\rxvt.exe -e bash --login -i
Create a .Xdefaults in your home directory.
Add some stuff to make rxvt look like you want, may be something like this:
Rxvt.background: midnight blue Rxvt.foreground: white Rxvt.cursorColor: red Rxvt.font: "Lucida Console-10" Rxvt.scrollBar_right: True Rxvt.saveLines: 2048More info at man rxvt
Cygwin should have created a .bashrc and a .bash_profile file in your home directory. .bash_profile basically calls .bashrc if there is one, so that it's always executed (login shells reads from .bash_profile and not .bashrc). For a better structure you might want to create .aliases, .paths etc. To run such a file at startup, write this in your .bashrc:
. ~/.aliasesIf you get inaccurate time in cygwin (I don't think that's necessary anymore) try to set the timezone variable TZ for the correct time, the following works for CET countries using daylight savings time (Sweden etc):
export TZ=CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00Create a
.inputrc and add stuff to config Cygwin input behaviour:
# Ignore case for the command-line-completion functionality. set completion-ignore-case On # to show all characters like åäö set meta-flag On set input-meta On set output-meta On set convert-meta Off # Make Delete work "\e[3~": delete-charFor some reason the following no longer works with the latest versions of rxvt, don't know why. Hope they fix it.
"\C-v": paste-from-clipboard
One thing you should know about using another terminal emulator than cmd is that it buffers output due to that Windows doesn't recognize it as a terminal. Only output to terminals are unbuffered.
If you intend to use ssh and scp, then you should take a look at this, it explains how to exchange keys so that you can use ssh and scp without having to enter a password!
Declare the home variable in autoexec.bat if you use Windows 9x or ME so that home is defined even if emacs is not executed from Cygwin.
SET HOME=C:\misc\cygwin\home\mynameOr, if you have Windows XP or 2000 then you can declare environment variables for either the system or a specific user by setting them in:
settings->control panel->system->advanced->environment variables
Download a ftp client that works with emacs from here and edit your .emacs so thet emacs knows what ftp client to use. If you want to use SSH instead of ftp, check out this page.
(setq ange-ftp-ftp-program-name "c:/program files/emacs-21.3/bin/ftp.exe")since ftp is unsecure you might want to use Tramp, which is an Emacs extension similar to Ange-FTP, but where Ange-FTP uses FTP to transfer the files, Tramp uses a shell login. To use tramp with NT-Emacs and cygwin's ssh you have to download tramp, eschange ssh keys, and add something like this to .emacs.
(add-to-list 'load-path "~/emacs/tramp-2.1.3/lisp/")
(require 'tramp)
;; (setq process-connection-type t)
(setq tramp-default-method "ssh")
(nconc (cadr (assq 'tramp-login-args (assoc "ssh" tramp-methods)))
'(("bash" "-i")))
(setcdr (assq 'tramp-remote-sh (assoc "ssh" tramp-methods))
'("bash -i"))
More about Tramp can be found here.
Since the win32 version of emacs doesn't use .Xdefault files the easiest way to configure things like colors, fonts and geometry of the window is in .emacs (you can do it in the registry, but the registry sucks). I'm not going to go into the detail about configuring emacs because there's just too much to say, you can look at my windows version of .emacs here or read the GNU Emacs FAQ For Windows.
Some things you can also configure by using command line argument, like:
runemacs.exe -fg white -bg "midnight blue" -cr red
You might want to install some modes like HTML helper mode and ctypes.
Download MinGW, or even better download an IDE that uses MinGW, Dev-C++ and has other features such as easy package updater. To avoid the path trouble due to the same name of the compilers you should install MinGW or Dev-C++ in a separate directory, like:
C:\misc\MinGW\or
C:\misc\Dev-Cpp\
Then add the path in .bashrc. To be able to switch between Cygwin's ggc (and it's tools) and MinGW's gcc (and it's tools) i chose to do like this:
export CYGWIN_PATH=$PATH export MINGW_PATH=/cygdrive/c/misc/mingw/bin:$PATH export PATH=$MINGW_PATH alias cygwin='export PATH=$CYGWIN_PATH' alias mingw='export PATH=$MINGW_PATH'or
export CYGWIN_PATH=$PATH export MINGW_PATH=/cygdrive/c/misc/Dev-Cpp/bin:$PATH export PATH=$MINGW_PATH alias cygwin='export PATH=$CYGWIN_PATH' alias mingw='export PATH=$MINGW_PATH'So the commands mingw and cygwin switch path.
make that comes with mingw doesn't work nearly as well as the make that comes with cygwin, so to ensure that the correct version of make is used, either rename or delete the version of make distributed with MinGW.
Another nifty little tool is colorgcc, it's a Perl wrapper to colorize the output of compilers with warning / error messages matching the gcc output format. To get it to work with Cygwin and MinGW you have to rename colorgcc to gcc and g++, make sure these are ahead of the ordianry gcc and g++ in $PATH, and make sure you use Cygwin's make.
For more info, check out the MinGW FAQ and
MinGW Support in Cygwin