Public bug reported: On ubuntu 18.04, opening the default terminal (gnome-terminal 3.28.2-1ubuntu1~18.04.1), ssh'ing to an up-to-date ubuntu 20.04 system, running 'vi', and pressing 'i' shows the unwelcome garbage ESC [>4;m. Pressing ESC emits more garbage: ESC [>4;2m
Focal's default vi is provided by vim.tiny via alternatives. Oddly, when running vim.tiny by itself, or if you install vim and let it provide vi, the garbage does not appear. Evidently focal's vim.tiny is confused about what escape sequences ubu1804's Terminal accepts. TERM is xterm-256color. The problem also occurs if TERM is xterm. There is no .vimrc. If I use xterm on ubuntu 18.04, all is well. Evidently xterm accepts ESC[>4;m and gnome-terminal doesn't? I captured a session using 'script' and dumped typescript via hexdump -C. In this session, I typed i, Q, and escape. Here's an excerpt showing the end of vi's welcome message, followed by five escape sequences and then the Q I typed. The unrecognized ESC > 4;m is visible in the dump, followed by ESC[?25l (CURSOR OFF) 00001070 66 61 75 6c 74 1b 5b 33 34 6d 3c 45 6e 74 65 72 |fault.[34m<Enter| 00001080 3e 1b 5b 6d 20 66 6f 72 20 69 6e 66 6f 20 6f 6e |>.[m for info on| 00001090 20 74 68 69 73 1b 5b 31 3b 31 48 1b 5b 3f 32 35 | this.[1;1H.[?25| 000010a0 68 1b 5b 3f 32 30 30 34 6c 1b 5b 3e 34 3b 6d 1b |h.[?2004l.[>4;m.| 000010b0 5b 3f 32 35 6c 51 1b 5b 38 3b 34 37 48 1b 5b 31 |[?25lQ.[8;47H.[1| The mystery sequence ESC [ > 4;m appears to be "Set/reset key modifier options, xterm", per https://invisible-island.net/xterm/ctlseqs/ctlseqs.html. So it's trying to modify function keys, or something. ssh'ing in from a mac worked fine (TERM there was also xterm-256color), as did ssh'ing from an ubuntu 19.04 system with gnome-terminal. ssh'ing from another ubuntu 18.04 system exhibited the same problem. So it's a little family squabble between focal's vim.tiny and ubuntu 18.04/bionic's gnome-terminal...? Given how long 18.04's going to be supported, this seems worth resolving somehow. ProblemType: Bug DistroRelease: Ubuntu 20.04 Package: vim-tiny 2:8.1.2269-1ubuntu5 [modified: usr/share/vim/vim81/doc/help.txt usr/share/vim/vim81/doc/tags] ProcVersionSignature: Ubuntu 5.4.0-25.29-generic 5.4.30 Uname: Linux 5.4.0-25-generic x86_64 ApportVersion: 2.20.11-0ubuntu27 Architecture: amd64 CasperMD5CheckResult: skip Date: Mon Apr 20 09:27:50 2020 InstallationDate: Installed on 2020-01-27 (83 days ago) InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Alpha amd64 (20200124) SourcePackage: vim UpgradeStatus: No upgrade log present (probably fresh install) ** Affects: vim (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug focal -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to vim in Ubuntu. https://bugs.launchpad.net/bugs/1873920 Title: default vi on focal emits escape sequences unrecognized by bionic's terminal? Status in vim package in Ubuntu: New Bug description: On ubuntu 18.04, opening the default terminal (gnome-terminal 3.28.2-1ubuntu1~18.04.1), ssh'ing to an up-to-date ubuntu 20.04 system, running 'vi', and pressing 'i' shows the unwelcome garbage ESC [>4;m. Pressing ESC emits more garbage: ESC [>4;2m Focal's default vi is provided by vim.tiny via alternatives. Oddly, when running vim.tiny by itself, or if you install vim and let it provide vi, the garbage does not appear. Evidently focal's vim.tiny is confused about what escape sequences ubu1804's Terminal accepts. TERM is xterm-256color. The problem also occurs if TERM is xterm. There is no .vimrc. If I use xterm on ubuntu 18.04, all is well. Evidently xterm accepts ESC[>4;m and gnome-terminal doesn't? I captured a session using 'script' and dumped typescript via hexdump -C. In this session, I typed i, Q, and escape. Here's an excerpt showing the end of vi's welcome message, followed by five escape sequences and then the Q I typed. The unrecognized ESC > 4;m is visible in the dump, followed by ESC[?25l (CURSOR OFF) 00001070 66 61 75 6c 74 1b 5b 33 34 6d 3c 45 6e 74 65 72 |fault.[34m<Enter| 00001080 3e 1b 5b 6d 20 66 6f 72 20 69 6e 66 6f 20 6f 6e |>.[m for info on| 00001090 20 74 68 69 73 1b 5b 31 3b 31 48 1b 5b 3f 32 35 | this.[1;1H.[?25| 000010a0 68 1b 5b 3f 32 30 30 34 6c 1b 5b 3e 34 3b 6d 1b |h.[?2004l.[>4;m.| 000010b0 5b 3f 32 35 6c 51 1b 5b 38 3b 34 37 48 1b 5b 31 |[?25lQ.[8;47H.[1| The mystery sequence ESC [ > 4;m appears to be "Set/reset key modifier options, xterm", per https://invisible-island.net/xterm/ctlseqs/ctlseqs.html. So it's trying to modify function keys, or something. ssh'ing in from a mac worked fine (TERM there was also xterm-256color), as did ssh'ing from an ubuntu 19.04 system with gnome-terminal. ssh'ing from another ubuntu 18.04 system exhibited the same problem. So it's a little family squabble between focal's vim.tiny and ubuntu 18.04/bionic's gnome-terminal...? Given how long 18.04's going to be supported, this seems worth resolving somehow. ProblemType: Bug DistroRelease: Ubuntu 20.04 Package: vim-tiny 2:8.1.2269-1ubuntu5 [modified: usr/share/vim/vim81/doc/help.txt usr/share/vim/vim81/doc/tags] ProcVersionSignature: Ubuntu 5.4.0-25.29-generic 5.4.30 Uname: Linux 5.4.0-25-generic x86_64 ApportVersion: 2.20.11-0ubuntu27 Architecture: amd64 CasperMD5CheckResult: skip Date: Mon Apr 20 09:27:50 2020 InstallationDate: Installed on 2020-01-27 (83 days ago) InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Alpha amd64 (20200124) SourcePackage: vim UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/vim/+bug/1873920/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp