I've installed new Cygwin: 1.7 and couldn't create a Console! tab for Cygwin like before. Is there anybody there who has successfully used Cygwin inside Console?

link|improve this question
feedback

2 Answers

I've used Cygwin in ConsolePortable. Sure, you can do it without a cygwin.bat file; just put /path/to/cygwin/bin/bash --login -i as your shell. There is a lot more flexibility if you use a bat file to launch it, though; for example, you can specify a home directory outside the Cygwin folder. Assumptions:

doc/unix/.bashrc    
dev/ConsolePortable/Data/Settings/console.xml
dev/ConsolePortable/console.exe
dev/cygwin/cygwin.bat

Edit ConsolePortable/Data/Settings/console.xml:

<settings>
<!-- console.xml -->
    <console shell="..\cygwin\cygwin.bat" init_dir="..\cygwin" >
<!-- ... etc ... -->
</settings>

Edit cygwin.bat:

echo off
SETLOCAL
set SHELL=/bin/bash
REM -> you can set home here if you don't want /cygwin/home/username, e.g. HOME=%~dp0..\..\doc\unix
bin\bash --login -i
ENDLOCAL
link|improve this answer
feedback

How did you have Console setup to use Cygwin as the shell previously (what was on the Shell line in the Tab settings)? In my Console settings, my cygwin/bash tab has C:\cygwin\Cygwin.bat as the shell to ensure everything gets loaded successfully. Honestly don't know which version of Cygwin I'm running though, haven't updated in a couple months. Can you start cygwin normally with the batch file without using Console?

link|improve this answer
You shell should be bash not cygwin.bat. I doubt if it works for you. And yes I can use cygwin by running its batch file. – ashkanr May 31 '11 at 4:19
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.