Cygwin, nice and easy setup

I have been working in *nix environment for quite sometimes, most of embedded system nowadays build on top of Linux along with *nix toolset, for me it’s with BusyBox, minimal *nix stripped down toolset dubbed by the author addresses as The Swiss Army Knife for Embedded Linux, which is true in tight constraint nature in embedded “pocket” size. We have to live in that world, a lot of limitation and we need to overcome it with right mindset.

The main part of the problem is that *nix is not my main development machine, company as an enterprise still cannot get rid of Windows as it’s main OS, there’s already lot of bits spilled explaining why about it, I’m not gonna pour another bits for that. I will have to embrace it like a proper engineer, if there is a problem we have to come out with solution or workaround. To get access on *nix environment I use puTTY and SSH it, to have an alignment of environment from Windows OS Cygwin is the answer.

Here is steps that i would do to setup Cygwin, do it! explanation come later, just 1-2-3.

  1. Download Cygwin
    Run the setup executable (later Windows OS need to “Run as Administrator”), next, next, and select closest download site from where you reside to get faster installation
    select package for your development, gcc in this example, (totally different topic, but please select Vim as well). Ceveat: read the 2nd step ;).
    Choose to include it with windows environment variable. That’s it.
  2. Ditch Cygwin
    Yes, you read it right. Ditch cygwin.
    Select Mintty in the setup package. If you have finish cygwin setup, don’t worry, run the setup again and select Mintty from packages to install menu.
    Go from explorer to c:/cygwin/bin you’ll find mintty.exe create shortcut and pin it to start menu.
    On this newly created Mintty shortcut (right-clicked) change it’s properties, add it with  -e /bin/bash --login so it become C:cygwinbinmintty.exe -e /bin/bash --loginMintty-properties
    The changes is to read ~./bash_profile when we start Mintty, this will give us linear behavior between Cygwin and Mintty, but Mintty is our primary choice.
  3. Solarized it
    We don’t have mintty config, let create one
    cd ~
    touch .minttyrc
    vim .minttyrc or with your favorite editor (we can go to explorer and edit the file)
    Go to mintty-colors-solarized select .minttyrc–solarized-dark copy paste it to .minttyrc
    It didn’t stop in here, solarized the directory list as well.
    cd ~
    touch .dir_colors
    Go to dircolors-solarized select dircolors.ansi-dark copy paste it to .dir_colorsI know that color is personal choice, however since solarized is so popular it’s theme is ubiquitous in text editor, here we can have linear color theme everywhere.
  4. Bash apply and alias
    Open ~/.bashrc
    to apply directory color…
    eval `dircolors ~/.dir_colors`
    and its alias…
    alias ls="ls --color"
    optional, another my ‘must have alias’ (after put 2 line above) is
    alias ll="ls -l"
    ls will have color, and ll will have additional -l. It can combined with -a, ll -a to list all file with long format in color.

Fresh look


So why select Mintty ? if you have work in cygwin and PuTTY then you know the difference, there is list of limitation with cygwin console, but my most annoying part working with cygwin console is the resizing window console will broke output format.

Another cool things to explore is: Transparency looks
Font selection,

Have fun.


One thought on “Cygwin, nice and easy setup

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s