Is it possible to compile in the ncurses screen type to a Linux binary?

After looking at the compilation instructions, I realise… I may need some help :/

Ps: I’m using any-kind-of-Linux-you-want-me-to-install, 64bit version

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/bitcheslovereptar
πŸ“…︎ Dec 16 2021
🚨︎ report
How do you compile the MacOS 10.14 version with ncurses?

Couldn't figure out if was the unix/setup.sh, or hints/macos.sh, etc etc please heip :/

ncurses dependency was easy though...

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/bitcheslovereptar
πŸ“…︎ Jan 06 2022
🚨︎ report
Why does the Ncurses library always leaves few unfreed bytes on the heap after terminating the program properly? Is it normal and healthy thing to do??

#test.c

#include <unistd.h>
#include <ncurses.h>

int main()
{	
     initscr();	
     getch();	
     endwin();	
     sleep(1);	
     return 0;
}

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

$ gcc test.c -lncurses -ltinfo
$ valgrind ./a.out
==11846== Memcheck, a memory error detector
==11846== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==11846== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==11846== Command: ./a.out
==11846==
==11846==
==11846== HEAP SUMMARY:
==11846==     in use at exit: 94,313 bytes in 185 blocks
==11846==   total heap usage: 196 allocs, 11 frees, 103,095 bytes allocated
==11846==
==11846== LEAK SUMMARY:
==11846==    definitely lost: 0 bytes in 0 blocks
==11846==    indirectly lost: 0 bytes in 0 blocks
==11846==      possibly lost: 201 bytes in 3 blocks
==11846==    still reachable: 94,112 bytes in 182 blocks
==11846==         suppressed: 0 bytes in 0 blocks
==11846== Rerun with --leak-check=full to see details of leaked memory
==11846==
==11846== For lists of detected and suppressed errors, rerun with: -s
==11846== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Edit: Fixed the stupid formatting

πŸ‘︎ 55
πŸ’¬︎
πŸ‘€︎ u/yan_kh
πŸ“…︎ Nov 23 2021
🚨︎ report
Anyone else getting this issue? Current ISOs won't load graphical YaST and default to the ncurses version. Happens with net and dvd versions. Dell 8930 so has intel 630 integrated and Nvidia 1070.
πŸ‘︎ 19
πŸ’¬︎
πŸ‘€︎ u/awesomeweles
πŸ“…︎ Nov 18 2021
🚨︎ report
How to make text display in the console as I type it? (C++ and ncurses)

Hi! So I am making a TUI in linux using the ncurses library. I am not really sure what is the end goal yet, but I want it to display my keystrokes and then place it in a string variable so that I can use it at other things.

I can make it get a string from my keyboard and put it into a variable just fine, but I want it to show me the characters that I am actually typing so I can see if I have a typo or something like that.

Thank you in advance!

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Phoenix_Paul
πŸ“…︎ Dec 25 2021
🚨︎ report
Terminal ncurses applications: The RTFM filemanager, an RPN calculator, astronomy & telescope tools (recent upgrades to all). Suggestions for more terminal/curses applications I can code is highly welcome. isene.org/2021/11/Program…
πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/isene
πŸ“…︎ Nov 19 2021
🚨︎ report
[2021 day 9] Visualization of my solution using C++ and ncurses
πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/MitchS134
πŸ“…︎ Dec 09 2021
🚨︎ report
I need help with NCurses

Hi guys im trying to run a simple code on Xcode and I get this errors:

Undefined symbols for architecture arm64:

"_endwin", referenced from:

_main in main.o

"_initscr", referenced from:

_main in main.o

"_printw", referenced from:

_main in main.o

"_refresh", referenced from:

_main in main.o

"_stdscr", referenced from:

_main in main.o

"_wgetch", referenced from:

_main in main.o

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

-------------THE CODE ------------

#include <iostream>

#include <curses.h>

using namespace std;

int main()

{

initscr(); /* Start curses mode */

printw("Hello World !!!"); /* Print Hello World */

refresh(); /* Print it on to the real screen */

getch(); /* Wait for user input */

endwin(); /* End curses mode */

return 0;

}

----------------

I would like to solve this problem, ty all for any help.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Ok-Quit-990
πŸ“…︎ Nov 30 2021
🚨︎ report
Is ncurses 6.3-1 broken?

I just updated ncurses from 6.2-2 to 6.3-1, which made scrolling in neovim with vertical splits behave strangely. Downgrading fixed it. Is this a known issue?

πŸ‘︎ 17
πŸ’¬︎
πŸ‘€︎ u/caagr98
πŸ“…︎ Nov 08 2021
🚨︎ report
Terminal ncurses applications: The RTFM filemanager, an RPN calculator, astronomy & telescope tools (recent upgrades to all). Suggestions to more terminal/curses applications I can code is highly welcome. isene.org/2021/11/Program…
πŸ‘︎ 22
πŸ’¬︎
πŸ‘€︎ u/isene
πŸ“…︎ Nov 19 2021
🚨︎ report
In case you missed it, Toxic (the ncurses client) now has a built-in arcade

As a fun side project I built a game engine into Toxic (as of version 0.11.x) along with some games. The current library includes Chess (online), Conway's game of life, Snake vs. glowies, and Centipede.

I'm open to suggestions for games to implement in the future - preferably something practical, given the constraints of ncurses and p2p.

As a side note, Toxic can still be built without game support for those who don't like fun; see the install instructions.

πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/Jfreegman
πŸ“…︎ Oct 06 2021
🚨︎ report
Is there any way to automatically answer ncurses prompts?

Hey everyone. I often install Ubuntu for other people, and to make the whole process a bit faster, I made a big string of commands I run after an installation to do a variety of things. One of which is installing the restricted packages, and, sadly, it's the only part of my "collection" that requires manual intervention.

When installing ubunu-restricted-extras on Ubuntu 20.04, we get those two prompts (this one and this one) to accept Microsoft's EULA, specifically for the ttf-mscorefonts-installer package. I'd like to automatically select Ok in the first instance, then Yes in the second.

sudo apt install -y ubuntu-restricted-extras does not help.

yes | sudo apt install -y ubuntu-restricted-extras neither

sudo DEBIAN_FRONTEND=noninteractive apt install -y ubuntu-restriced-extras successfully skips the ncurses interface, but it seems to select the default option, which makes it refuse the EULA.

πŸ‘︎ 13
πŸ’¬︎
πŸ‘€︎ u/Silejonu
πŸ“…︎ Sep 08 2021
🚨︎ report
A minimal and beginner friendly 6502 Emulator written in plain C using ncurses for graphics. github.com/f0lg0/6502
πŸ‘︎ 166
πŸ’¬︎
πŸ‘€︎ u/_folgo_
πŸ“…︎ Jul 13 2021
🚨︎ report
ncmpcpp: Featureful ncurses based MPD client inspired by ncmpc github.com/ncmpcpp/ncmpcp…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Nov 07 2021
🚨︎ report
A minimal, single-stepped and beginner friendly 6502 Emulator written in plain C using ncurses for graphics
πŸ‘︎ 125
πŸ’¬︎
πŸ‘€︎ u/_folgo_
πŸ“…︎ Jul 13 2021
🚨︎ report
GitHub - linuxenko/chkservice: Systemd units manager with ncurses, terminal interface github.com/linuxenko/chks…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/oaf357
πŸ“…︎ Sep 19 2021
🚨︎ report
To ncurses or to notcurses?

I'm looking to make some games in the terminal, and looking for opinions on these two libraries.

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/chrsd-
πŸ“…︎ Jul 24 2021
🚨︎ report
ncurses wont work with vscode i believe I've tried everything

first, the problem arose when i tried to make a cpp game but the tutorial showed it with the conio.h file which is something macOS devices apparently cant run. i tried using dummy header files but the conio.h file contained even more headers and it seemed like it would take forever to track down what I needed. then I found ncurses and after about an hour of trying to download the library I got it through homebrew but VSCode won't run some the snake game with ncurses stuff in it. is there any game-friendly input stuff like ncurses that already comes with every macOS device? it seems like every solution is unavailable to me because of the OS. Ive tried editing the path of where the ncruses library is saved even putting it in the same folder as the snake game file and nothing works. I included a screen capture in case it helps

ps. I've also realized for some reason XCode wont run anything. The Run thing is grayed out and when I do cmd+R it does the annoying beep shit pls help. I'm not logged into git hub which apparently causes problems and everything else for xcode seems fine just half my commands do nothing.

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/percocetsyrup
πŸ“…︎ Jul 22 2021
🚨︎ report
Does anybody use the ncurses_wheel_up_button or ncurses_wheel_down_button options?

Issue 2642 discusses removing them. As I understand it, those options were only potentially useful for old versions of ncurses, and now that Kakoune doesn't use ncurses at all, they can be removed. However, it would be nice to know in advance if that would break anybody's configuration.

Anyone here use those options?

πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/thristian99
πŸ“…︎ Aug 10 2021
🚨︎ report
Writing Programs with Ncurses invisible-island.net/ncur…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/PatientModBot
πŸ“…︎ Aug 30 2021
🚨︎ report
Customizing ncurses symbols?

I've tried to modify roads.json, or a couple of other files like the shelter, but the changes don't stick or I end up breaking something. Is this possible or does it require modifying every template?

πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/LogicalAd4298
πŸ“…︎ Sep 07 2021
🚨︎ report
Static linking ncurses in rust

I am trying to create a statically linked executable for a rust project that uses Cursive (with ncurses as backend). I installed the libraries for ncurses-devel, ncurses-static, ncurses-lib as well as did

rustup target add x86_64-unknown-linux-musl

When I try to compile the project using:

RUSTFLAGS='-C link-arg=-s' cargo build --release --target x86_64-unknown-linux-musl

cargo fails with the error:

error: failed to run custom build command for `ncurses v5.101.0`

Caused by:
  process didn't exit successfully: `/vagrant_data/rust-cli-example/target/release/build/ncurses-9d002170cebb3401/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=NCURSESW5_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64-unknown-linux-musl
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64_unknown_linux_musl
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-musl
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_musl
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-musl
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_musl
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=NCURSESW_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64-unknown-linux-musl
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64_unknown_linux_musl
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-musl
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_musl
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-musl
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_musl
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:rustc-link-lib=ncursesw
  OPT_LEVEL = Some
... keep reading on reddit ➑

πŸ‘︎ 7
πŸ’¬︎
πŸ“…︎ Aug 09 2021
🚨︎ report
Unicode doesn't work on ncurses in WSL2

I'm struggling with unicode support in ncurses. Neither Windows Terminal nor standalone console present this correctly. I'm looking for any help how to fix this.

My code is here: ksawerykarwacki/continuous_integration (github.com)

My locale is set like this:

https://preview.redd.it/uf9hg74jio371.png?width=1633&format=png&auto=webp&s=a9bc1c9606c68cca81fc80286ba7ec14d3b8fcfb

And results look like this:

https://preview.redd.it/6k7lsw3nio371.png?width=2565&format=png&auto=webp&s=dfe89402bb0559d11bf6afb7bc3f9c9820411266

https://preview.redd.it/f4931ewoio371.png?width=2672&format=png&auto=webp&s=e29eebc8e396d2934aef77643a953b5c289ef915

πŸ‘︎ 14
πŸ’¬︎
πŸ‘€︎ u/Valgav
πŸ“…︎ Jun 06 2021
🚨︎ report
ncurses - why can't I get consecutive beep() sounds?

Very simple ncurses program - has a call to beep() in a loop. When I run it, I only ever hear a single beep no matter how large the loop limit is.

Code snippet is:

initscr();

for(i = 0; i &lt; beepCount; i++) {
    beep();
}

endwin();

I've verified through printf that beepCount has the correct value (e.g. 3), and I've also just directly tried writing:

initscr();

beep();
beep();
beep();

endwin();

Still only hearing one beep.

Am running this on macOS 11.2.3 through various terminal emulators including the built-in Terminal app, CRT (CoolRetroTerm) and Cathode by SecretGeometry. Same result each time.

All help appreciated - thanks.

πŸ‘︎ 31
πŸ’¬︎
πŸ‘€︎ u/mccalli
πŸ“…︎ Apr 15 2021
🚨︎ report
[OC] Ncurses TCP Chat with encryption end to end C++ github.com/edghyhdz/silve…
πŸ‘︎ 22
πŸ’¬︎
πŸ‘€︎ u/edgarhdz2
πŸ“…︎ Mar 20 2021
🚨︎ report
How to set yast2 value with cli not interactive ncurses Interface?

Hi

As the title says: I build opensuse with packer and when it's installed I only have non interactive SSH into the machine. So I need a way to set some yast variables without actually opening yast!

Pseudo code: Yast2 set remote administration-with-session=true Yast2 set allow-vnc-with-webbrowser.

What settings I actually need to set:

  • allow remote management with vnc session
  • allow the connection with Webbrowser

I think I got the first one with the systemd xvnc socket but the allow with Webbrowser eludes me...

How can I set this without opening yast?

Thanks

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/SurfRedLin
πŸ“…︎ Jul 06 2021
🚨︎ report
Which ncurses bindings should I use under GNU/Linux ?

A search on google gave me three.

https://github.com/repomaa/ncurses-crystal

https://github.com/SamualLB/ncurses

https://github.com/agatan/ncurses.cr

With last modifications between 2018 and now

Any idea which one I should use (i mean apart from "try them all" or "use the most recent") ?

Is there one that is known to perform better ?

Thanks

πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/GrilledGuru
πŸ“…︎ Aug 07 2021
🚨︎ report
Ncurses Mouse Actions and Wayland?

Hello all. I just wanted to confirm. . . .

Do Ncurses mouse actions / mouse handling work through XWayland?

How do they work when a terminal is a wayland terminal, like Alacritty?

Thank you.

πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/robo_muse
πŸ“…︎ May 04 2021
🚨︎ report
What's a good way to clear the terminal screen of a fixed size with no large dependencies such as ncurses?

Hello!

I am wondering whether there is some good way to clear the terminal screen.

A few ideas that I have that are sucky:

Solution 1: Just print as many newlines as there are rows Problem: you are just spamming the terminal history. I don't know whether this is a good solution or no, and how many lines in the past a terminal remembers and whether it remembers regardless and this is actually a good solution.

Solution2: system(β€œclear”) Problem: Apparently, it is a lot slower than regex source

Solution 3: Regex: β€œ\e[1;1H\e[2J” Problem: I have had problems with this. I think it just does the same thing as solution 1 or something...

So yea. Can you tell me which solution is best? I want to run the clear at the very most at 30 fps, and at the very least - whenever the user actively inputs a command. But let's assume the worst case scenario.

Thank you! <3

πŸ‘︎ 19
πŸ’¬︎
πŸ‘€︎ u/rfgzuu
πŸ“…︎ Feb 17 2021
🚨︎ report
ncdu: ΒΏusar el comando du de forma mΓ‘s visual con ncurses? linuxadictos.com/ncdu-ncu…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/cronos426
πŸ“…︎ Jul 19 2021
🚨︎ report
A Text Editor made in C, with only ncurses as requirements

Hello. I am making a text editor from stratch, in C, of course. Does somebody wants to test it? If you find a bug, pls open an issue or I will not know of it. Thanks for reading.

Here is the repository: https://github.com/ArthurBacci64/Teditor

πŸ‘︎ 129
πŸ’¬︎
πŸ‘€︎ u/arthurbacci
πŸ“…︎ Jan 29 2021
🚨︎ report
Problems with ncurses

Hi guys, quite experienced user here, I have a problems with ncurses library in my c# project. I'm using ported ncurses library from cpp, but with an old .dll file name. While trying to fix that by searching by name of the file and trying every name from output of "locate libncurses" and with every try getting error like that:

Unhandled exception. System.DllNotFoundException: Unable to load shared library 'libncurses.so.5.9' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libncurses.so.5.9: cannot open shared object file: No such file or directory

I don't know how to fix it, also tried to install libncurses5-compat-libs which should do the work and got a problem with gpg keys.

Any good solutions for this? thanks!

πŸ‘︎ 2
πŸ’¬︎
πŸ“…︎ Jun 28 2021
🚨︎ report
I made a python/ncurses quiz for learning the US states by heart
πŸ‘︎ 158
πŸ’¬︎
πŸ‘€︎ u/raflemakt
πŸ“…︎ Oct 20 2020
🚨︎ report
Printing my buffer contents to the screen (NCURSES)!

Hi fellas.

I'm currently writing a text editor using Ncurses library(c language obviously) but I hit a dead-end figuring out how can I render the contents on the screen. my intuition was to print the whole buffer content with every single keypress but that would be overkill. can you give me some clues, please!

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/code_passion
πŸ“…︎ Apr 23 2021
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.