List supported terminal types?

16,332

Solution 1

On most systems, you can look for files under /usr/share/terminfo. On some versions of Solaris that may be /usr/lib/terminfo instead. Some system will also have a termcap file, which may be in /etc. /usr/share, or occasionally /usr/share/misc; the terminal names in that are in lines matching ^[^\t].*|, and every name between |s is a valid terminal name. (Technically the first 2-character entry is also valid, but in practice unused; it's left over from a tty driver hack for 6th Research Edition UNIX. Some termcap parsers may also accept the long description, but many won't.).

The definitive answer for any system will be in termcap(5) and/or terminfo(5).

Solution 2

If you have the ncurses package installed, you can use toe(1). Beyond that, something like

ls /usr/share/lib/terminfo/?/*

should work, but the location of the database is not consistent across operating systems.

Solution 3

At first you need to get path of terminfo such as :

 #infocmp -D
/etc/terminfo
/lib/terminfo
/usr/share/terminfo

Then run :

find  /usr/share/terminfo/ -type -f  -print

NOTE: result was about 3000 lines.

It can help you to retrieve list of terminal types

Solution 4

I'm aware that this is a very old thread but for posterity:

My listing was in /usr/share/lib/terminfo and a second one in /usr/csw/lib/terminfo.

I used ls -R /usr/share/lib/terminfo to list all of them.

Share:
16,332

Related videos on Youtube

pra
Author by

pra

Updated on September 18, 2022

Comments

  • pra
    pra over 1 year

    Is there a portable way to list supported terminal types on all NX systems?

    If not, what's the best way to get this list on Solaris?

  • Law29
    Law29 about 8 years
    What is -iname "*" useful for? I would have written \! -type d -print to remove directories. In all, on my machine, find $(infocmp -D) \! -type d -print | grep -v '/README$'. One can replace -print by -ls, which will show which are aliases, or replace \! -type d by -type f to not show aliases at all.
  • PersianGulf
    PersianGulf about 8 years
    You can use : find /usr/share/terminfo -type f