[BRLTTY] Linux console hacking (was: Re: Footsteps towards better accessibility in Linux)
Nicolas Pitre
nico at fluxnic.net
Fri Mar 27 15:02:46 UTC 2026
On Fri, 27 Mar 2026, Sébastien Hinderer wrote:
> Nicolas Pitre (2026/03/26 21:45 -0400):
> > This is now available in kernels v6.18.20 or later, v6.19.10 or later,
> > and the upcoming v7.0.
> >
> > Disclaimer: Someone else contributed this support to v6.18.0 but it was
> > completely broken for /dev/vcsu users like BRLTTY. This prompted me to
> > finally look at it and contribute a fix, hence those kernel versions
> > above.
>
> Thank you so much for the time, work and efforts you dedicate to this,
> Nicolas.
>
> Once the kernel has been updated, is there anything more to do so that
> applications actually take advantage of this, or are things going to
> "just work"?
You need to update the "linux" terminfo entry. This script should do it:
=====
#!/bin/sh
set -e
WORK=$(mktemp /tmp/terminfo-XXXXXX.ti)
trap 'rm -f "$WORK"' EXIT
infocmp "linux" > "$WORK"
# Check if already patched
if grep -q 'smcup' "$WORK"; then
echo "smcup/rmcup already present, nothing to do."
exit 0
fi
# Insert smcup/rmcup before the closing entry (last capability line)
sed -i 's/\(.*\),$/\1,\n\tsmcup=\\E[?1049h, rmcup=\\E[?1049l,/' "$WORK"
echo "Compiling patched terminfo entry..."
tic -x "$WORK"
=====
This installs the patched entry to ~/.terminfo (user-only, no root
needed). For a system-wide install, change the tic line to:
sudo tic -x -o /usr/share/terminfo "$WORK"
Nicolas
More information about the BRLTTY
mailing list