Questions tagged [terminfo]

Terminfo is a data base describing terminals, used by screen-oriented programs such as nvi(1), rogue(1) and libraries such as ncurses(3NCURSES). Terminfo describes terminals by giving a set of capabilities which they have, by specifying how to perform screen operations, and by specifying padding requirements and initialization sequences. - taken from the manpage.

Filter by
Sorted by
Tagged with
2 votes
1 answer
494 views

How to generate a termcap string from a compiled terminfo file?

The thread's title pretty much says it all. When I googled this question, I found mentions of a program called untic that supposedly does what I want to do, but this program does not seem to be ...
kjo's user avatar
  • 15.4k
2 votes
0 answers
93 views

How to systematically troubleshoot a broken gnu-screen installation?

I recently started to work in a shared Linux cluster that a version of gnu-screen that I consider unacceptably old (4.01, from 2006). I was not able to convince the system's administrators to install ...
kjo's user avatar
  • 15.4k
0 votes
1 answer
271 views

How does `tput` detect color support

I am trying to make my shell script supporting as much terminals as possible, that is, adding ANSI colors, bold and dim only when supported. However, I want to detect the number of colors supported. ...
sudoer's user avatar
  • 45
0 votes
3 answers
226 views

Linux 9 commands send ANSI/color sequences to monochrome terminal

I'm using a Wyse50 Terminal emulation on Rocky Linux 9. Man pages, help screens, etc., are unusable because the system outputs attribute and color codes that the terminal emulator doesn't understand;...
Darrel Barton's user avatar
0 votes
1 answer
256 views

Ask a terminal whether a glyph is defined by a font vs. directly in its own source code?

Many modern terminal emulators include definitions for box drawing glyphs directly in their own source code, and disregard the versions provided by the font when rendering the display. Is there a ...
rent-yr-chemicals's user avatar
1 vote
0 answers
128 views

is there a list of minimum term capabilities for dialog(ncurses)?

I'm trying to write some code using the ncurses dialog library (available everywhere, source mirror is here) and I'm trying to decide dynamically in code whether to use dialog or just print to stderr ...
Chris Hecker's user avatar
0 votes
1 answer
383 views

in tmux bind MENU key to prefix but it is giving me "bad key bind error"

i just started using tmux and have been trying to bind my MENU key to prefix but it is giving me "bad key bind error", it would be nice to know what keys are valid or what to write in the ...
sanoj's user avatar
  • 1
1 vote
1 answer
265 views

What is the closest xterm-like $TERM setting that does not have an alternate screen? [duplicate]

Some terminal applications (e.g. mosh) use the terminal in the alternate screen, thereby disabling the terminal emulator's local scrolling. mosh does not allow overriding its terminal settings (as far ...
JanKanis's user avatar
  • 1,069
-1 votes
2 answers
258 views

terminal-emulator settings controlling the rendering of bold typeface

The effect of bold typeface (ANSI: CSI 1 m) seems to depend on the terminal emulator. For example, running the following script on different terminal emulators #!/bin/sh echo "TERM = $TERM" ...
user001's user avatar
  • 3,698
1 vote
1 answer
328 views

terminfo/termcap `tput bold`/`tput md`: portability of bold text

Suppose I have the following color support in one of my portable shell scripts: #!/bin/sh set -o nounset tput_init_linux () { set_fg_color='tput setaf'; reset_color=$(tput sgr0 2>/dev/null); } ...
Vlastimil Burián's user avatar
5 votes
1 answer
4k views

TERM=tmux-256color causes "Error opening terminal"

I want to enable italics in tmux (inside iTerm2 on macOS Big Sur 11.3). I have achieved this by setting this in .tmux.conf set -g default-terminal "tmux-256color" And I have installed ...
Klas Mellbourn's user avatar
3 votes
1 answer
2k views

How to list and delete terminfo?

I have installed some custom terminfo with tic command. How do I list all terminfo in the database (e.g. with infocmp) and how to delete specific terminfo? Here's my idea as of right now: On Linux, ...
Gordon Bai's user avatar
1 vote
2 answers
334 views

Get terminal status for termcap capabilities

How can one retrieve status of terminal settings like smam and rmam ? Reason is that I set rmam by: tput rmam in script, then proceed to set smam on exit: tput smam But if terminal has rmam set when ...
ibuprofen's user avatar
  • 2,890
3 votes
1 answer
3k views

What is the difference between "xterm-256color" and "putty-256color"

As the title asked, what's the difference? When should I use one or the other? Also, anyone got a "canonical" definition of putty-256color's termcap/terminfo? Google had been less than ...
pepoluan's user avatar
  • 1,333
2 votes
1 answer
3k views

How to interact with a terminfo database in C without ncurses?

I've been trying to find information for a few days now. To be clear my goal is to create an ncurses-like C library. I'm fully aware of ANSI escape sequence and how to use them. However I want ...
Curiosus Hominem's user avatar
4 votes
2 answers
1k views

What is the actual use of toe command in linux?

I am trying to understand the use of toe command. From the man pages it's difficult for me to figure out what the command does. Plus I cannot find any examples on the internet. from the manpage: ...
Marinos An's user avatar
0 votes
2 answers
2k views

Does terminfo provide an option for /usr/local/share?

Where should I install global terminfo files? Is there a /usr/local/share/terminfo? I would rather not pollute the distro's terminfo files in /usr/share/terminfo.
Evan Carroll's user avatar
  • 30.9k
0 votes
1 answer
70 views

How do I generate a particular (named) escape sequence for the current terminal?

I recently saw a trick that let you sort of "generically" output terminal control codes (based on the current termcap/terminfo settings), but can't find it back. If I remember correctly it let you do ...
natevw's user avatar
  • 184
5 votes
2 answers
636 views

tput ed is empty

The output of tput ed is empty and I can't figure out why. Other capabilities work fine. Also ed is not missing from infocmp output so tput should match, right? $ printf '%q' "$(tput ed)" '' $ ...
cambunctious's user avatar
4 votes
1 answer
1k views

Zsh get terminfo keys with modifiers

The Arch Linux Wiki page on Zsh has an example that gets key sequences from terminfo in it. typeset -g -A key key[Home]="${terminfo[khome]}" key[End]="${terminfo[kend]}" ... But how would I get ...
aaa's user avatar
  • 217
1 vote
1 answer
698 views

How to map and compile terminfo for some terminal?

I have urxvt terminal. It works as it should after manually setting the following: usr @ archlinux ~ : typeset -g -A key usr @ archlinux ~ : key[Home]="${terminfo[khome]}" usr @ archlinux ~ : [[...
canic's user avatar
  • 61
1 vote
2 answers
136 views

less: advertise terminfo through pipe

If I do ls | less, ls detects that it isn't connected to a terminal, which is fair enough. Except that less is connected to a terminal. In this setup, ls could produce the coloured and columnised ...
Eric Toombs's user avatar
0 votes
2 answers
700 views

Emacs with 24bit terminal support on FreeBSD

I'm trying to enable 24bit support on the terminal (via SSH) on my FreeBSD 12 installation without success. I tried to create a terminfo file with the contents: xterm-24bit|xterm with 24-bit direct ...
Rafael Gil's user avatar
0 votes
2 answers
1k views

How to hide text cursor without shell?

I am curious, is there a way to hide the cursor right before it will be placed at the top left corner of the terminal emulator? And do it independently of terminal emulator (not modifying the source ...
Evgeniy's user avatar
  • 183
2 votes
2 answers
279 views

Can you interactively modify the terminal reset in 'less'?

I usually do not want to reset the terminal when I exit less (that is, I want the screen to continue displaying what I was looking at). Usually, when I'm on a new box and haven't configured it yet, I ...
William Pursell's user avatar
3 votes
1 answer
548 views

Logging into remote shells from Konsole on Debian 9 results in "‘screen.xterm-256color’: unknown terminal type",

Before I go into the detail of my problem there is a debian mailing list which seem to explain the cause- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854414 After installing Debian 9, logging ...
vfclists's user avatar
  • 7,531
3 votes
1 answer
28k views

How to set the background color of the Linux console screen?

Note: I reworked the question to clarify the issues. This is a trivial question that can be answered in several parts because the question has several attributes. Unfortunately, the question may be ...
user avatar
0 votes
0 answers
196 views

Custom cl termcap causes vim freeze inside gnu screen

I was concerned about the terminal scroll inside screen, besides I have configured altscreen on it only affects some programs, not taking any effect when switching between windows. I know printf '\...
Tiago Pimenta's user avatar
4 votes
1 answer
401 views

Why do I not need to reset text attributes with less?

This script outputs 5 lines with the third one being underlined: #!/usr/bin/env bash set -eu bold=$(tput bold) reset=$(tput sgr0) underline=$(tput smul) echo 'line 1 line 2 line 3 line 4 line 5' | ...
x-yuri's user avatar
  • 3,373
19 votes
4 answers
14k views

The easiest way to clear scrollback buffer of terminal + some deeper explanation?

Why bother? Clearing scrollback buffer is handy in many ways, for example, when I wish to run some command with long output, and want to quickly scroll to start of this output. When scrollback buffer ...
Anthony's user avatar
  • 647
5 votes
3 answers
5k views

Why isn't screen on macOS picking up my ~/.terminfo?

I'd like to get Terminfo for my terminal (rxvt-unicode) working, so that when I ssh from Linux to macOS, the Home/End and other keys work properly. Usually, to accomplish this with a Linux remote ...
Vladimir Panteleev's user avatar
10 votes
2 answers
3k views

Terminal escape sequences: why don't terminals report what features they support, instead of relying on terminfo?

I've been looking into escape sequences lately, and I'm surprised of what they can do. You can even move an xterm X11 window with them (try printf '\e[3;0;0t'), wow! The most common way to know what ...
peoro's user avatar
  • 3,788
1 vote
1 answer
138 views

Why terminfo entries do not follow convention?

terminfo database contains entries, describing "application mode". By convention, entries which correspond to buttons, pressed on keyboard, start with \EO (this is done so that applications which do ...
Igor Liferenko's user avatar
2 votes
2 answers
295 views

Comparing current terminfo database against a terminfo source file

How can we compare all available terminfo entries (full current compiled database) against a terminfo source file ? The infocmp utility has the -F option but it needs two files to be compared, but ...
Luciano's user avatar
  • 1,159
10 votes
2 answers
2k views

Why END key does not have terminfo entry?

On a Debian system pressing END key generates ^[[F: $ showkey -a Press any keys - Ctrl-D will terminate this program ^[[F 27 0033 0x1b 91 0133 0x5b 70 0106 0x46 But why this ...
Igor Liferenko's user avatar
2 votes
1 answer
324 views

Solaris 11 and vim F instead of end

I'm on Solaris 11 This is My .vimrc set nohlsearch set mouse="" set paste set showmode set ruler set clipboard=unnamedplus setlocal cm=blowfish2 set nocompatible set backspace=indent,eol,start set ...
elbarna's user avatar
  • 12.7k
3 votes
1 answer
1k views

terminfo disable XON/XOFF

I can disable XON/XOFF flow control: stty -ixon So I put this in my "~/.profile". However I have started making my own terminal with "terminfo" and "tic", and I noticed these options: xon_xoff ...
Zombo's user avatar
  • 1
2 votes
3 answers
9k views

get all file names in subdirectories

I need to get all file names, not including the paths eg file1 is correct and ./folder/file1 is incorrect, from subdirectories. My use case is retrieving all available terminfo file names which are ...
Abhinav Gauniyal's user avatar
0 votes
1 answer
2k views

How to use terminfo to set colors for man and less?

I saw this question where the answerer uses termcap to define colors for less which then could be used for how man could be displayed. It said while termcap is obsolete, it's easier while terminfo is ...
shirish's user avatar
  • 12.4k
3 votes
3 answers
3k views

How to determine the character encoding that a terminal uses in a C/C++ program?

I've noticed that SyncTERM uses a different character encoding than the default MacOS terminal emulator, and they're incompatible with one another. For example, say you want to print a block ...
user628544's user avatar
  • 1,565
5 votes
1 answer
3k views

Is there a way to provide "overrides" to a terminfo entry?

At least in Linux, on RedHat, the provided xterm terminfo entry is buggy: for whatever reason, they use an initialization sequence via is2 capability that forces an 80-column screen (See CSI ? n l). ...
Otheus's user avatar
  • 6,138
8 votes
2 answers
4k views

How can I use terminfo entries on FreeBSD?

On my local Linux machine, I'm using termite (VTE-based). It comes with its own terminfo file (xterm-termite), which is not distributed with ncurses by default. I try to connect to a remote FreeBSD ...
Wilhelm Schuster's user avatar
14 votes
1 answer
7k views

Save cursor position and restore it in terminal

I am playing with some terminal capabilities to create async prompt output on bash. I want to get something like this: while outputting string in PROMPT_COMMAND, save terminal cursor position, print ...
Lapshin Dmitry's user avatar
6 votes
2 answers
772 views

Parse terminfo u6 string

Looking at terminfo and Parameterized Strings. Some examples from infocmp -1 xterm: cud=\E[%p1%dB, given argument 13: \E =><ESC> [ => [ %p1 PUSH parameter 1 (13) onto stack %d POP and print ...
ibuprofen's user avatar
  • 2,890
3 votes
6 answers
8k views

How can I get the raw formatting output of commands?

I'd like to know which control sequences are sent to bash by programs to format their outputs. For example, if I dump man less I can discern which parts are bold or underlined. ...
1.61803's user avatar
  • 1,241
11 votes
1 answer
6k views

How can I pass function keys to htop in a tty?

I'm trying to use htop in tty1. However, some of the function keys don't appear to work as normal. F1 and F2 do nothing, and F3 seems to trigger setup (which should normally be triggered by F2). In ...
Sparhawk's user avatar
  • 20k
1 vote
1 answer
977 views

How can I see if termcap or terminfo was used and how to change between them?

When I login to a remote machine (Debian Wheezy in my case) using SSH with Putty (in my case with default xterm), how can I check if the terminal defintion from termcap or from terminfo was used? What ...
Foo Bar's user avatar
  • 3,562
0 votes
1 answer
148 views

term definitions not found

I am trying to select best term for UNIX terminal , checked the term information post , but when I try to get information about ls /lib/term* its not defined. However I did find ls /lib/libtermcap....
JigarGandhi's user avatar
  • 4,960
5 votes
2 answers
9k views

A set of libraries like ncurses in a shell script

Supose you present the following TUI in the shell: I need a set of libraries that can be used in the shell to do it. Being sure, ncurses has not been used, because it make a dependecy. Question: How ...
PersianGulf's user avatar
  • 10.9k