Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ncurses]

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

0
votes
1answer
18 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
0answers
32 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 ...
5
votes
1answer
132 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 ... ...
1
vote
0answers
37 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
0answers
112 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 ...
1
vote
1answer
81 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 ...
1
vote
1answer
180 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
1answer
321 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
1answer
45 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 ...
0
votes
2answers
138 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
2answers
320 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 ...
0
votes
1answer
295 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
0answers
66 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
1answer
820 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
1answer
91 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
1answer
65 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
1answer
579 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 ...
0
votes
1answer
1k views

Detect terminal resize ncurses, without compiling with --enable-sigwinch

On Arch --enable-sigwinch isn't compiled into ncurses. According to this forum post it can be used to detect a terminal resize. Getting them to turn that option on doesn't seem to be available without ...
2
votes
1answer
1k views

Ncurses not displaying window border correctly in gnome-terminal

I am learning how to use ncurses, and I have noticed that for some reason, in gnome-terminal (on arch) ncurses window borders are not being displayed properly. It seems to work fine in xterm. Not ...
2
votes
1answer
405 views

Linux terminal skipping some (repeating/whitespace) characters

In some console applications my Linux server has started "stripping" certain repeating characters, affecting the user interface significantly. Here are a few examples: This htop view has ...
3
votes
0answers
60 views

Which terminals or terminal emulators support hardware windows?

terminfo(5) manual page describes a set of capabilities wnum (maximum number of definable windows), cwin (define a window), wingo (go to window), wind (resize current window), but only one terminal ...
2
votes
2answers
118 views

Comparing current terminfo database against a terminfo source file

How can we compare all available terminfo entries (full current compiled database) against a terminfo source file ? The infocmp utility has the -F option but it needs two files to be compared, but ...
8
votes
2answers
933 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 ...
0
votes
2answers
2k views

Library Files Not Found, even though they are listed in ldconfig

This is a head scratcher. Below is the output of ldconfig -p | grep libncur* : libncursesw.so.5 (libc6,x86-64) => /usr/lib64/libncursesw.so.5 libncursesw.so (libc6,x86-64) => /usr/lib64/...
0
votes
1answer
535 views

Set terminal TTY line settings while a process is running

When I need to configure terminal line settings when the terminal shell is available, I use stty. When I attach a debugger to a process that's running curses, the current tty settings get in the way ...
0
votes
2answers
153 views

Linux console reverse is in low contrast

Is it possible to change the contrast of the reverse mode of Linux Console ? I would like something in high-contrast, like pure black and pure white. The current reverse mode uses a dark-gray as ...
1
vote
1answer
689 views

Can not find screen and how to install it without network and administration?

I am working on an HPC with LSF job system. screen works fine on logon node and most of the computation nodes which I can ssh into them. which command shows that screen is located under /usr/bin. ...
1
vote
1answer
308 views

`crontab -e` “ruins” terminal

After running crontab -e, My terminal starts acting strange, where characters aren't printed in the correct position. Starting and exiting an ncurses application (like vim and nano) doesn't help, nor ...
0
votes
1answer
999 views

Try to install lib32-ncurses-compat-libs 6.04 on Antegros

When I try to install lib32-ncurses5-compat-libs under Antegros (Arch derivate) I get an error message while checking the PGP signatures. (The error message is in german, but it states, that the PGP ...
1
vote
2answers
1k views

Can't get Qemu output through SSH

Short Version I want to run Qemu on a remote machine using ssh. With this command I am able to see some boot messages but I can't manage to get vm the login prompt in my local terminal. qemu-system-...
1
vote
1answer
227 views

Curses interface has blank spaces under GNU Screen and ssh

I'm trying to run an application sbopkg that uses a curses interface in an ssh session running under GNU Screen (Tmux also has the same behavior). If I run ssh directly from the terminal emulator (...
2
votes
1answer
633 views

Is there a way to provide “overrides” to a terminfo entry?

At least in Linux, on RedHat, the provided xterm terminfo entry is buggy: for whatever reason, they use an initialization sequence via is2 capability that forces an 80-column screen (See CSI ? n l). ...
1
vote
2answers
146 views

Unable to display Greek letters on Mutt 1.7

I recently installed mutt on Linux Mint 18 using apt. I configured it and it worked great for all my three accounts. Then I realized I had mutt version 1.5 while version 1.7 is the latest one. I ...
4
votes
1answer
2k views

Ncurses over ssh - will they be displayed?

I'd like to create a small terminal utility requiring a bit of very simple graphics. Therefore I'd like to use ncurses. Now what I'm wondering is: will a ncurses program or python script that uses ...
6
votes
2answers
2k views

How can I use terminfo entries on FreeBSD?

On my local Linux machine, I'm using termite (VTE-based). It comes with its own terminfo file (xterm-termite), which is not distributed with ncurses by default. I try to connect to a remote FreeBSD ...
2
votes
1answer
152 views

.desktop file for ncurses application

I am trying to create a .desktop file for the calcurse ncurses calendar application: [Desktop Entry] Version=1.0 Type=Application Name=calcurse Comment=an ncurses calendar TryExec=calcurse Exec=...
1
vote
4answers
3k views

Display images in console (curses)?

What approach can be used to display an image in a console (no X windows)? For example, I can use curses/ncurses to divide a console into different panes, but in some situations I would like to ...
6
votes
3answers
2k views

Detecting shift + keyup/down in the terminal

How do I do this? I want a terminal menu where shift+up or shift+down selects multiple lines. ncurses seems to have problems. I don't necessarily need an advanced terminal library. I just want to ...
1
vote
1answer
945 views

Installing tig and ncurses without root privileges

I don't have root privileges on our servers but I would like to install tig. Downloading the source and running ./configure --prefix=$HOME/pkg gives me configure: error: ncurses not found Okay, ...
1
vote
1answer
37 views

How to make program which will react on button pressing (such as “more” on 'q') [closed]

I' m trying to realize, how does work pg\more\less utilities. For example, cat somebigfile | more. More now in interactive mode. His fd table is: 0 (read pipe from cat) 1 (stdout) 2 (stderr) I can ...
5
votes
2answers
348 views

Parse terminfo u6 string

Looking at terminfo and Parameterized Strings. Some examples from infocmp -1 xterm: cud=\E[%p1%dB, given argument 13: \E =><ESC> [ => [ %p1 PUSH parameter 1 (13) onto stack %d POP and print ...
11
votes
2answers
2k views

Why does bash link to ncurses?

I think I've noticed this before but never thought about it much; now I'm curious. > ldd /bin/bash linux-vdso.so.1 => (0x00007fff2f781000) libtinfo.so.5 => /lib64/libtinfo....
2
votes
1answer
166 views

How do I terminate Aptitude safely

I have a TMux session with Aptitude open. The Aptitude process has been "killed" several times with STOP/CONT. Now it doesn't react to the Q key. Instead a 'q' is printed on the top-left corner of the ...
4
votes
1answer
1k views

Mocking a pseudo tty (pts)

We would like to run some curses based apps in background. These apps use curses and get the current tty port name to be used internally to map log files and others context-terminal associations. ...
3
votes
2answers
953 views

preventing terminal prompt from being overwritten by program output

Suppose I run a command like this in the terminal: ~$ echo 'sleep 2; echo "hello!"' | sh then start typing the next line. After two seconds the words "hello!\n" will be inserted into whatever I'm ...
0
votes
1answer
167 views

pager “less”: --quit-if-one-screen without --no-init [duplicate]

I can't get less --quit-if-one-screen (-F) working without --no-init (-X). less --quit-if-one-screen /proc/uptime I see no output. This works: less --quit-if-one-screen --no-init /proc/uptime ...
0
votes
2answers
4k views

A set of libraries like ncurses in a shell script

Supose you present the following TUI in the shell: I need a set of libraries that can be used in the shell to do it. Being sure, ncurses has not been used, because it make a dependecy. Question: How ...
4
votes
1answer
3k views

attron(A_BLINK) using Ncurses does nothing

I'm using Ubuntu 14.04, gcc 4.8.2 and Ncurses 5.9.20140118; whenever I run any code like attron(A_BLINK); printw("Hi"); refresh(); the text that gets printed to the terminal doesn't blinks (or do ...
4
votes
1answer
134 views

Disk usage inside archives, like ncdu

I am a fond user of the ncdu utility to figure out how space is used within a directory. However, I have a use case where I am trying to choose which folders to backup and which folders not to backup,...
5
votes
2answers
3k views

How to create GUIs (such as menuconfig) with lxdialog

I try to generate a menuconfig by my own with the help of lxdialog (source: lxdialog). Unfortunately this is not so well documented as I wished for. Example: So what I did: I included these files (...