cygwin/msys terminal connector

This helper tool is an attempt to create the symbiont of POSIX enabled pty and WinAPI full-featured terminal.

It supports:

Since ConEmu build 170705 connector binaries are distributed with ConEmu 7z-pack and installer.

Screenshots

Just a cat AnsiColors256.ans from bash

cygwin

How to use connector

Since ConEmu build 170705 connector binaries is included in ConEmu 7z-pack and installer.

Default tasks are created for new configurations: {Bash::bash}, {Bash::Git bash}, {Bash::CygWin bash x64}, etc.

If you already have these tasks, press Add/refresh default tasks to update existing default tasks contents.

WARNING

  • Do not run connector from cygwin or msys shell! Different cygwin/msys layers will cause problems!
  • Connector might be started as ROOT PROCESS or from some native shell (like cmd.exe) already started in ConEmu.

Examples

Here are few examples to clarify command changes.

NB Following examples are one-line commands, they are splitted by lines just to simplification.

Cygwin 64 bash

Supposing cygwin is installed into C:\cygwin64.

set CHERE_INVOKING=1
 & set "PATH=C:\cygwin64\bin;%PATH%"
 & %ConEmuBaseDirShort%\conemu-cyg-64.exe /usr/bin/bash.exe --login -i -new_console:p:C:"C:\cygwin64\Cygwin.ico"
  • CHERE_INVOKING=1 tells cygwin shell don’t CD to user profile, but use ConEmu working directory.
  • set "PATH=C:\cygwin64\bin;%PATH%" forces proper cygwin1.dll required by conemu-cyg-64.exe.
  • /usr/bin/bash.exe --login -i is the shell with arguments, you may use any other shell like zsh, fish, etc.
  • -new_console:p:C:"C:\cygwin64\Cygwin.ico" is ConEmu special switch.

Bash On Windows (WSL)

On Windows 10 with installed Windows Subsystem for Linux.

set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pm:/mnt

Want to run specific shell or pass arguments?

Let’s run /usr/bin/zsh -l -i in Cygwin x32, which was installed in C:\Cygwin. Just create or change the Tasks:

set CHERE_INVOKING=1 & C:\Cygwin\bin\conemu-cyg-32.exe /usr/bin/zsh -l -i

Supported switches

You may run conemu-cyg-32.exe --help to learn about options.

ConEmu cygwin/msys connector version 0.6
Usage: conemu-cyg-32 [switches] [- | shell [shell switches]]
  -?, -h, --help   this help
  -d, --dir <dir>  chdir to `dir` before starting shell
                   forces `set CHERE_INVOKING=1`
  -t <new-term>    forces `set TERM=new-term`
  --log [<dir>]    write console IN and OUT to files in `dir` folder
                   use current folder if <dir> is not specified
  --debug          wait for debugger for 60 seconds
  --environ        print environment on startup
  --isatty         do isatty checks and print pts names
  --keys           read conin and print bare input
  --shlvl          forces `set SHLVL=1` to avoid terminal reset on exit
  --verbose        additional information during startup
  --version        print version of this tool
  --wsl            run wslbridge to start Bash on Ubuntu on Windows 10
Download    Donate