Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678486 - x11-terms/kitty: split out kitty-terminfo
Summary: x11-terms/kitty: split out kitty-terminfo
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Pablo Orduna
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-21 10:35 UTC by gerion
Modified: 2020-03-26 12:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
create-only-terminfo.patch (create-only-terminfo.patch,2.29 KB, patch)
2020-03-11 20:23 UTC, gerion
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gerion 2019-02-21 10:35:12 UTC
Kitty brings its own terminfo file that is installed when installing kitty.
However, all servers that you ssh into complain that xterm-kitty is unknown.

The kitty packaging guide (https://sw.kovidgoyal.net/kitty/build.html#note-for-linux-macos-packagers) recommends to create two packages, one that only provide the terminfo file. For GUI-less servers this would be the right solution, I guess.

See also https://sw.kovidgoyal.net/kitty/faq.html#i-get-errors-about-the-terminal-being-unknown-or-opening-the-terminal-failing-when-sshing-into-a-different-computer
Comment 1 Jeroen Roovers gentoo-dev 2019-02-21 11:56:04 UTC
That means it should be added to ncurses.
Comment 2 Jeroen Roovers gentoo-dev 2019-02-21 11:57:12 UTC
(In reply to gerion from comment #0)
> However, all servers that you ssh into complain that xterm-kitty is unknown.

That problem will be solved in a couple of years, then, assuming people ever upgrade ncurses. :-)
Comment 3 gerion 2019-02-21 11:59:42 UTC
If ncurses upstream is updated with this and that seems not to be possible:
https://github.com/kovidgoyal/kitty/issues/879

However, on my own servers I could install kitty-terminfo, if this package would exist.
Comment 4 gerion 2019-02-21 12:04:39 UTC
Hmm, have not read far enough, there seems to be some support with ncurses, but not in a consistent way.
Comment 5 Georgy Yakovlev gentoo-dev 2019-02-27 20:29:48 UTC
kitty terminfo was added to ncurses upstream
https://lists.gnu.org/archive/html/bug-ncurses/2018-10/msg00024.html

not sure when it get released, can be a loooong time (years).

alacritty is in same situation, but it works with and without terminfo, when terminfo files are not installed it will just use xterm-256color on localhost and remotely.

some info here
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7683342c9957081e3c4775facfce56078ea587fa


I don't use kitty, how it behaves with TERM=xterm-256color ?
if you set it before ssh it may work fine, alacritty does.
Comment 6 gerion 2019-02-27 21:47:43 UTC
The problem as I get it is that kitty upstream provides a terminfo where it is named xterm-kitty and also names itself in this way and ncurses provides a terminfo where kitty is named only kitty.
Comment 7 gerion 2020-03-08 10:23:26 UTC
Update, now, the ncurses "kitty" terminfo is stable in Gentoo. However, the description seems to be incomplete: https://github.com/neovim/neovim/issues/11973

So please package a kitty-terminfo (or a useflag for kitty that installs only the terminfo file).
Comment 8 Pablo Orduna 2020-03-11 18:16:27 UTC
I think that a correct terminfo file should be added to ncurses instead of adding a new package just for the xterm-kitty terminfo file.

The main problem I see with making a new ebuild for kitty-terminfo is that, as stated in the packaging guide (https://sw.kovidgoyal.net/kitty/build.html#note-for-linux-macos-packagers), the installation of the terminfo file requires the execution of:
$ python3 setup.py linux-package

And then the terminfo file would be located under "linux-package/share/terminfo", which means that an ebuild for kitty-terminfo would require the user to compile the whole terminal emulator just to install the terminfo file after that.
Comment 9 gerion 2020-03-11 20:23:00 UTC
Created attachment 618046 [details, diff]
create-only-terminfo.patch

(In reply to Pablo Orduna from comment #8)
> I think that a correct terminfo file should be added to ncurses instead of
> adding a new package just for the xterm-kitty terminfo file.
In an ideal world, yes. However, kitty and ncurses seem to disagree about the specific file. The ncurses file uses another terminal name (ok, one can fix it when setting the term config option of kitty) and propose other features of kitty, only fixable with an update of ncurses. Kitty upstream recommends installing the terminfo file. I think for the user this is a valid workaround until ncurses and kitty agreed about the file.


> The main problem I see with making a new ebuild for kitty-terminfo is that,
> as stated in the packaging guide
> (https://sw.kovidgoyal.net/kitty/build.html#note-for-linux-macos-packagers),
> the installation of the terminfo file requires the execution of:
> $ python3 setup.py linux-package
> 
> And then the terminfo file would be located under
> "linux-package/share/terminfo", which means that an ebuild for
> kitty-terminfo would require the user to compile the whole terminal emulator
> just to install the terminfo file after that.
You are right, see attached patch (a little bit quick and dirty, this should be done upstream):
./setup.py linux-terminfo --prefix $PWD/install
Comment 10 Pablo Orduna 2020-03-12 00:25:45 UTC
I see, that's much better. Thank you very much!

I have proposed a pull request to include it as a separate package
Comment 11 gerion 2020-03-12 13:33:28 UTC
Thank you. Feel free to bring the patch to kitty upstream :). There would be the right place for it.
Comment 12 gerion 2020-03-24 00:01:20 UTC
Thank you, but I find it quite unintuitive to install kitty and not getting a functional terminal after that. Other said: kitty is unusable without the terminfo file.

Can you please either make kitty installation like before and an exclude with kitty-terminfo (that is the package for GUI-less server installations) or make kitty hard depend on kitty-terminfo?
Comment 13 Zoë Sparks 2020-03-25 23:07:42 UTC
(In reply to gerion from comment #12)
> Thank you, but I find it quite unintuitive to install kitty and not getting
> a functional terminal after that. Other said: kitty is unusable without the
> terminfo file.
> 
> Can you please either make kitty installation like before and an exclude
> with kitty-terminfo (that is the package for GUI-less server installations)
> or make kitty hard depend on kitty-terminfo?

I second this. I just rebooted after running upgrades and was more than a bit shocked when my terminal was broken.
Comment 14 Pablo Orduna 2020-03-26 12:11:09 UTC
An update us already available which resolves that by including kitty-terminfo as a dependency.

Sorry for the inconvenience