Questions tagged [terminfo]

Terminfo is a database of terminal capabilities use by applications that require information about the terminal's features.

Terminfo is a data base describing terminals, used by screen-oriented programs such as nvi(1) and rogue(1).

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.

127 questions
8
votes
2 answers

Features obligatory for TERM=dumb terminal

I am looking to implement a remote client in golang which connects to Linux through nc and starts bash. So I need to tell bash what features I can parse from the stdout that it sends to me, and how I am going to send keycodes and other stuff to its…
anatoly techtonik
  • 19,847
  • 9
  • 124
  • 140
8
votes
1 answer

Using Alt-left/right to switch between windows in tmux

I am trying to configure tmux to switch between windows using alt-left, alt-right sequences. This is what I have in my .tmux.conf bind-key -n M-Left previous-window bind-key -n M-Right next-window Unfortunately, it doesn't work. On my machine,…
Alexander Sandler
  • 2,078
  • 2
  • 19
  • 21
7
votes
2 answers

ACS characters not working in putty even with export NCURSES_NO_UTF8_ACS=1

I am developing an ncurses application myself in C. The problem is that putty displays alternative character set characters like ACS_VLINE as letters. My locale is LANG=en_US.UTF-8 and I have set export NCURSES_NO_UTF8_ACS=1 I have also set putty…
Will
  • 373
  • 2
  • 7
7
votes
1 answer

Writing my own shell: How implement command history?

As an exercise in understanding my computer better, and as a tool, I'm writing my own shell in C++. Stephen Brennan's article on writing a simple shell was very helpful. However, what has me flummoxed is how to handle pressing up-arrow and…
uliwitness
  • 8,532
  • 36
  • 58
7
votes
6 answers

how to clear the screen after exit vim

Sometimes vim will leave something, i.e. press any key to continue, on the terminal and is there any way to return to a clear terminal after exiting vim? I am new to vim and please tell me exactly what I should do. Sorry I did not express my idea…
jcxl
  • 145
  • 1
  • 2
  • 9
6
votes
1 answer

How to install a terminfo entry (eterm-color from Emacs)?

I want to run GNU Screen from within an Emacs term-mode buffer. When I try to do this I get an error: $ screen Cannot find terminfo entry for 'eterm-color'. This error suggests that I should install the eterm-color terminfo entry. I attempted to do…
hekevintran
  • 22,822
  • 32
  • 111
  • 180
6
votes
2 answers

How to set custom search paths for the terminfo database when building ncurses from source

How do I set custom search paths for the terminfo database when building ncurses from source? To be more specific, how do I force the primary directory to be searched in '~/.terminfo'?
Pádraig
  • 515
  • 1
  • 5
  • 7
6
votes
1 answer

Emacs garbled screen on SLURM interactive node

When I remotely login a SLURM interactive node, emacs will sometimes garble the screen. As I describe below, I think the issue is that the SLURM interactive node is messing up the Enquiry/acknowledgment terminal signals and some characters are…
momeara
  • 1,341
  • 2
  • 17
  • 29
6
votes
1 answer

Why is terminfo[kcuu1] = '\EOA'?

From what I can tell reading terminfo(5), kcuu1 should be the sequence that the terminal sends when the up arrow is pressed. I have never, ever seen that be anything other than ^[[A (speaking now about cat, messed up terminal settings, etc). So,…
Steve McKay
  • 2,123
  • 17
  • 26
6
votes
2 answers

Terminfo smkx and Application Cursor Keys vs Application keypad

XTerm Control Sequences specifies the following key sequences: CSI ? 1 h → Application Cursor Keys (DECCKM) CSI ? 1 l → Normal Cursor Mode (DECOM) CSI ? 66 h → Application keypad (DECNKM) CSI ? 66 l → Numeric keypad (DECNKM) and the Terminfo…
fornwall
  • 2,877
  • 3
  • 25
  • 38
6
votes
1 answer

How to implement proper mouse support in a terminal / terminfo entry?

I've implemented a terminal emulator and a corresponding terminfo entry that allows me to run ncurses programs like emacs, mc (midnight commander) or tig (git browser). I want to add mouse support to the terminal, most notably to position the cursor…
tesche
  • 61
  • 4
6
votes
1 answer

Why is there both setf/setb and setaf/setab in tput?

I'm trying to use tput to set foreground and background colors in my terminal in a device independent way. If the whole purpose of termcap/terminfo/tput is to become device independent, why are there both versions that explicitly use ANSI controls…
thoni56
  • 3,145
  • 3
  • 31
  • 49
5
votes
1 answer

Terminal color using terminfo?

I am writing a C++ class permitting the usage of color in terminal. I want it works on every terminal : printing with true color (24 bits) on terminals that supports it, with 256 color (6x6x6) on terminals that supports it, else with the basic 16…
Boiethios
  • 38,438
  • 19
  • 134
  • 183
5
votes
1 answer

How to get control characters for Ctrl+Left from terminfo in Zsh

I'm using terminfo to find out what they control sequence is for the Left (Right, ...) key in my terminal, so that I can then map it to something useful (move left) in my zshrc like this: typeset -A key left=${terminfo[kcub1]} bindkey "$left"…
artfulrobot
  • 20,637
  • 11
  • 55
  • 81
5
votes
2 answers

How can a shell script tell if it is running in an xterm window with 256-color support?

I'm writing a shell script that I would like to use 256-color support when present. In a just world, xterm would simply set the TERM environment variable to xterm-256color and I'd use tput colors to discover the support. But we live in an unjust…
Norman Ramsey
  • 198,648
  • 61
  • 360
  • 533
1
2
3
8 9