-
Curses.h - Question
Hi
I am going to be using the curses library, text based graphics for an upcoming project. I downloaded the library since it didnt come packaged with the distro. I am able to run certain programs, but when I get a program with colours, I get an error and it wont exectue. 'Error - no color support on this terminal'
Is there any way to fix this?
I am using KDE, and I even tried different shell windows available like XTerm and others, and still got the same error.
Thanks
-
try export TERM=xterm or dtterm.
-
Will I try this on the command line before I execute the code?
And once that line is executed, and it works, will I ever have to execute that statement again?
Thanks
-
I checked the env table, and TERM was already set on xterm, I exported it and tried to execute the code, but it still will not execute the code.
Also dtterm does not exist.
Any other suggestions?
Thanks
//Edit, the code will not execute from my machine, However I loaded it on the school server and when I execute it from there in the same console I tried before it executes!!!!!!!
-
Well if anyone else comes across this they now know the answer.
When a shell windows is open. File > Linux Console.
The colours will then work.
-
Actually it's TERM=xterm-color. this only applies to the terminal you type it into.
I think you can put it in .xinitrc though.
-
If you want to avoid this problem on any terminal, you should make use of terminfo, so you don't try to access functionality that doesn't exist on the terminal.
Take a look at the terminfo man page. (And don't ask me, I just know the theory :)
Skarr