ncurses programming -- problems in Framebuffer mode?
I am writing a simple ncurses program in C and it displays perfectly in the X terminal (Konsole and xterm).
However, since I boot in the framebuffer mode (to display splash screen using splashy) the program doesn't display properly in the terminal mode. In particular it doesn't seem to calculate the correct screen parameters as returned by the getmaxyx() function. Anybody else noticed this behaviour? Is this an ncurses limitation? ncurses version 5.5 |
I don't get it. It doesn't work in normal terminal mode as well (no framebuffer) but it displays correctly with an X terminal.
Any ideas where I'm going wrong? I've done ncurses programming before and didn't have this problem on my desktop. |
Beats me.
I thought Suse's "Yast2" was a pretty good example of an ncurses-based application ... and Yast2 works fine for me when the system is in text mode (init 3, framebuffer-only). Could the problem lie in the particular framebuffer and/or particular ncurses implementation in your distro? Does the program exhibit the same problem when you try other distros? Sorry I can't be of more help .. PSM |
Well, in the same laptop it doesn't work properly in pure text mode either, but in an X terminal it displays the border and the text in the correct location.
|
Perhaps the problem is with the particular version of ncurses you are using. You might test that by trying the compile on one of your other distros.
|
I have the same version of ncurses on the same distro (Debian) on my desktop. And that program worked fine in the pure terminal mode as well as in an X terminal on my desktop system.
Is there a problem with the pure text mode in laptops which cause this issue. Or is the code the problem? Here's the code: Code:
#include <curses.h> NOTE: the program is not yet complete. It's supposed to display a random quote. |
I found out what was causing this issue. The 915resolution program. I removed it and now it works properly in the terminal mode also.
Strange problem... but I suspected it was something to do with the laptop. |
All times are GMT -5. The time now is 05:48 AM. |