Re: Bug: iTerm.app and iTerm2.app terminfo files trigger false macOS app icons

"G. Branden Robinson" <[email protected]> Tue, 28 Apr 2026 09:26:08 -0500
Newsgroups gmane.comp.lib.ncurses.bugs
Message-ID <20260428142608.3tknzaincyenwgwq@illithid>
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 (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmnww3gACgkQ0Z6cfXEm
bc4LEw/8Cf8hThcywyAnD8V4esR0Q4udEHf7HHofF5f5XlIse/kLlUvQ1MdDoDBl
ps3w29q+CsHYKarHBOCsQHO/I2P4cKIirzULclpxiEcytPFLPf3nGmw8vg+/ncM0
w0bSGGNL7+p4i+wgzBvLujOXukb0lpxk1p0OyU2rnuBhwwpZqD/Ff6o1QUnyQhvV
wh38PEdEKcwOSAFHvvQuaQQl6qFb8GeQ1x5KIgvx/wHzApmnVslT/R2iyTgVQS0h
Jcq8q4IFG3WQkJ19N02pZHlg/u2o7TT55UkdwbHBkjeMReCDs+8CG+vYrFbdkigg
JEgANWns7rUBisqhi3fVYD2cY3DrD793K+3BV5koxdjxESfhkc7LCEZ0+zssUblF
1Q+Qo4YGjAJJn++XkKdfXHoKVmEzu4W6JbfCfY1SeX4XQFBBlNB5JaE9cxtOKvJg
6ePrwQUivjDAMhm1cogIVkha/pLbzNSltqfvSS8BmxsKuYW3sglKRq4dWfbsNGhw
XN+z8jDtPgofqE9wCiVn/duQ7KxlavhlVghIrE2SuizahYR8NFHMdUw/ieGu76BU
7BuvV0CPnUaZmqdn8IXWpUH31PYqetCpW90CedymMwmgrXQl0uYrkCL2jNvW4XPI
YquQ0mo7A0FE9EIsFWgF5bG02YiYcYpdEzCEVY5AxZ4O5oWV/B4=
=oTQP
-----END PGP SIGNATURE-----