Cygwin install tips using cyg-apt
This is my OLD blog. I've copied this post over to my NEW blog at:
http://www.saltycrane.com/blog/2007/11/cygwin-install-tips/
You should be redirected in 2 seconds.
I recently got a new computer at work and needed to reinstall Cygwin. Here is my install procedure using the very nice cyg-apt
script. It's like Debian's apt-get
for Cygwin! Note, this install process assumes that I have all my init files backed up and can copy them over to my new machine.
- Run the Cygwin setup program and install the default packages plus
wget
andpython
. - Set the Windows user environment variable
HOME
toc:\home\sofeng
. Note, I tried it with forward slashes, but then it doesn't work in my Windows batch file. - Start the Cygwin bash shell
- Change the cygdrive prefix:
mount -s --change-cygdrive-prefix /
If you don't have admin privileges:
mount -u --change-cygdrive-prefix / - Copy over my init files and startup scripts:
- ~/bin/startxwin.bat
This is the Windows batch file that I use to start my Cygwin/X environment. It does the following:- Adds
~/bin
to myPATH
cd
s to myHOME
directory- Starts the
ratpoison
window manager with aurxvt
terminal runningscreen
- Adds
- ~/.Xdefaults
Sets the colors, font, and scrolling behavior forurxvt
. - ~/.bashrc
- Sets the
PS1
(prompt),EDITOR
,http_proxy
, and other environment variables. - Sets a lot of aliases
- Sets bash filename completion to be case insensitive
- Sets the
- ~/.cyg-apt
- ~/.emacs
- ~/.emacs.d
- ~/.inputrc
- ~/.screenrc
- /etc/ssmtp/ssmtp.conf
- /var/cron/tabs/sofeng
- ~/bin/startxwin.bat
- Install
cyg-apt
$ wget http://www.lilypond.org/~janneke/software/cyg-apt $ chmod a+xr cyg-apt $ mv cyg-apt ~/bin
- Install good stuff (note, if you don't already have
~/.cyg-apt
, you will need to runcyg-apt setup
first):
$ cyg-apt install rsync Best backup utility $ cyg-apt install screen Terminal multiplexer $ cyg-apt install xorg-x11-base X Windows $ cyg-apt install rxvt-unicode-X Better Xterm $ cyg-apt install diffutils diff $ cyg-apt install gcc-core GCC C complier $ cyg-apt install make GNU make $ cyg-apt install xorg-x11-devel X header and library files for compiling ratpoison
or other programs$ cyg-apt install readline used for ratpoison
$ cyg-apt install cron so I can schedule my backups and updatedb
$ cyg-apt install ssmtp Sendmail replacement so cron can email me $ cyg-apt install emacs Terminal version of emacs for quick editing jobs from the shell
Other notes:
- I thought that I needed to add
c:/cygwin/bin
to my Windows path in order to usegrep
in Emacs Windows. However, I later found out that this step is not needed. It is generally bad practice to addc:/cygwin/bin
to the Windows path. Instead, I added the required code in my .emacs file. See http://cygwin.com/faq/faq-nochunks.html#faq.using.ntemacs for more information. - I used to keep my http proxy server information in
~/.wgetrc
, but now I store it in thehttp_proxy
environment variable. (Note, it is lowercase and not uppercase. I don't know why this is.)
3 comments:
I had to make two edits to cyg-apt to get it to work:
1) root = '/'
2) mirror = 'http://sources-redhat.mirror.redwire.net/cygwin'
My cygwin root os set to '/' and it didn't appear that the http://mirrors.rcn.net/pub/sourceware/cygwin mirror was working.
-john
john,
taking a look back, it seems like i needed to modify the mirror also. sorry for not noting that in the post. the weird thing is that my current version of cyg-apt is much different than the one from the location i posted. i wonder if the cyg-apt script auto updated itself. or did i download a different version and not remember? it turns out there is a much newer version located at http://lilypond.org/cygwin/cyg-apt. The modified date says 02-Jun-2007. I'm not sure why there are two versions on the site.
Be careful not to use cyg-apt to update a package that cyg-apt itself needs. I once ran cyg-apt install bzip2 to bring bzip2 up to the latest version, and was hosed: bzip2 was gone!
Post a Comment