bash - How to use Console2 with tmux

07
2014-07
  • Rich Ashworth

    I am able to start tmux using the mintty terminal included with cygwin. However, when using Console2 (running on 64-bit windows 7 and using C:\cygwin64\bin\bash.exe as the shell), I get the following error:

     $ tmux
     open terminal failed: not a terminal
    
  • Answers
  • Maximus

    Impossible for now.

    Tmux requires "cygwin-enabled" terminal emulator. Mintty is one of them.

    Console2 works on top of real Windows console, and cygwin don't like it.

    Possible ways:

    • Convince cygwin developers to support Windows. I don't believe that is possible, but you may try.
    • Use another emulation program. For example ConEmu (I'm the author) may run simple child graphical applications, which is mintty. So, you will get tabbed or splitted environment on top of mintty which may host tmux.

  • Related Question

    console - How do I host a mintty shell inside of Console2?
  • Peter Mounce

    I like to use Console2 for my Windows shell work, where I usually make it open a cygwin bash prompt.

    I'd like to try out MinTTY (2), and want to host it within Console2 as well. If this is possible, how do I do it?

    I've set Console2 to have a tab that fires

    C:\cygwin\bin\mintty.exe -
    

    but this removes the Console2 window and creates a MinTTY one that is not visible.


  • Related Answers
  • 8088

    You can not do that.

    Console2 (being a "Terminal Emulator") hosts terminal programs .. as in "hey, I will render the chars you want to output and I will give you what the user types into the keyboard". Useful terminal programs mostly used in "Terminal Emulators" are "Shells", such as "cmd.exe" or "powershell.exe" or "bash.exe" or "zsh.exe". If you like it, you could also host "python.exe" from within Console2.

    Mintty is also a "Terminal Emulator". For that reason, you can not do what you are asking for.

    Just to explain the used 'terms' (hehe) a bit more:

    • Terminal: "The function of a terminal is confined to display and input of data ... A text terminal, or often just terminal (sometimes text console) is a serial computer interface for text entry and display." Back in the good old days these "terminals" were really hardware and looked like:

      alt text

    • Terminal Emulator: "A terminal emulator, terminal application, term, or tty for short, is a program that emulates a "dumb" video terminal within some other display architecture. Though typically synonymous with a command line shell or text terminal, the term terminal covers all remote terminals, including graphical interfaces."

    • Shell: "A shell is a piece of software that provides an interface for users to an operating system..."

  • munissor

    You cannot host MinTTY, but you can use directly the Cygwin bash as the Console2 shell. Just create a new tab with \bin\bash.exe --login -i as your shell