Immediately after startup micro shows "No suitable screen available" error and exits.
micro 1.3.1
Compiled on August 08, 2017
Commit hash: d5afc0
OS: Windows 7 64-bit
Terminal: CMD (both stand-alone and within ConEmu)
Same error - x64 and x86 ran in mintty (default Cygwin terminal emulator), works in cmd.
Same issue here:
micro 1.3.1 64bit
OS: Windows 10
Terminal: cmd and powershell
Same issue here:
micro 1.3.2 | 64bit & 32bit
OS: Windows 10
Terminal: cmd and PowerShell
OK, I found solution. Check you environment variables. On one computer I found $env:TERM variable set to "xterm". After removing the variable it started to work. On second computer I had $env:MICRO_TRUECOLOR set to 1, after removing the variable it started to work too.
Removing that does work, but it doesn't seem to use truecolor when it's not set
It's been almost a year now, any updates on this issue? I'm having the same problem with 1.4.0:
no problems using micro on cmd but "no suitable screen available" on Babun/mintty. Un-setting TERM just makes micro hang and fiddling around with MICRO_TRUECOLOR has no effect whatsoever.
Screencap here (streamable)
EDIT: as zyedidida correctly tagged, tcell does not support termios on Windows and will error out.
EDIT 2: even cmd now supports 24-bit colors but apparently tcell does not on Windows?
This isn't a solution for all cases, but if you are using mintty and you are using the windows build of micro, then you can simply do 'winpty micro' and it will work except for mouse input.
You can also use an alias in your shell startup script:
alias micro='winpty micro'
And to use it as your git editor:
git config --global -e core.editor 'winpty micro'
I have this problem as well. I'm running 64-bit Windows 10.
Even though I don't know a perfect solution, I can confirm that the workaround posted by @jeernest is valid. In PowerShell, that would be the following:
$Env:TERM=''
I think it's more convenient to do the following:
notepad $profile (make sure to create $profile if it doesn't exist)
...and then add the aforementioned variable assignment to the profile. This way, every time you start PowerShell, micro will work without the error No suitable screen available.
same on Server 2019
Most helpful comment
OK, I found solution. Check you environment variables. On one computer I found $env:TERM variable set to "xterm". After removing the variable it started to work. On second computer I had $env:MICRO_TRUECOLOR set to 1, after removing the variable it started to work too.