terminfo file xterm-256color has entries that make vi unusable when sshing in from last lts (18.04)

Bug #1872896 reported by Guntram Blohm
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ncurses (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

This happens on a 20.04 LTS (Focal Fossa) beta system, specifically, the xubuntu-20.04-beta-desktop-amd64.iso as downloaded on Apr 14.

When sshing into the 20.04 system, from the previous LTS (18.04), entering/exiting insert mode in vi emits what looks like CSI>4;m resp. CSI>4;2m. Both sequences aren't recognized by the 18.04 terminal, resulting in garbled output and vi being unusable.

Tags: bot-comment
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1872896/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Chris Guiver (guiverc) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:

apport-collect 1872896

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

ps: As you're using two Ubuntu releases, this should be done on the focal fossa system. The download date actually doesn't mean much without timezone info & time of download (to narrow down to which daily ISO used), the apport-collect will gather this information including package details.

It may also be helpful to know what terminal you are using on your 18.04 system (esp. if a gui is used, eg. my default terminal is Qterminal, your default could be xfce4-terminal or something different..)

Revision history for this message
Guntram Blohm (4-launihpad-4) wrote :

I ran apport-collect on the focal, but got the message "no additional information collected" every time. Hope some info got through anyway.

I would have loved to state the package name, but the only thing I know is the filename - /usr/lib/terminfo/x/xterm-256color.

Neither
apt-file search /usr/lib/terminfo/x/xterm-256color
nor
dpkg -S /usr/lib/terminfo/x/xterm-256color

came up with a package name. See also https://askubuntu.com/questions/1227284/which-package-has-creates-terminfo-files?noredirect=1#comment2064818_1227284 ( it seems you have already answered that question there).

The terminal I'm using is /usr/bin/xfce4-terminal. The same happens with tilix, but that's not part of Ubuntu, so it probably won't help much. However, both of them link /usr/lib/x86_64-linux-gnu/libvte-2.91.so.0.5200.2 which is, I assume, the library that does the actual escape sequence decoding.

Revision history for this message
Guntram Blohm (4-launihpad-4) wrote :

It seems like the package is ncurses-base, which provides /lib/terminfo/x/xterm-256color, but as /lib is a symlink to /usr/lib, the file ends up there.

Revision history for this message
Brian Murray (brian-murray) wrote :

I was unable to recreate this. Have you tried not loading any vimrc files to see if that changes the behavior?

Changed in ubuntu:
status: New → Incomplete
Revision history for this message
Guntram Blohm (4-launihpad-4) wrote :

I checked which vi I'm using - it's /usr/bin/vi, which links to /etc/alternatives/vi, which links to /usr/bin/vim.tiny.

Then, to make sure, I created an empty file (touch empty) and used the full path of to run vi on that file, with and without -u NONE.

/usr/bin/vi empty - the sequence ?>4;m appears when typing a to get into insert mode, and ?>4;2m appears when pressing ESC to leave insert mode.
/usr/bin/vim.tiny empty - the problem does NOT appear
/usr/bin/vi -u NONE empty - the problem does appear
/usr/bin/vim.tiny -u NONE empty - the problem does appear

Revision history for this message
Guntram Blohm (4-launihpad-4) wrote :

I made a small video where I'm calling vi in different ways. Every time, I press a for insert mode, type a few characters, then press ESC to exit insert mode again.

affects: ubuntu → ncurses (Ubuntu)
Changed in ncurses (Ubuntu):
status: Incomplete → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ncurses (Ubuntu):
status: New → Confirmed
Revision history for this message
Mike Dotson (mgdotson) wrote :

Installing vim package resolves the issue of `vi empty`.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.