Configuring Console2 with Cygwin

When using Windows, Console2 does a great job of managing my console windows, but it’s not intuitive how to configure it with Cygwin (my console of choice).  It’s not that hard to simply get Cygwin to open in Console2, but it can be tricky to get it open to a startup directory.

Here are the steps to get Console2 to open to a specific startup directory:

  1. Launch Console2
  2. Open settings through Edit > Settings
  3. Click tabs from the tree on the left
  4. Click the ‘Add’ button to add a new tab
  5. Set the title to ‘Cygwin’ (or another appropriate name)
  6. In the ‘Shell’ field put: 
  7. C:\cygwin\bin\bash.exe --login -i -c "cd /cygdrive/c/Users/<username>/<path>/; exec /bin/bash"
    • Replace username with your login name, and the path with the path you want to use relative your home directory.  This can also be used to start in other paths on the system.
    • This launched cygwin with the command to change the path and then launches bash again so the console window will stay open.
    • You don’t have to put anything in ‘Startup dir’
  8. You should be set to open Cygwin tabs to a specific directory in Console2.

Feel free to do other customizations to the console, I like to make each console have a different color so it’s easy to tell which type of console I’m looking at very quickly.

 

 

Posted on November 21, 2011 at 1:12 am by Joe · Permalink
In: Configuration · Tagged with: ,

14 Responses

Subscribe to comments via RSS

  1. Written by AlexScript
    on April 16, 2012 at 9:27 am
    Permalink

    Hi, sorry to bug you, but after applying this change, the Console Process doesn’t start. I see a flicker of it attempting to open and it closes right away. Do you know how I can revert to the previous settings? Even after deleting and re-copying over a fresh version, t still doesn’t work, which leads me to believe these settings are cached somewhere.

    This change has rendered Console complete useless as I can’t even keep it open. Thanks for your time and help,
    Alex

    • Written by AlexScript
      on April 16, 2012 at 10:00 am
      Permalink

      NVM, I’ve fixed this by deleting the settings file found in %appdata%\Console . Thanks again.

  2. Written by Alka Garha
    on May 18, 2012 at 7:36 am
    Permalink

    After applying the same changes Console2 window open and close instantly.
    Please help me out to resolve this.

    Thanks,
    Alka

    • Written by Dan
      on May 30, 2012 at 8:55 am
      Permalink

      Alka: I had the same problem. Even deleting the console.xml file and the Console folder from …/ApplicationData/…..

      However, I re-downloaded the Console2 zip file, and extracted it to a new directory, and then was able to run the newly downloaded and unzipped executable without problem. Strange, but it fixed it.

  3. Written by Per
    on August 6, 2012 at 4:34 am
    Permalink

    I had the same issue. It turns out that the posted ‘Shell’-field value is incorrect. The login parameter is precedes by at long dash when it should be two short dashes, i.e.

    C:\cygwin\bin\bash.exe –login -i -c “cd /cygdrive/c/Users///; exec /bin/bash”

    • Written by Per
      on August 6, 2012 at 4:35 am
      Permalink

      Hm, it seems that the blog engine replaces tow short dashes with a long one. Anyway, that’s the problem.

      • Written by Joe
        on August 6, 2012 at 9:09 pm
        Permalink

        Thank you for noticing that, I’ve corrected the issue.

  4. Written by Setting up the ultimate console | MarkJacobsen.net
    on February 15, 2013 at 11:40 am
    Permalink

    […] Configuring Console2 with Cygwin […]

  5. Written by Kyle
    on March 28, 2013 at 10:15 am
    Permalink

    Great post! Works perfectly. Also, under the tabs settings, I selected the background tab, and set the background to a cygwin icon I had to distinguish between the two. Put a little transparency on and it looks sweet! Thanks.

  6. […] via Configuring Console2 with Cygwin – Blog::Quibb. […]

  7. Written by Love
    on October 23, 2013 at 11:09 am
    Permalink

    I found that this prohibited me from using auto completion with git. What worked for me was to set

    C:\cygwin\bin\bash.exe –login -i

    in the ‘shell’-field. Then in ~/.bashrc I added

    cd /cygdrive/d/development

    I could not find a solution for including the cd command in the ‘shell’-field. But now I have cygwin in console2 with propper completion.

  8. Written by remruata
    on January 16, 2015 at 4:51 am
    Permalink

    after applying the above settings, i tried to open the new tab i made i.e cygwin tab. What it gives me is a short ‘not responding’ of the console and after that it gives me a small window of the console and i cant maximise it!

  9. Written by jimasp
    on April 1, 2015 at 10:10 am
    Permalink

    That didn’t work for me, but it pointed me to a solution:

    C:\Windows\SysWOW64\cmd.exe /c “”c:\cygwin64\bin\bash.exe” –login -i -c “cd /cygdrive/c/;bash” “

  10. Written by cvakiitho
    on April 10, 2015 at 6:17 am
    Permalink

    If you have problems with this, and you have win7 x64, try to download console2 x64 version.
    Solved it for me.

Subscribe to comments via RSS