Questions tagged [ncurses]
a programming library used for providing a text-based user interface
111
questions
1
vote
1
answer
43
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 ...
0
votes
0
answers
35
views
What's the best way to embed a terminal emulator into my (ncurses) app
Ideally, this would be in the form of a library that gives access to a buffer of characters to display and allows injecting characters and signals via an or character stream.
I am open to creating ...
0
votes
0
answers
70
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 ...
2
votes
1
answer
64
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, ...
0
votes
1
answer
43
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 ...
-1
votes
1
answer
61
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.
1
vote
0
answers
35
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 ...
0
votes
1
answer
129
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 ...
0
votes
1
answer
243
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):
% /...
4
votes
1
answer
882
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 ...
1
vote
1
answer
53
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 ...
1
vote
1
answer
68
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 ...
2
votes
1
answer
656
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 ...
0
votes
0
answers
70
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 ...
1
vote
0
answers
99
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 ...
1
vote
0
answers
30
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....
1
vote
1
answer
61
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.
0
votes
3
answers
237
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 ...
2
votes
2
answers
722
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 ...
1
vote
1
answer
239
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 ...
0
votes
0
answers
234
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 ...
4
votes
1
answer
869
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 ...
0
votes
1
answer
51
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:
$ ...
-1
votes
1
answer
46
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
# ...
3
votes
1
answer
1k
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 ...
-1
votes
2
answers
45
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 ...
0
votes
1
answer
48
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 ...
0
votes
0
answers
370
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 ...
0
votes
1
answer
69
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 ...
1
vote
1
answer
152
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 (...
1
vote
0
answers
2k
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>
...
0
votes
0
answers
181
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. ...
1
vote
2
answers
864
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 ...
0
votes
1
answer
129
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.
...
0
votes
0
answers
88
views
Wrap a program in borders
I want a unix command like this:
$ wrap mc
$ wrap ls
$ wrap vi
It should create a border box with the size of the terminal window and run the command passed to it inside this box so that the command ...
7
votes
1
answer
3k
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. But when I type diff file1 file2 I get ... a text ... ...
2
votes
1
answer
390
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 ...
1
vote
1
answer
615
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 ...
3
votes
1
answer
749
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 ...
4
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" ...
0
votes
1
answer
790
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/...
0
votes
1
answer
187
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 ...
1
vote
2
answers
321
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 ...
1
vote
2
answers
557
views
Make reset on Mac like reset on Linux
On Mac, the reset command in terminal almost does the same thing as clear. On Ubuntu Linux, and maybe other flavors of Linux, the reset command actually "resets" the terminal so that you can't scroll ...
1
vote
1
answer
706
views
ncurses/diag like menu for console for OpenBSD?
Strictly on the console, so no GUI, how can I create similar on OpenBSD, like as YAST uses for SLES?
Cannot find any ncurses or diag packages on OpenBSD ports.
1
vote
0
answers
365
views
Where can I find keyboard key combinations that enter non-printable terminal characters?
For example, in my xterm to get:
000: Ctrl+Space or Ctrl+@
001: Ctrl+A
002: Ctrl+B
003: Ctrl+C
004: Ctrl+D
005: Ctrl+E
006: Ctrl+F
007: Ctrl+G
008: Ctrl+H
009: Ctrl+I or Tab
010: Ctrl+J or ...
0
votes
2
answers
2k
views
Bash script command to search and highlight text in terminal buffer
I need to simulate selecting (highlighting) text that is in the terminal buffer. It's long past stdout so all the grep/awk/sed/redirection stuff is not relevant AFAIK. Plus I don't want it highlighted ...
2
votes
1
answer
188
views
How to automate a keystroke to a cli terminal appilcation like ranger?
I'd like to send a keystroke to ranger, when I have ranger running and have gotten it's PID with:
Output of ps aux | grep '[/]usr/bin/python -O /usr/bin/ranger':
chris 5054 3.1 0.1 116248 ...
1
vote
1
answer
140
views
What libraries/files are needed for ncurses refresh() under a chroot environment in Ubuntu 16.04
I tracked down my issue to the following point. If I run my app by itself it works fine. However if I chroot it, it seems to work fine until the current game ends and then it core dumps calling the ...
0
votes
1
answer
1k
views
ncurses screen/tmux-256color
I have my term set to tmux-256color through .tmux.conf, but I can't get 256 color mode in an ncurses app working. According to this post it should be supported by now. xterm-256color works perfectly ...