Cygwin Installation


Vim

Create .vimrc file in ~/

Syntax hilighting colors: create /.vim/after/syntax/syncolor.vim

Bash

To ensure .bashrc file is actually read on startup, modify the Cygwin-supplied cygwin.bat to contiain the following:

 @echo off

 C:
 chdir C:\Cygwin\bin

 bash --login --rcfile /home/mpickering/.bashrc -i

To get rid of the beep in bash (this is actually a readline modification):

In /.inputrc add the line set bell-style none

To ignore case for filename completion, add the line set completion-ignore-case on

To create aliases, add these lines in /.bashrc

 alias ls='ls --color=tty'       [use coloring in ls command]
 alias c:='cd /cygdrive/c'       [c: switches to root of C drive]
 alias exti='exit'               [I always seem to type exit too fast]
 alias eixt='exit'
 alias esit='exit'
 alias less='less -Q'            [Don't beep when EOF reached]
 alias more='less'
 alias grep='grep --color'       [highlight matched string in grep]

XFree

To change the server startup info (such as resolution), create /.xserverrc with the following line:

/usr/X11R6/bin/X -screen 0 1152x864x24 -engine 4 -fullscreen

To run some useful programs like xwinclip and change the default window manager, modify /.xinitrc

defaultserverargs="-screen 0 1152x864x24 -engine 4 -fullscreen"
xwinclip &
exec openbox

ssh-agent and X

To start the X server as a child of the ssh-agent process (which allows it and its children to inherit ssh-agent environment variables), create a script in /usr/share called startxssh.sh (or anything, really) containing the following:

exec /usr/bin/ssh-agent "/usr/X11R6/bin/startx"

Then you can create a shortcut to start everything:

C:\Cygwin\bin\bash.exe --login "/usr/share/startxssh.sh"

CYGWIN environment

Make sure your CYGWIN environment variable is set to ntsec tty. This can be done in the System settings in Windows control panel. This will correct problems in Xterm with SSH, where the terminal locks up after logging into a remote system.