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: ,

11 Responses

Subscribe to comments via RSS

  1. Written by AlexScript
    on April 16, 2012 at 9:27 am
    Reply · 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
      Reply · 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
    Reply · 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
      Reply · 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
    Reply · 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
      Reply · 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
        Reply · 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
    Reply · Permalink

    [...] Configuring Console2 with Cygwin [...]

  5. Written by Kyle
    on March 28, 2013 at 10:15 am
    Reply · 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
    Reply · 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.

Subscribe to comments via RSS

Leave a Reply