Cygwin
(hey, it’s a container for some cygwin hacks I stumble upon)
Intro:
Yes, I’m a sucker for Cygwin. Being “forced” to live inside a few windows boxes on the corporate world made me embrace this tool to escape from a few nazi-ish policies and improve my efficiency when faced with common (and then again, maybe not) tasks.
Cygwin is a Linux-like environment for Windows. It consists of two parts:
- A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
- A collection of tools which provide Linux look and feel.
The Cygwin DLL currently works with all recent, commercially released x86 32 bit and 64 bit versions of Windows, with the exception of Windows CE.
Think of it as an advanced Command Prompt for Windows boxes. Developing, debugging,scripting, testing, hacking. All of this can be done inside a Cygwin window – just be aware that the standard Cygwin shortcut will just launch a cmd.exe window with a bash shell on it – for added usefulness, it’s much more efficient to launch it using the following shortcut:
C:\cygwin\bin\rxvt.exe -fn "Lucida Console-11" -bg black
-fg white -ls -st -sr -sl 1500 -C -e /usr/bin/bash --login
Cygwin packages, the debian way:
Getting a new Cygwin installation running is usually a painful experience for several reasons:
1. As far as I know there is no way to script a complete installation using the setup utility.
2. Selecting packages for installation is a pain in the ass since the setup utility looks like it’s been designed by a monkey.
3. When an error occurs on installation, chances are your package selection is probably gone.
Truth be told, major revamping on the setup utility has been done on the past few months. It is now possible to search for an individual package by name. Searching for a package that provides a given binary/file/whatever is still very hard to accomplish and/or quite unclear.
However, I’ve come across an interesting project (one year old, as we speak) that brings the familiar Debian apt-get family commands to install packages. I’d think about this as a way to jumpstart a Cygwin installation, but it requires bash, wget, tar, gawk and bzip2 to be installed beforehand (and these should be installed on a zero configuration setup run)
Its name is apt-cyg. “a command-line installer for Cygwin which cooperates with Cygwin Setup and uses the same repository. The syntax is based on apt-get but simplified.”
With it, installing a full fledged and customized Cygwin setup is just a matter of running setup.exe once, installing the script using the suggested invocation and launching a preexisting shell script which all it does is installing the remaining packages (and dependencies) in one step.