At 2026-04-28T18:38:42+0800, 王浩宇 wrote: > I am reporting a UX issue on macOS caused by two specific terminfo > files in the ncurses package. > > The Problem: > When ncurses is installed on macOS, the compiled terminfo database > creates two actual files named exactly iTerm.app and iTerm2.app > (located in share/terminfo/69/). > > Because macOS uses .app as the exclusive extension for native > applications, the system’s Spotlight indexer automatically detects > these files and displays them as executable apps in the macOS > Launchpad. Clicking these “ghost” icons does nothing, as they are just > plain-text terminal database files, not real applications. > > The Fix: > Since .app is a reserved extension on macOS, could the terminal type > names be changed (for example, to iterm_app and iterm2_app) to prevent > this naming conflict?
An alternative fix might be to build ncurses on macOS using one of
ncurses's "alternate configurations".
$ ./configure --help | grep hashed
--with-hashed-db specify hashed-database library
ncurses(3X):
ENVIRONMENT
The following symbols from the process environment customize the
runtime behavior of ncurses applications. The library may be
configured to disregard the variables TERMINFO, TERMINFO_DIRS,
TERMPATH, and HOME, if the user is the superuser (root), or the
application uses setuid(2) or setgid(2).
...
TERMINFO
ncurses can be configured to read terminal type description
databases in various locations using different formats. This
variable overrides the default location.
• Descriptions in terminfo format are normally stored in a
directory tree using subdirectories named for the common first
letters of the terminal types named therein. System V used
this scheme.
• If ncurses is configured to use hashed databases, then TERMINFO
may name its location, such as /usr/share/terminfo.db, rather
than /usr/share/terminfo/.
The hashed database uses less disk space and is a little faster
than the directory tree. However, some applications assume the
existence of the directory tree and read it directly, ignoring the
terminfo API.
...
(Maybe since this "configure" option comes up in the man page, it should
be explicitly itemized in the "ALTERNATE CONFIGURATIONS" section of the
same document?)
Regards,
Branden
signature.asc
Description: PGP signature
