diff options
authorSebastian J. Bronner2019-11-07 00:19:19 +0100
committerSebastian J. Bronner2019-11-07 00:19:19 +0100
commit0ce8ba0ecf338a512b2f275a305fca7012b2271d (patch)
parenteb4d0d26b0c8f6cf9a44e79cc1ab7dbf6466d795 (diff)
Update terminfo explanation and workaround
3 files changed, 63 insertions, 37 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 299e8f49ea9..7c5e65827e9 100644
@@ -5,19 +5,18 @@
pkgdesc='A simple virtual terminal emulator for X.'
arch=('i686' 'x86_64' 'armv7h')
-makedepends=(libxext ncurses)
- b282c0b963a24299d02e485af30260d237ca2e8e6b06282d385022c9c10a0950
- 9a1b764cedd3a6288cc6601a3cdce06f4ab993f44de7aea5afd69511c13df7c0)
+ bf6c8b73a606a8e513c7919d91f93ed7aeb5f44e80269bb244cc01659145a5ea
+ 0ebcbba881832adf9c98ce9fe7667c851d3cc3345077cb8ebe32702698665be2)
@@ -69,4 +68,5 @@ package() {
install $installopts "$licdir" "$_sourcedir/LICENSE"
install $installopts "$docdir" "$_sourcedir/README"
install $installopts "$docdir" README.terminfo.rst
+ install $installopts "$shrdir/$pkgname" "$_sourcedir/"
diff --git a/README.terminfo.rst b/README.terminfo.rst
index c5f4b6db6fe..cd724d0d4cd 100644
--- a/README.terminfo.rst
+++ b/README.terminfo.rst
@@ -2,16 +2,16 @@ Terminfo Entries
:Author: Sebastian J. Bronner <>
-:Date: 2019-10-30
+:Date: 2019-11-06
The Problem
-Most Linux-based distributions will have the bulk of their terminfo entries in
-the ``ncurses`` package. These live in ``/usr/share/terminfo``. There you will
-find several entries for ``st``. These, however, do not work well with current
-versions of ``st``. You need the terminfo entries supplied with ``st``.
+Most Linux-based distributions will have their terminfo entries in the
+``ncurses`` package. These live in ``/usr/share/terminfo``. There you will find
+several entries for ``st``. As of ``ncurses-6.1`` as packaged in ArchLinux,
+these, do not work well with current versions of ``st``.
Specifically, I have observed the following issues when using the terminfo
entries supplied with ``ncurses``:
@@ -38,40 +38,53 @@ For reference, I performed these tests using the following software versions:
``st`` 0.8.2, ``tmux`` 2.9_a, ``neovim`` 0.4.2, and ``w3m``
-The Solution
+A couple of issues have been filed against ``tmux`` for this. Although it is
+not a problem with ``tmux`` the issues remain for reference:
-The ``ncurses`` package should stop shipping terminfo entries for ``st``. These
-should then be provided in ``/usr/share/terminfo`` by this (and other) ``st``
-packages. The conflicting terminfo entries are
-* ``st`` and
-* ``st-256color``.
+While it may be tempting to use the terminfo files shipped with ``st``, that
+would be a bad idea from a packaging standpoint. There are two reasons for
+this: (1) As of ``st-0.8.2`` they have errors in them. This has been fixed and
+will roll out in the next release, though.
-Additional entries that could be considered for removal from ``ncurses`` are
-* ``st-0.6``,
-* ``st-0.7``,
-* ``st-16color``,
-* ``st-direct``,
-* ``stterm`` (for distributions that rename ``st`` to ``stterm``),
-* ``stterm-16color``, and
-* ``stterm-256color``.
+(2) It is vital that remote terminals connecting via ``ssh`` are known. That is
+accomplished by having all terminfo files in one package (like ``ncurses``).
-This solution cannot be implemented without the cooperation of ``ncurses``
-since many distributions (including Arch Linux) do not allow for two packages
-that provide files with identical paths to be installed side-by-side.
-Therefore, I am bringing this to the attention of the ``ncurses`` team.
+``ncurses`` has released updated terminfo entries. The problem as described
+above is fixed. However, the updated terminfo entries are not installed on
+ArchLinux because they were released as a standalone file without a new release
+of the rest of ``ncurses``.
+The Solution
+The solution must be to get the updated terminfo entries packaged for
+ArchLinux. I believe that the ``ncurses`` package should be updated to that
The Workaround
A somewhat painful, albeit pragmatic, workaround is as follows: A user that
encounters issues that are due to mismatched terminfo entries, such as those
-above, can symlink the terminfo entries included in this package into her
-user-level terminfo database using the following commands:
+above, can populate a user-level terminfo database from the terminfo entries
+supplied by ``st``. The following command will do this:
.. code:: shell
- mkdir ~/.terminfo/s
- ln -s /usr/share/st/terminfo/s/* ~/.terminfo/s
+ tic -sx /usr/share/st/
+The generated terminfo database will most likely be placed in ``~/.terminfo``.
+The command will print the actual location used. Unfortunately, these files
+need to be kept up to date by hand. Actually they should probably be removed as
+soon as a new version of ``ncurses`` is released.
diff --git a/terminfo.patch b/terminfo.patch
index e91e91f6c8e..0f2ae88308b 100644
--- a/terminfo.patch
+++ b/terminfo.patch
@@ -1,12 +1,25 @@
---- Makefile 2019-02-09 12:50:41.000000000 +0100
-+++ Makefile 2019-10-30 23:39:55.775193275 +0100
-@@ -47,7 +47,8 @@
+--- Makefile.old 2019-02-09 12:50:41.000000000 +0100
++++ Makefile 2019-11-07 00:00:24.487953923 +0100
+@@ -47,7 +47,6 @@
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
- tic -sx
-+ mkdir -p $(DESTDIR)$(PREFIX)/share/st/terminfo
-+ tic -sx -o $(DESTDIR)$(PREFIX)/share/st/terminfo
@echo Please see the README file regarding the terminfo entry of st.
+--- 2019-02-09 12:50:41.000000000 +0100
++++ 2019-11-07 00:01:02.605412883 +0100
+@@ -189,10 +189,10 @@
+ rmxx=\E[29m,
+ smxx=\E[9m,
+ # tmux extensions, see TERMINFO EXTENSIONS in tmux(1)
+- Se,
+- Ss,
+ Tc,
+ Ms=\E]52;%p1%s;%p2%s\007,
++ Se=\E[2 q,
++ Ss=\E[%p1%d q,
+ st-256color| simpleterm with 256 colors,
+ use=st,