How can I fix the "TERM environment variable not set" warning in eclipse

Posted by Robert on Ask Ubuntu See other posts from Ask Ubuntu or by Robert
Published on 2012-09-14T05:43:42Z Indexed on 2012/09/15 3:48 UTC
Read the original article Hit count: 399

Filed under:

I'm running ubuntu 12.04 LTS and working with eclipse (juno) on a c++ project. I keep getting "TERM environment variable not set" in the console while trying to run the program. I realize this means the variable needs to get set. My question is what should it be set to and how do I set it?

I've read that it should be 'xterm' in a few places. So I added

export TERM=xterm

in my .profile and while eclipse stopped giving me the warning, instead it would output unreadable garbage everynow and then (not a side effect of the program). It did display the program output but intermixed were weird characters. This leads me to believe it's not 'xterm' I should be setting TERM to. Or I'm setting it in an incorrect way.

Any help is appreciated.

Sample output:

**TERM environment variable not set.**


Please make a selection
-----------------------
1. Create a budget
2. Edit a budget
3. Display a budget
4. Save a budget
5. Load a budget
6. Exit

What is your selection: 1
**TERM environment variable not set.**
Enter the name of your budget: 

etc

The program continues to execute as expected but the message is highly annoying

  • As someone has commented, I do use system("clear") which is likely the source of the warning? Either way, is this likely just an eclipse issue or something I can fix in ubuntu/linux

© Ask Ubuntu or respective owner

Related posts about eclipse