Curses.h - Question

This is a discussion on Curses.h - Question within the Linux Programming forums, part of the Platform Specific Boards category; Hi I am going to be using the curses library, text based graphics for an upcoming project. I downloaded the ...

  1. #1
    Microsoft. Who? MethodMan's Avatar
    Join Date
    Mar 2002
    Posts
    1,198

    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
    -MethodMan-

    Your Move:Life is a game, Play it; Life is a challenge, Meet it; Life is an opportunity, capture it.

    Homepage: http://www.freewebs.com/andy_moog/home.html

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    491
    try export TERM=xterm or dtterm.

  3. #3
    Microsoft. Who? MethodMan's Avatar
    Join Date
    Mar 2002
    Posts
    1,198
    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
    -MethodMan-

    Your Move:Life is a game, Play it; Life is a challenge, Meet it; Life is an opportunity, capture it.

    Homepage: http://www.freewebs.com/andy_moog/home.html

  4. #4
    Microsoft. Who? MethodMan's Avatar
    Join Date
    Mar 2002
    Posts
    1,198
    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!!!!!!!
    Last edited by MethodMan; 01-29-2003 at 09:32 PM.
    -MethodMan-

    Your Move:Life is a game, Play it; Life is a challenge, Meet it; Life is an opportunity, capture it.

    Homepage: http://www.freewebs.com/andy_moog/home.html

  5. #5
    Microsoft. Who? MethodMan's Avatar
    Join Date
    Mar 2002
    Posts
    1,198
    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.
    -MethodMan-

    Your Move:Life is a game, Play it; Life is a challenge, Meet it; Life is an opportunity, capture it.

    Homepage: http://www.freewebs.com/andy_moog/home.html

  6. #6
    Registered User Fredd's Avatar
    Join Date
    Oct 2002
    Posts
    69
    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.
    "Writing software is more fun than working."

    got slack?
    http://www.slackware.com/

  7. #7
    Registered User
    Join Date
    Jul 2002
    Posts
    29
    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
    I like traffic lights. I like traffic lights. I like traffic lights, but only when they're green.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 06:51 PM
  2. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 01:52 PM
  3. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  4. Question about linked lists.
    By cheeisme123 in forum C++ Programming
    Replies: 6
    Last Post: 02-25-2003, 01:36 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21