Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terminal entry not found #20

Closed
hughrawlinson opened this issue Apr 18, 2016 · 30 comments
Closed

terminal entry not found #20

hughrawlinson opened this issue Apr 18, 2016 · 30 comments

Comments

@hughrawlinson
Copy link

When I run micro regardless of input, I get terminal entry not found and the process exits. I'm using zsh inside tmux in iterm without the tmux/iterm integration stuff, which may be confusing isatty?

@zyedidia
Copy link
Owner

This is a tcell error (tcell is the terminal library micro uses).

Here is a description of the error:

ErrTermNotFound indicates that a suitable terminal entry could
not be found. This can result from either not having TERM set,
or from the TERM failing to support certain minimal functionality,
in particular absolute cursor addressability (the cup capability)
is required. For example, legacy "adm3" lacks this capability,
whereas the slightly newer "adm3a" supports it. This failure
occurs most often with "dumb".

I'm sorry but I don't think I can provide more help than this.

@hughrawlinson
Copy link
Author

No worries 😄 I'll play around with my config, and let you know if I come up with a solution.

@bentranter
Copy link

This works for me in the same setup as you @hughrawlinson -- OS X, zsh, iterm, tmux, and no tmux/iterm integration, so maybe I could provide some help, or we could compare our environments/configs?

@zyedidia zyedidia changed the title terminal entry not found on OS X terminal entry not found Apr 19, 2016
@kiasaki
Copy link

kiasaki commented May 19, 2016

@hughrawlinson did you end up making it work? I have the same setup but when running env, TERM is set to screen-256color.

@seankhl
Copy link

seankhl commented Jul 30, 2016

tmux-256color is not happy with this. You can alias micro to

TERM=xterm-256color micro ...

to get around it.

@Anachron
Copy link

My TERM is xterm-termite and I get the same error.

@fifty-six
Copy link

I had my TERM as xterm-termite and changing it to xterm-256color temporarily worked well. Aliasing micro to TERM=xterm-256color micro as @seanlaguna said works well.

@aoloe
Copy link

aoloe commented Aug 30, 2016

does not work for inside of dvtm in iterm2...

echo $TERM
dvtm-256color

@zQueal
Copy link

zQueal commented Aug 30, 2016

λ echo %term%
cygwin
λ micro
no suitable screen available

Setting term to xterm-256color also did not help and I get the same error; no suitable screen available.

@zyedidia
Copy link
Owner

zyedidia commented Aug 30, 2016

Yes unfortunately tcell does not support cygwin. See here.

@ro31337
Copy link

ro31337 commented Aug 31, 2016

Same thing is happening for me when I use screen on Ubuntu.

Linux roman-T450 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Steps to reproduce:

  • Install screen (sudo apt-get install screen)
  • Run screen: screen
  • Edit something: sudo micro /etc/apt/sources.list

The error is "terminal entry not found".

$ echo $TERM
screen.xterm-256color

@zyedidia
Copy link
Owner

zyedidia commented Sep 1, 2016

Ok I think I have a fix for this issue. Go checkout the terminal-entry-fix branch, and recompile micro. Note to compile micro on this branch, you need to have ncurses installed (sudo apt-get install libncurses5-dev). Let me know if it fixes the issue for you -- it worked for me.

@zyedidia
Copy link
Owner

zyedidia commented Sep 4, 2016

A lot of these problems should now be fixed since the issue I opened in tcell was closed. I'll continue to look into a more general fix though. If you have this issue please post here what terminal emulator you are using.

@techtonik
Copy link
Contributor

I've got a dumb terminal that is just a pipe to remote container, and it would be nice if micro error was more descriptive - at least allowed to distinguish between "TERM is not set" and "no absolute cursor (cup capability)".

@petervaro
Copy link

unfortunately the same thing is happening, when TERM is set to screen-16color while in tmux, running inside urxvt. (Same thing without tmux, as urxvt has the same TERM setting as tmux)

@felixsanz
Copy link

This doesn't work on st, any update on this?

@ibrokemypie
Copy link

same issue on kitty, but not alacritty?
https://github.com/kovidgoyal/kitty

@zyedidia
Copy link
Owner

zyedidia commented Jun 4, 2017

If you have this issue you should go run mkinfo. Download one of the binaries or build it from source and then run the binary with the terminal that you are having the error with.

Hopefully micro will work after that.

@zb-z
Copy link

zb-z commented Jun 23, 2017

It doesn't have to support cygwin as in run under it's mintty. It would be enough to launch as any normal/plain windows editor. Part of this might be cygwin's fault, part micro's (for respecting invokers env too much). Here is what I did and got the same error ("no suitable screen available"), $TERM=xterm-256color but that's immaterial.

I've set .gitconfig (under cygwin) to
[core]
editor = ~/bin/git-editor.sh
and the script is one-liner:
cygpath "C:\utils\micro.exe" cygpath -w $1

That's how I'm launching windows editors from cygwin/git and I was looking for a small editor since it would be just editing commit messaged and add -e patches and maybe a few other chores.

So, if micro would check/know that it is actually running on windows it wouldn't/shouldn't even touch anything from cygwin but just run, the way it runs if you double-click it, with it's own conhost and life is good :-).

P.S.
For extra points it could for example sniff around a bit, figure out that it's being lauched by something from a path that contains cygwin (or cygwin64) and then say accept unix path format.

But first things first - needs to run :-)

@jotebe
Copy link

jotebe commented Oct 6, 2017

trying to run mkinfo to support termite on Arch Linux. But, mkinfo won't run, reporting /usr/lib/libtinfo.so.5 is either not found, or has no version information available.

I believe ncurses on arch is a newer release than mkinfo wants; is there an alternative way to extract the term info to give to micro?

@SscSPs
Copy link

SscSPs commented Dec 7, 2017

So, I recently found this project and I was interested in this,
I went ahead and installed it on my cloud(ubuntu) with
curl https://getmic.ro | bash
and when I try to run it, BAM!

terminal entry not found
Micro does not recognize your terminal: screen.xterm-256color
Please go to https://github.com/zyedidia/mkinfo to read about how to fix this problem (it should be easy to fix).

So I searched for it here, and this thread comes up,
So is there any fix?

zyedidia added a commit that referenced this issue Jan 30, 2018
This update incorporates the new terminfo updates in tcell into micro
essentially merging zyedidia/mkinfo into micro. The zyedidia/mkinfo
program should no longer be necessary and micro should automatically
generate a tcell database on its own if it cannot find a terminal
entry. The tcell database will be located in `configDir/.tcelldb`.

Ref #20
Ref #922
@zyedidia
Copy link
Owner

zyedidia commented Jan 30, 2018

This should be fixed now and micro will automatically generate the tcell database by reading terminfo with infocmp if it cannot find the entry in the list of precompiled terminals. https://github.com/zyedidia/mkinfo is no longer necessary.

Micro should work out of the box with st, kitty and other terminals using their own TERM variable.

@Snuggle
Copy link

Snuggle commented Aug 7, 2018

@zyedidia
image

Apologies for responding to an old issue, but this isn't the case for kitty terminal, SSHing into a Raspberry Pi with Micro. Installed using the curl https://getmic.ro | bash command.

I also can't use mkinfo either, because no ARM binaries are available. 🙁

@techtonik
Copy link
Contributor

techtonik commented Aug 10, 2018

Are there any references to standards that say that apps should fallback to first part of the name like xterm if a full terminal name like xterm-kitty is unknown to a program?

@zyedidia
Copy link
Owner

zyedidia commented Aug 10, 2018

This should be fixed in v1.4.1 without the need for the mkinfo program.

@Snuggle
Copy link

Snuggle commented Aug 10, 2018

Updated with curl https://getmic.ro | bash; and sudo mv ./micro /usr/bin/micro!
Thank you so much.

@Snuggle
Copy link

Snuggle commented Aug 12, 2018

I'm now sometimes getting the following error, @zyedidia.

terminal entry not found
Fatal: Micro could not initialize a screen

Should I make a new issue?

@techtonik
Copy link
Contributor

@Snuggle at least it could be visible which entry not found.

@vladfi1
Copy link

vladfi1 commented Mar 31, 2019

I needed to run mkinfo to get micro working in gnu screen.

@efrecon
Copy link

efrecon commented May 6, 2019

So for me, running micro twice after installation was what solved the problem when using kitty. I guess it creates the database the first time and needs to be restarted a second time to read it properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests