Menu

#2 Support ConEmu Windows Console.

1.0
closed
Alexx83
None
2017-02-05
2013-11-30
No

Hi,

I saw in your .bat scripts that you support next to mintty also the ConsoleZ console.

Would you like to support also ConEmu? It is my favourite, and I think the best one for Windows.
ConEmu: http://code.google.com/p/conemu-maximus5/

Problem with Console2 and ConsoleZ is for instance that ncurses doesn't work in these consoles. In ConEmu ncurses works.
ConEmu also has better support for Unicode text.

I like mintty also, but mintty is better for a POSIX environment, like Cygwin and Msys. The downside of mintty is that it doesn't accept standard input from native Windows programs. Therefore my favourite console for mingw32/64 is ConEmu.

best regards,
Erwin Waterlander

Discussion

1 2 > >> (Page 1 of 2)
  • Alexx83

    Alexx83 - 2013-11-30
    • assigned_to: Alexx83
     
  • Jack Napier

    Jack Napier - 2013-12-04

    Hello there,

    I use Msys2 on Conemu.
    You can see my changes below,

    First, the task in conemu

    -new_console:d:C:\dev\my_real_home "call c:\TDM-GCC-64\mingwvars.bat && c:\dev\msys2_launcher.bat"
    

    Second, the msys2_launcher.bat file

    @echo off
    cd /d c:\dev\msys64
    
    set MSYSTEM=MSYS
    call .\bin\sh --login -i
    

    Third, I modify my home in /etc/passwd (with /c/dev/my_real_home/)

    Good luck

     
  • Erwin Waterlander

    Hi,

    I added two tasks to ConEmu this way.

    One for mingw-shell:
    %SystemDrive%\msys2\msys32\bin\sh.exe -c 'MSYSTEM=MINGW32 exec /bin/sh --login -i'

    And one for msys-shell:
    %SystemDrive%\msys2\msys32\bin\sh.exe -c 'MSYSTEM=MSYS exec /bin/sh --login -i'

     
    • Andreas Larsen

      Andreas Larsen - 2014-11-12

      I tried these and I do get msys2 as a tab inside ConEmu now, but TAB completion does not seem to work.

      Example: cd /c/re<tab> inserts whitespace instead of autocompleting /c/repos

      Any ideas?

       
  • Alexx83

    Alexx83 - 2013-12-24

    Some days ago I try ConEmu. Many thing doesn't work well on it for me.

     
  • Erwin Waterlander

    For me it works fine. I use the latest development version. What does not work for you?
    The author is very helpful if you report problems.
    best regards,
    Erwin

     
  • Alexx83

    Alexx83 - 2013-12-26

    All applications that use ncurses doesn't work properly. Like mc (Midnight Commander)

     
  • Erwin Waterlander

    I think this is normal.
    You have to understand that POSIX applications, your MSYS2 applications, handle std input differently than native Windows applications.
    An ncurses application build for cygwin or msys(2) will not work in a normal Windows console, or ConEmu, or Console 2.

    To work properly in cmd.exe/ConEmu you need a MING version of ncurses. And the MINGW version on ncurses will not work in mintty.

    By the way, the MINGW version of ncurses you ship (5.9.20110404) is old and has known problems on Windows. See what I did for WCD. http://waterlan.home.xs4all.nl/
    Several problems are listed in http://waterlan.home.xs4all.nl/whatsnew.txt

    There are still problems with ncurses for Windows cmd.exe, so I still use PDCurses. I am in contact with the ncurses author to fix the problems, but he does not have much time to fix it.

    By the way, your ncurses for MINGW does not work at all for me.

     
  • Alexx83

    Alexx83 - 2013-12-27

    I use old ncurses for mingw because new one doesn't work for Python.

     
  • Erwin Waterlander

    OK.

     
  • Maximus5

    Maximus5 - 2014-02-14

    @Alexx83

    All applications that use ncurses doesn't work properly. Like mc (Midnight Commander)

    What do you mean "doesn't work properly"?

     
  • Alexx83

    Alexx83 - 2014-02-16

    Maximus5, for example not working cursor keys for Midnight Commander and other programs.

     
  • Maximus5

    Maximus5 - 2014-02-20

    Seems like ncurses (\MinGW\msys32\bin\msys-ncursesw6.dll) is sooo buggy...
    It does not know, that ConEmu CAN process ANSI sequences, and tries to emulate ANSI internally. And fails.
    For example, even if you run simple sh in windows console (Win+R, C:\MinGW\msys32\bin\sh.exe --login -i), do something (ls /) and press Ctrl+L - screen was not cleared at all, only cursor jumps to third line of the visible area...

    Need the possibility to force ncurses send ANSI to ConEmu untouched.

     
  • Alexx83

    Alexx83 - 2014-02-20

    Yeah. Ncurses need to be fixed to work properly under cmd/ConEmu/mintty. Maybe we need to cooperate with ncurses DEVs

     
  • Ray Donnelly

    Ray Donnelly - 2014-02-20

    ARAIR we need to use the #win32cons driver for ncurses but it is too buggy at present. Someone with some time to spare needs to step up and fix it.

     
  • Maximus5

    Maximus5 - 2014-02-20

    I believe, this is not an ideal solution within ConEmu... Because ConEmu ANSI supports much more commands (ANSI codes) that may process any other parser, which relay on standard Windows console. Xterm256 for example, ConEmu's GuiMacro and so on.
    In the native win console - yes, may be.

     
  • Ugabade

    Ugabade - 2014-10-25

    The clear command does not work with MSYS2 on ConEmu. Strangely, it works on a standard Windows cmd prompt and mintty. The reset command does work.

    Anyone else with this issue?

     
  • Maximus5

    Maximus5 - 2014-10-26

    clear will be working if you add to your ".bashrc"

    TERM=cygwin
    

    Strangely but "bash -l -i" sets TERM to "xterm-256color". Why? msys2 core is not able (or ready) to use ConEmu ANSI abilities. It just process ANSI internally. And its clear (or Ctrl+L) realization has a bug.

    Another strange thing, that if you execute "TERM=msys" bash will immediately crash.

    Max@PC ~
    $ set | grep TERM
    TERM=xterm-256color
    Max@PC ~
    $ TERM=msys
    0 [main] bash 13256 cygwin_exception::open_stackdumpfile: Dumping stack trace to bash.EXE.stackdump
    

    PS. The same result happens in standard Windows console (not mintty of course). Issue is not ConEmu related...

     

    Last edit: Maximus5 2014-10-26
  • Alexx83

    Alexx83 - 2014-10-27

    Maximus5, I'm set TERM=xterm-256color in /etc/profile to get proper output for apps like MC.
    TERM=msys is not allowed as NCURSES doesn't have it in database

     
  • Maximus5

    Maximus5 - 2014-10-27

    But I'm pretty sure bash must not crash if "TERM=msys", isn't it? Version 1 is not crashing.

    And may be it will be better to put into /etc/profile something like this?

    if [ -n "${ConEmuDir}" ]; then
      export TERM=cygwin
    else
      export TERM=xterm-256color
    fi
    
     
  • Alexx83

    Alexx83 - 2014-10-27

    MSYS1 don't use NCURSES that is why it not crash.

     
  • Maximus5

    Maximus5 - 2014-10-27

    I see.
    BTW, may be You know the way to disable NCURSES internal ANSI processing?
    Till now I'm aware about only one method - cygwin terminal emulation (like mintty). But ConEmu is working with real console window and can handle ANSI...

     
  • Alexx83

    Alexx83 - 2014-10-27

    I don't know. I think we need reopen discussion with NCURSES devs.

     
  • Ugabade

    Ugabade - 2014-10-31
    if [[ -n "$ConEmuDir" ]]; then
        export TERM=cygwin
    else
        export TERM=xterm-256color
    fi
    

    Works for MSYSTEM=MSYS but not when MSYSTEM=MINGW64, in this case I get

    $ clear
    'cygwin': unknown terminal type.
    
     

    Last edit: Ugabade 2014-10-31
  • Angelo Graziosi

    Angelo Graziosi - 2016-01-12

    I installed msys/conemu-git r3330.34a88ed-1 and added the tasks for MSYS2. MinGW32 and MinGW64. For example (MSYS2 task)

    set MSYSTEM=MSYS & set MSYSCON=mintty.exe & %ConEmuDir%\..\..\usr\bin\bash.exe --login -i -new_console:C:"%ConEmuDir%\..\..\msys2.exe"
    

    So I can use a tab for MSYS2, another for MinGW32 etc.

    After this I tried to configure ConEmu so that it works as other terminals (MinTTY, iTerm2, Terminal-gmome etc.) and discovered that it CANNOT select with a double mouse click.. This left me unsatisfied..

    Yes, on the web there are suggestions how to setup this (http://twigstechtips.blogspot.it/2015/05/conemu-cmder-how-to-select-text-by-left.html or https://github.com/Maximus5/ConEmu/issues/493), but it is not what the user wants.

    BTW, maybe they are also wrong.

    For example, if one sets to ALWAY the "Block (rectangular) selection", apparently seems one can select with a double click but, really, one loses the ability to select from a line to another because now every selection is on a rectangular region. Also, it selects only to the end of a line. Consider this example:

    -rw-r--r-- 1 none none    42412 11 gen 19.45 mingw-w64-x86_64-emacs-git-r12410
    2.1.eb0643c-1-build-logs.tar.xz
    

    With "Block (rectangular) selection" set to ALWAYS, one cannot select the string "r124102.1.eb0643c-1". If one double click on "mingw-w64-x86_64-emacs..." only "mingw-w64-x86_64-emacs-git-r12410" is selected, not the full file name as one expect and as occurs on other terminals. If the above option is set to default, LEFT ALT, holding ALT and double clicking has the same result: only to the end of the line.

    Maybe I have not understood how to configure ConEmu...

     
1 2 > >> (Page 1 of 2)