Questions tagged [termcap]

The termcap database is an obsolete facility for describing the capabilities of character-cell terminals and printers. It is retained only for capability with old programs and new programs are supposed to use terminfo

Filter by
Sorted by
Tagged with
2 votes
1 answer
39 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 ...
  • 14.2k
2 votes
0 answers
24 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 ...
  • 14.2k
0 votes
0 answers
67 views

slow command output scrolling in xterm + screen

Expected behaviour: Output of ls /* whizzes by very quick. Actual Behaviour: $ time ls /* ... real 0m21.003s user 0m0.082s sys 0m0.095s It takes 21 seconds for this command to complete. The ...
1 vote
0 answers
59 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 ...
0 votes
1 answer
488 views

linux (gnu-) screen: remap Ctrl-a (default command key) to Alt-a in 'one go'

Looking for a way to remap screens C-a or ^a (default command) binding, to Alt-a or ^[a by using an easy to memorize, one-go command / switch. I know this can be possible in 2 steps, but also only ...
  • 1
1 vote
1 answer
195 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); } ...
3 votes
1 answer
2k 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 ...
  • 1,293
1 vote
0 answers
226 views

Termcap not working in Debian 10

I just installed a headless Debian server, so far with an old monitor for initial setup. While doing the initial configuration and setup, I noticed one "inconvenience" - less always keeps innards of ...
  • 21
2 votes
1 answer
146 views

Ctrl-Backspace in vim broken after upgrade

Under FreeBSD’s xterm the following setting made vim delete the last word after pressing ctrl+← (“Control+Backspace”): set backspace=indent,eol,start inoremap <C-?> <C-W> cnoremap <C-?&...
  • 2,454
4 votes
1 answer
2k views

How can I make screen go down a line AND start at the beginning when receiving only CR from a serial device?

I am connecting to a serial port using screen: screen /dev/cu.usbserial-A703XAOG. The device on the other end sends only a carriage return to separate lines. Screen only starts at the beginning of the ...
2 votes
2 answers
266 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 ...
0 votes
0 answers
176 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 '\...
4 votes
1 answer
360 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' | ...
  • 3,093
0 votes
1 answer
424 views

Bright background in termcap

I'm trying to get a program I'm running to display a bright colored background, but the program won't apply the brightness increase, it instead shows a 'normal' colored background. Let me add some ...
-2 votes
1 answer
1k views

Is there a difference between declaring a terminal (e.g. xterm-256colors) via $TERM vs. from terminal program?

By default, Putty identifies itself as "xterm" terminal type, but it's possible to change its settings so it identifies itself as "xterm-256colors". As far as I understand, this is done by setting "$...
  • 301
9 votes
1 answer
2k views

Change Search Highlight Color In Less

I am a bit lost here on customizing the search/find highlight color or font format if you will. I understand that using LESS_TERMCAP_* we can alter the font format of less display. Full capabilities ...
  • 574
13 votes
4 answers
9k 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 ...
  • 405
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 ...
6 votes
3 answers
566 views

How to hide fullscreen CLI program output in xterm on FreeBSD?

When I use a fullscreen CLI program on Ubuntu (like less or vim) in xterm and then quit it, the fullscreen output of that program is not visible anymore. However, when I do the same on FreeBSD, the ...
1 vote
1 answer
290 views

openSuSE termcap settings

For some reason under openSuSE Tumbleweed I am unable to use different termcap entries. To be specific, I'm trying to use the pcansi-25 termcap entry. Anyone know why it's behaving like this?
  • 393
7 votes
1 answer
2k views

Origin of /etc/termcap linux entry

Why is there a type of $TERM called linux described in /etc/termcap? Why and when was it created and what's the point of it? Couldn't we just stay with vt-generic? Is linux just a customary name and a ...
2 votes
2 answers
1k views

Alternate screen on FreeBSD's sc and vt

By default, FreeBSD's virtual terminals (sc and vt) don't restore previous terminal content when exiting from a full screen app. Is there a support for this functionality? I've tried following ...
3 votes
6 answers
7k 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,161
1 vote
1 answer
828 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 ...
  • 3,412
12 votes
1 answer
5k views

page up in gnu screen with Shift-PageUp [duplicate]

In the Linux terminal the key sequence Shift-PageUp can often be used to scroll up. However, this key sequence doesn't seem to work in gnu screen when ssh'ing to particular machines. I have two ...
  • 350
3 votes
1 answer
878 views

Cursor movement related tput commands under zsh: can the 'clear' behavior be configured?

Using the zsh shell, I've noticed a difference in the behavior of the tput command compared to bash. For instance With zsh, if you have many things output to a terminal emulator window and you're at ...
user avatar
62 votes
2 answers
20k views

Documentation on LESS_TERMCAP_* variables?

I see these pretty colors in manpages viewed with less when setting a bunch of these variables. What do they mean, where is the documentation? Is this interpreted by less or termcap? screenshot
  • 723
3 votes
2 answers
1k views

GNU Screen: Strange TERMCAP when using -d -m

Depending on how I run screen, it either does or does not have the right TERMCAP info. The symptom of this is that colors don't always show up in my terminal correctly (eg: ls, vim syntax highlighting,...
  • 1,262
105 votes
4 answers
19k views

Is there any way to exit "less" without clearing the screen?

Relatively often, I find myself wanting to quit less but leave what I was viewing on the screen, to refer back to. Is there any way to do this? Workarounds? (My current workaround is to quit, then ...
10 votes
2 answers
4k views

Colored man pages not working on gentoo

I have a problem using these methods to get colors in my man pages in gentoo. I've asked already in the gentoo forums but it still doesn't work, and the comments in a bug report (Bug 184604) don't ...
  • 274
3 votes
1 answer
415 views

vi mode doesn't display correctly on new term

This is a continuation of my previous questions. I currently have the following in ~/.zsh.d/functions.sh function zle-line-init zle-keymap-select { psvar[1]="${${KEYMAP/vicmd/}/(main|viins)/-- ...
88 votes
8 answers
43k views

Colors in Man Pages

When I look at a man page in my 'console' (not an xterm) I see some coloration, but I don't get this in my xterm's (e.g. konsole) is there any way I can enable this? hopefully a fairly simple solution?...