Console and Cygwin integration

1

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?

ashkrosh

Posted 2011-05-29T12:12:01.820

Reputation: 201

Answers

2

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

Peter Nore

Posted 2011-05-29T12:12:01.820

Reputation: 1 642

0

Yes, I use Cygwin with Console2. In settings, create a tab with the following shell value:

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

That's it (assuming you installed Cygwin to the default directory, otherwise change the path to bash.exe accordingly).

Personally, I've gone one step further and set a default directory for Cygwin to start in, by using this shell value:

C:\cygwin\bin\bash.exe --login -i -c "cd /cygdrive/c/Users/Tom/Stuff/; exec /bin/bash"

You'd need to alter the /cygdrive/c/Users/Tom/Stuff/ part to something appropriate for your file system.

ZenoArrow

Posted 2011-05-29T12:12:01.820

Reputation: 66