Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
142 views

How could I acomplish a TUI similar to the one of terminal fzf?

I'm developing a 6502 emulator in C and I want make a interface similar to the one of fzf, something like this: notice that the interface doesn't clear the entire screen. I want to make something ...
mjkloeckner's user avatar
-1 votes
1 answer
63 views

NameError: name 'setupterm' is not defined??? How can I solve it?

NameError: name 'setupterm' is not defined ?? How can I solve it? File "c:\Users", line 5, in screen=curses.initscr() ^^^^^^^^^^^^^^^^
Ahmed Mahmoud's user avatar
0 votes
0 answers
18 views

Is it possible to configure ncurses to hardcode a terminfo path relative to the executable instead of an absolute path? [duplicate]

I am building ncurses from source (and then linking my application to it) as part of the build process for my application, and I have observed that the built binaries have the absolute path of the ...
merlin2011's user avatar
  • 74.4k
1 vote
1 answer
52 views

magic number in compiled format of tic

I am reading about the terminfo file format and the format of tic compiled files. I found the documentation of this format, but in this documentation they write about the first two bytes in the file ...
idabsent's user avatar
2 votes
4 answers
1k views

ncurses program using MinGW-w64 fails with "Error opening terminal: xterm"

I am trying to write a very simple ncurses program, just to play around with, using mingw-w64 on Windows 10. I installed the mingw-w64-x86_64-ncurses package with pacman, and am using the MSYS2 ...
Stunk x Chunk's user avatar
0 votes
0 answers
131 views

DeleteCriticalSection could not locate dll

I am trying to recompile an old Win32 software package in order to bring small modifications. The package is part of the MT SDK from Xsens and allows to get output from a inertial sensor (available ...
edgar's user avatar
  • 1
1 vote
2 answers
83 views

Can I push/pop attributes with tput?

In the answer to this question, it uses the following (simplified): echo "this is $(tput bold)bold$(tput sgr0) but this isn't" But that tput sgr0 resets all of the text attributes. I'd like ...
Roger Lipscombe's user avatar
0 votes
1 answer
448 views

How to get white (or other) color on FBTERM and CURSES without scrambling BOX drawing characters?

My question & current states: I'm writing TUI software that is on fbterm using python-curses library. My objective here is to get some colors, most importantly PURE WHITE color. My current state: ...
Garid's user avatar
  • 105
5 votes
2 answers
404 views

Rails 7 IRB console inserts escape key instead of execute delete command

I am using Mac OS and since latest rails version the delete key does not work anymore. ❯ rails -v Rails 7.0.4 ❯ ruby -v ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21] When I hit ...
YvesR's user avatar
  • 6,162
1 vote
1 answer
94 views

why does ''tput ed'' delete lines, instead of just clearing one line?

i want to rewrite first line but tput is removing all lines instead of first line im testing this cl=$(tput ed) tput sc echo 'line1____' echo 'line2____' echo 'line3____' sleep 1 tput rc echo "...
stuffy's user avatar
  • 119
2 votes
1 answer
233 views

Why terminfo breaks my build on lack of versioned symbols in libtinfo.so?

terminfo-0.4.1.4 breaks a build of hls not finding a specific version of some symbols from libtinfo.so, one of them being tigetnum. There is also this warning, which I see when building other programs:...
Kamil's user avatar
  • 23
1 vote
0 answers
107 views

Removing dependency on Terminfo package from a GHC compiled binary

I'd like to remove terminfo package from the default dependencies of my GHC installation, as the generated executable does not run in a particular environment without libtinfo, saying: ./Main: error ...
Keigo Imai's user avatar
3 votes
0 answers
68 views

Mercurial: no terminfo entry for setab/setaf

I am SSHing from macOS into Windows and using Mercurial remotely. Whenever I run any hg command, I'm getting a bunch of warnings, starting with no terminfo entry for setab/setaf: reverting to ECMA-48 ...
Deling Ren's user avatar
0 votes
1 answer
1k views

How to get 256 color support for FreeBSD headless console/terminal?

How can I get 256 color support on FreeBSD 13 headless machine using console/terminal? I have an overkill GPU "AMD Radeon PRO WX 2100" installed to the machine. Basically want to avoid a ...
Max Dax's user avatar
  • 69
1 vote
2 answers
1k views

How to get current keyboard cursor position in Linux terminal

I am dealing with an issue in Ubuntu. I want to get current keyboard cursor position in terminal via Gcc any assist...
synapsis's user avatar
3 votes
1 answer
2k views

CMake error in FindTerminfo with clang-15 on MacOS

I'm using llvm in my project and find it with cmake's find_package(LLVM REQUIRED CONFIG). Configuration fails with message: [cmake] CMake Error at /Applications/CMake.app/Contents/share/cmake-3.23/...
gavrilikhin.d's user avatar
3 votes
1 answer
445 views

Termcaps for log-like terminals such as github/gitlab CI environments

GitLab and GitHub both support coloring their output with escape sequences. But GitLab (I didn't test the default TERM value in GitHub) sets TERM=dumb which is a good default, but techincally ...
nponeccop's user avatar
  • 13.6k
0 votes
1 answer
186 views

Disabling git colors only when I log in from certain terminals

Question I want git to automatically colorize the output when it is going to a device that can handle color and not colorize it when it cannot. How would one do this? Background I sometimes develop ...
hackerb9's user avatar
  • 1,823
1 vote
0 answers
22 views

How to reset $(tput bold) only? [duplicate]

I’m making some post-formatting of a log for better readability. Using regular expressions, my script recognizes some patterns in the stream and makes the correspondent text bold by inserting the $(...
oneastok's user avatar
  • 323
1 vote
1 answer
569 views

Reset only the foreground color using terminfo

By using the ANSI sequence Esc[39m in a terminal, it is possible to clear the foreground color without altering other attributes like bold, underline, or the background color. For example: echo -e &...
yolenoyer's user avatar
  • 9,320
1 vote
1 answer
290 views

xterm reports wrong escape sequences on raw input

I am currently trying to do raw input in Linux (e. g. the stuff I'd normally use ncurses or similar). I already got so far as that every single keypress is directly reported to my application and is ...
writzlpfrimpft's user avatar
1 vote
1 answer
339 views

Terminal-agnostic color printing in C without using ncurses

I'm writing a C program that outputs test results, and I'd like it to print them in color so it's easier to scan through the results. I initially just used ANSI color codes (per https://stackoverflow....
sheesania's user avatar
  • 247
6 votes
1 answer
283 views

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/...
momeara's user avatar
  • 1,371
0 votes
2 answers
834 views

What is the meaning of special character sequences like `\027[0K`?

I found this commit from facebook infer, and I have no idea what \027[0K and \027[%iA means. What does these special string mean? And (I think) if there are more strings like this, where can I find ...
sangwoo-joh's user avatar
0 votes
1 answer
205 views

tmux color profile (-2) when starting in iterm2 or other places

I am using iTerm2 with tmux and invoke it by doing: tmux -CC new -s MySession I was wondering if there is any use in doing something like -2 when invoking tmux in iTerm2, or if that takes care of ...
David542's user avatar
  • 109k
1 vote
1 answer
177 views

How can I send clear or reset with Term::Cap?

When I output tput clear | hexdump -c I get different results if I'm on kitty or xterm. How can I use Term::Cap to generate these terminal signals on the respective terminal? What I've tried is a ...
Evan Carroll's user avatar
  • 82.1k
0 votes
1 answer
304 views

SIGWINCH, bash, dash, tput, and terminfo

I'm a little confused about the interaction between tput and terminal sizes. It seems that the behavior of tput depends on the shell under which it is invoked, or perhaps the shell is responsible for ...
William Pursell's user avatar
1 vote
2 answers
1k views

Get terminal contents [duplicate]

Is it possible to get a snapshot of the text contents of a Linux terminal? Both tput and terminfo support "cup" mode (e.g. tput smcup to start alternate buffer mode) which implies they must save the ...
hash-bang's user avatar
  • 662
2 votes
1 answer
169 views

How can I find documentation/knowledge/mentorship/ancient tomes for terminal definitions? (getting vim terminal title setting to work with tmux)

I have scoured the internet for an explanation, but the cryptic terseness of t_ts and t_fs makes it impossible to find helpful information about how I can expect systems to work. Here is an overview ...
Steven Lu's user avatar
  • 42.9k
0 votes
0 answers
56 views

Type conversion `operator` function returning pointer to function

I wanted a means of allowing terminfo escape sequences (esp. resulting from calls to tparm()) to be stored in strings, so I wrote this wrapper class. class tputs_wrapper { private: static ...
Paulo1205's user avatar
  • 944
0 votes
1 answer
186 views

How to print without loosing current input in linux terminal?

So lets say we have a c program that runs in a linux terminal that continuously needs to print information. Buy also at the same time you have to be able to input text. The program has a prompt that ...
Dreamable's user avatar
1 vote
2 answers
2k views

how to enable mouse movement events in curses

How do I enable mouse movement events in curses? I found this Mouse movement events in NCurses, Xterm Control Sequences and ncurses_mouse_movement but I don't understand from that, how to enable ...
Rolf's user avatar
  • 84
5 votes
1 answer
10k views

Color codes for tput setf

I am sourcing a file with this content export fgBlack8="$(tput setf 0)"; export fgRed8="$(tput setf 1)"; export fgGreen8="$(tput setf 2)"; export fgYellow8="$(tput setf 3)"; export fgBlue8="$(tput ...
Benj's user avatar
  • 979
1 vote
1 answer
1k views

Print out a terminfo entry including capname descriptions?

What's the most straightforward way to print out a terminfo entry (e.g., for my current terminal: xterm-256color) that includes the short descriptions of each capname from the terminfo man page? I ...
jomoz's user avatar
  • 29
1 vote
2 answers
2k views

How do I fix opening terminal error with c++ ncurses

I'm using CLion 2018.2.6 on MacOS. I'm trying to use ncurses but getting the error "Error opening terminal: unknown." I'm not sure how to fix this. Any help appreciated. Code below. #include <...
user205073's user avatar
5 votes
1 answer
996 views

Screen truecolor Ubuntu 18.04 broke

One of the few pieces of software that I compile myself is screen. I've found it tends to support some modern features of terminals better than the version in the repositories. I've been doing this ...
James's user avatar
  • 660
1 vote
1 answer
3k views

ncurses test programs failing with message "Error opening terminal: xterm"

(Note: this is similar to this question, but the answer there does not apply.) Running under FreeBSD, I have ncurses installed via the usual pkg method for FreeBSD, but because I've seen some odd ...
varro's user avatar
  • 2,452
1 vote
1 answer
1k views

Recognize linux distribution in conan

I created a Ncurses conan package for some projects where I use Ncurses. I use a conanfile.py for configuration. Now I have the problem that under Centos terminfo is in /usr/lib and under Debian-based ...
Thomas Sablik's user avatar
2 votes
1 answer
2k views

How does ncurses search for terminal descriptions

I'm building ncurses 6.1 from source for some reasons. First I configure the sources with ./configure and then I build it with make both without arguments. When I try to run tests I get the error ...
Thomas Sablik's user avatar
4 votes
2 answers
823 views

What's the difference between cursor_up (cuu1) and key_up (kcuu1) in terminfo(5)?

In terminfo(5): Variable String Capname TCap Code Description cursor_up cuu1 up up one line key_up kcuu1 ku up-arrow key I tried with tput and they produce the same output: $ tput cuu1 | hexdump -...
pynexj's user avatar
  • 20.5k
1 vote
1 answer
596 views

Recognizing special keys without taking over the screen

In a program that uses the curses or ncurses library, the getch() function can recognize either an ordinary character (like 'x') or the escape sequence sent by the arrow and function keys. For example,...
Keith Thompson's user avatar
0 votes
1 answer
5k views

_curses.error: setupterm: could not find terminal, Raspberry Pi

Every time I run this script on my Raspberry Pi: import curses import RPi.GPIO as GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BOARD) motor1a = 7 motor1b = 11 motor1e = 22 motor2a = 13 motor2b = ...
Supermanny's user avatar
1 vote
1 answer
120 views

Delay in terminfo parameterized strings

In the manpage of terminfo, it is mentioned that $<> in the encoding for specifying delay in ms, and within it's angular brackets is the a number with at most one decimal place of precision. ...
tkhurana96's user avatar
1 vote
1 answer
177 views

terminfo parameterized string %d encoding behavior

I'm trying to understand the behavior of %d encoding in terminfo's parameterized string parser. The relevant man page is here and states that - %[[:]flags][width[.precision]][doxXs] as in ...
Abhinav Gauniyal's user avatar
1 vote
1 answer
114 views

How to check if a highlight attribute is displayable on a terminal?

I am writing a plugin and need to check if a highlight attribute (bold, italic, underline and so on) is actually displayable on a terminal. I tried to check it with termcap. For example of the ...
Rick Howe's user avatar
  • 439
0 votes
1 answer
90 views

Why does terminfo disagree with read? [duplicate]

I'm using xterm. If I type infocmp $TERM | grep end, I see that kend=\EOF. However, if I type read, and then the End key, I see that the sequence \E[F is generated. This seems to be a problem with ...
blippy's user avatar
  • 1,530
0 votes
1 answer
4k views

osx _curses.error: setupterm: could not find terminfo database

I'm using python curses and developing under PyCharm. but whatever a simple curses program, it always gives me such an exception. what i had tried were: add export TERM="xterm-256color" and export ...
Crabime's user avatar
  • 684
2 votes
1 answer
202 views

`%l` encoding in terminfo parameterized strings

I am implementing a parser in C++ for parameterized strings(which are used for specifying some terminal capabilities for a terminal). Then I came across this % encoding on the man page of terminfo: ...
tkhurana96's user avatar
-2 votes
3 answers
577 views

Matching `terminfo` capabilities

Is there a way to match terminal/console features with entries in terminfo database? For example, to find a closest match to Windows console or other type of non-traditional terminal. There are no ...
anatoly techtonik's user avatar
1 vote
1 answer
1k views

terminfo for windows console that is using read(stdin) for input

I am writing an application that connect to a Linux box from Windows console over a custom socket, and I need to tell the Linux box what my console is capable of through TERM environment variable. For ...
anatoly techtonik's user avatar