Skip to main content

Questions tagged [ncurses]

a programming library used for providing a text-based user interface

Filter by
Sorted by
Tagged with
0 votes
0 answers
47 views

Issues with LINES and COLUMNS on new AlmaLinux 9 install (using Putty)

I seem to be having an odd issue on Almalinux 9 that I have been unable to straighten out. It looks like the LINES and COLUMNS variables are not set full size for interactive login shells, though they ...
GracefulRestart's user avatar
2 votes
1 answer
600 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.6k
-2 votes
1 answer
140 views

Dnf not working after deleting libraries

I am using Fedora 37 and have Linux kernel: 6.1.7-200.fc37.x86_64. While trying to replace some libraries (libncurses.so.5) for STMCubeIDE I have deleted some files in /usr/lib/libncurses*. Now, when ...
GabrijelOkorn's user avatar
2 votes
1 answer
240 views

TERM=fbterm causes box-drawing characters (by curses) get scrambled

I'm writing TUI software on fbterm using python-curses library. To get full color in fbterm, I read it's man page and concluded I need to change environmental variable TERM to fbterm. Man page: By ...
Garid Z.'s user avatar
  • 552
0 votes
0 answers
41 views

ninja IRC client

I'm having a problem when compiling ninja IRC client. (http://ftp.iij.ad.jp/pub/linux/gentoo/distfiles/5b/ninja-1.5.9pre14.tar.gz) It compiles fine, but segfaults upon executing. When strace'ing the ...
ignatius's user avatar
  • 401
0 votes
1 answer
277 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
17 votes
2 answers
3k views

How do interactive CLIs work?

How do command-line applications like Vim work? Specifically, how do they take control of the terminal in the manner they do? Also, for future reference, is there a specific term for applications that ...
Koz's user avatar
  • 173
1 vote
0 answers
134 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
3 answers
456 views

Running process in background ruins terminal

I have this makefile: all: sudo watch "ls -l" > /dev/null & @echo line 1 @echo line 2 @echo line 3 @echo line 4 Running watch (or any other ...
hudac's user avatar
  • 779
1 vote
1 answer
802 views

Get output of a command that uses curses

If I try to get the output (stdout) of a python program into a variable I do this: set zpath (python something.py "$argv") But if the program spawns a curses interface, it won't show. The ...
madprops's user avatar
  • 190
2 votes
2 answers
1k views

How can I get the dimensions of the current font in a terminal?

I am working on an ncurses application that creates some very blocky graphics using alphanum characters. I'd like to be able to detect the dimensions (specifically the aspect ratio) of the font glyphs ...
ttyj's user avatar
  • 21
1 vote
1 answer
587 views

How do I redirect the output of Python curses to a different display?

If the Python curses library takes control of the display, how do I specify which display (amongst multiple GNU screens) it should display to? So that I could code with curses in a live Python shell, ...
Julius Hamilton's user avatar
0 votes
1 answer
167 views

Is there an embedded, artificial screen environment in the terminal to test out curses programming?

I’d like to create a second, artificial screen where I can send the output of my curses commands so that if something doesn’t work I’m not stuck inside a display I can’t get out of. I am using the ...
Julius Hamilton's user avatar
-1 votes
1 answer
527 views

How to calculate TTY-console size (how many characters) with given to display resolution (e.g. 480x320) and given font size (e.g. 14,15 or 16)?

I don't have this 3.5" display yet, so I couldn't just test it with tput cols and tput lines. I'd like to know how many characters fit in both axes, before I develop a software with curses.
Garid Z.'s user avatar
  • 552
1 vote
0 answers
78 views

A decent text-user-interface stopwatch?

I'm looking for something like this: but preferably TUI (ncurses-based), with support for multiple stopwatches (and giving names to them) able to survive being closed and re-opened (a stopwatch only ...
MWB's user avatar
  • 123
0 votes
1 answer
443 views

emacs ./configure encounters missing function 'tputs' when cross-compiling for arm-linux-gnueabihf

I'm trying to cross compile Emacs for an armv7l system on my main rig through an Arch virtual-box, and so far I've had no issues until the ./configure stage. I've properly set up the build, host, and ...
itz-el's user avatar
  • 1
0 votes
1 answer
788 views

ncurses applications not working in iTerm2

I cannot get commandline tools that use ncurses to work in iTerm2. They either fail or fall-back to some other UI if they have it (e.g. text only). Example for VLC (installed via Homebrew): % /...
scetoaux's user avatar
  • 101
5 votes
1 answer
5k 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
1 vote
1 answer
104 views

Is there actually a "pad(3NCURSES)" manual page?

In the man page for ncurses(3X), we read: Special windows called pads may also be manipulated. These are windows which are not constrained to the size of the screen and whose contents need not be ...
David Tonhofer's user avatar
1 vote
1 answer
352 views

cli real-time monitoring of web server traffic per second over time (ncurses)

Is there a tool that can be used to monitor the traffic a web server is processing in real-time from the command line? I'm looking for a cli ncurses tool like nload, but one that can show the requests ...
Michael Altfield's user avatar
2 votes
1 answer
3k views

Strange error with GnuPG: claims "no secret key" when terminal is too small

This is the content of my .gnupg/gpg-agent.conf: pinentry-program /usr/bin/pinentry-curses When I try to retrieve a password from pass' store, e.g. via pass -c path/to/password in a very small-sized ...
Enlico's user avatar
  • 1,677
1 vote
0 answers
233 views

How to grep on a ncurses display (refreshed every second)?

When running the useful tool tcptrack in the terminal (over SSH), it displays this: Client Server State Idle A Speed 1.2.3.4:44054 5.5.5.5:443 ...
Basj's user avatar
  • 2,549
1 vote
0 answers
193 views

Interpret bash escape sequences and other characters using ncurses

I want to design a terminal multiplexer like tmux, but not that complex, something minimal, that works remote, using ncurses. On the server side, the workflow is as follows: The server process ...
rel0adedd's user avatar
0 votes
0 answers
33 views

Tool for human interpretation of XTerm escape sequences? [duplicate]

Basically, I want a tool to interpret the raw output of commands that output ANSI color codes, terminal reset codes, etc. in the Linux/Unix/macOS terminal. Something based on https://invisible-island....
telotortium's user avatar
2 votes
1 answer
268 views

libcurses based audio visualization

I would like to use a small terminal window to view the histogram of amplitude vs frequency of the current audio output master mix e.g. Or (much more) like htop's colored bar graphs.
Vorac's user avatar
  • 3,115
0 votes
3 answers
705 views

How to handle applications that used outdated shared libraries?

I'm trying to run GDB on a rolling release version of Linux that is looking for libncurses.so.5, but the system has version 6 installed. I've seen solutions where people use ln to link libncurses.so.5 ...
Roy's user avatar
  • 5
3 votes
2 answers
3k views

In this \033[01;32m VT100 style ANSI Escape Sequences what is the 01; and the m?

This came from ~/.bashrc PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' Notice the \033[01;32m I know \033[ is a Control Sequence ...
Sameh Ramzy Labib's user avatar
1 vote
1 answer
564 views

NCURSES SW runs in lxterminal, but doesn't run in a native Linux terminal [closed]

I wrote a "complex" C program using the ncurses library. It "correctly" runs in a lxterminal or gnome-terminal session; but doesn't run in a "native Linux terminal" session without X started (obtained ...
Sir Jo Black's user avatar
0 votes
0 answers
505 views

zsh colors get messed up when exiting some programs or resizing window

I face this issue with some programs that take over the full terminal, like ncmpcpp, weechat, cava, pipes.sh, and nvtop. If I resize the window after loading these programs, the color scheme changes ...
aravk33's user avatar
  • 103
5 votes
1 answer
2k views

The deciphering of ncurses escape sequences

Help me to decipher the escape sequences created by ncurses library and catched by strace. I am exploring how ncurses interacts with terminal and want to understand its "handshake protocol". I have ...
MiniMax's user avatar
  • 4,153
0 votes
1 answer
141 views

Odd behavior of ncurses depending of TERM value

I am trying to understand the following issue. Consider the following ncurses program: #include <curses.h> int main() { initscr(); noecho(); printw("0000000"); getch(); } Compilation is: $ ...
malat's user avatar
  • 3,112
-1 votes
1 answer
92 views

Cannot install calcurse on RHEL8

I am unable to install calcurse on RHEL8.1. The error is that the ./configure file in the tarball does not recognize ncurses as installed: # git clone https://github.com/lfos/calcurse # cd calcurse # ...
user1234_10minutesmail.com's user avatar
3 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
-1 votes
2 answers
64 views

Trouble compiling ncurses 5 on SLES 2011

To my chagrin, I am working as a non-root user on an SLES (SUSE Linux Enterprise) 11. I'm not root and cannot have packages installed. I'm trying to build ncurses-5.9. The build configures and make ...
einpoklum's user avatar
  • 9,643
0 votes
1 answer
73 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
0 votes
0 answers
541 views

Linux mint | methods are missing from ncurses

I lately installed a linux mint distribution for development... Later on i installed curses, ncurses and ncursesw by using following commands... sudo apt-get install libncurses-dev sudo apt-get ...
genaray's user avatar
  • 101
0 votes
1 answer
179 views

piping /dev/tty to ipython without losing formatting or tab completion

I want to insert code into the beginning of an ipython session, and then use ipython interactively. Let's say I run cat <(echo 'import itertools') /dev/tty | ipython. I get an interactive iPython ...
wlad's user avatar
  • 135
2 votes
1 answer
286 views

Force Bash to use 8 colors

I made some animations and a game that are to be played in the terminal and they rely on the terminal only having 8 colors available. When I run them on a Terminal that has 16 colors available (...
some_guy632's user avatar
1 vote
0 answers
3k views

_curses.error: setupterm: could not find terminal

A lot of people have been getting the following error message when using curses in python: Traceback (most recent call last): File "/home/bertil/anaconda3/bin/vd", line 152, in <module> ...
Bertil Johannes Ipsen's user avatar
0 votes
0 answers
331 views

CLI or ncurses tool for browsing local network?

I have a console-only SSH-based pivot box inside a remote location. I want a console or ncurses-based tool that shows me active real-time information on which hosts are up. IP, hostname, etc. ...
stone.212's user avatar
  • 337
1 vote
2 answers
1k views

Cannot display 8-bit characters in xterm in ubuntu 18.04

I have tried every method I could find in the forums, and cannot display any 8-bit character in an xterm window, under kubuntu 18.04 (nor in earlier versions). All characters in range 0x20-0x7e ...
PRButterfield's user avatar
0 votes
1 answer
179 views

Exit alternate screen after crashed ssh-tmux session

After I get disconnected from my tmux session over ssh (I have to use the ssh ~. command to exit), the mouse start displaying control characters like 80;31M65;80;31M65; when I click or turn the wheel. ...
Evann Courdier's user avatar
14 votes
2 answers
11k views

Command-line diff tool

So we all have the diff command installed by default. I certainly don't know how to use it well. But I would expect some reasonable default usage. Yet when I type diff file1 file2 I get ... a text ... ...
Vorac's user avatar
  • 3,115
2 votes
1 answer
924 views

What happens if terminal is resized in ncurses `doupdate`?

The doupdate function in ncurses will try to update screen size if necessary: ncurses/tty/tty_update.c: if ((SP_PARM->_endwin == ewSuspend) || _nc_handle_sigwinch(SP_PARM)) { /* * This is a ...
Cyker's user avatar
  • 4,364
2 votes
1 answer
1k views

Resize window in multi-thread ncurses program

The overall question is simple: How to gracefully resize a window in a multi-thread ncurses program? Details here. I have read a few relevant questions (1, 2, 3). From my understanding, there are ...
Cyker's user avatar
  • 4,364
4 votes
1 answer
1k views

pipe into a curses program

The library ncurses provides an interactive user interface. However, I was wondering what would happen if you pipe something into the program. So i tried like this: # echo foo | my_curses_prog It ...
Cyker's user avatar
  • 4,364
5 votes
1 answer
1k views

Touchscreen for ncurses, beyond mouse?

Does ncurses have any support for touch screen computers? Will a touch screen trigger the same events in ncurses that a mouse does? For example, does tapping on a touch screen produce a "mouse click" ...
Tyler Durden's user avatar
  • 5,753
0 votes
1 answer
1k views

Failed "make menuconfig" [closed]

Until now I was able to run make menuconfig successfully. I tried to install cmake packages and thereafter I get, make menuconfig: make[1]: Entering directory '/home/dullollis/esp/esp-idf/tools/...
Sunil Dullolli's user avatar
0 votes
1 answer
373 views

convert ncurses binary dump into text

I have a ncurses dump (with for example screen recorder from GNU screen) and I would like to convert it into text (there are some conversations in it, some lists and other things, all text, but ...
THESorcerer's user avatar
1 vote
2 answers
491 views

NCurses over Mosh, altcharset

The simplest program that should draw a horizontal line: int main() { initscr(); for (int i=0;i<10;i++) addch(ACS_HLINE); getch(); endwin(); } works ok localy, but over MOSH connection result ...
MetNP's user avatar
  • 510