I recently upgraded (with apt-get dist-upgrade) my Kubuntu and Lubuntu Linux boxes, and now every time I log into one of these machines, I get this message:

tput: No value for $TERM and no -T specified


Here is a screenshot of the exact message:


This happened on both my Lubuntu machine and Kubuntu machine, and it wasn't a problem until after I upgraded; so I suspect that it was not user error.

How can I fix this?

UPDATE

I have tracked this down to my .bashrc file, which is getting called by my .profile file.  Though, the fact that my .bashrc file now runs when I do a GUI login whereas it didn't before I upgraded is a bit weird.  And no, I haven't modified my .bashrc file or my .profile recently.  Also, bash isn't my default shell.

The problem is that I am calling tput in my .bashrc file to set up variables for use in adding color to the prompt.  But at the (inappropriate) time when my .bashrc file now gets run, $TERM is not set.

fgRed=$(tput setaf 1)     ; fgGreen=$(tput setaf 2)  ; fgBlue=$(tput setaf 4)
fgMagenta=$(tput setaf 5) ; fgYellow=$(tput setaf 3) ; fgCyan=$(tput setaf 6)
fgWhite=$(tput setaf 7)   ; fgBlack=$(tput setaf 0)
bgRed=$(tput setab 1)     ; bgGreen=$(tput setab 2)  ; bgBlue=$(tput setab 4)
bgMagenta=$(tput setab 5) ; bgYellow=$(tput setab 3) ; bgCyan=$(tput setab 6)
bgWhite=$(tput setab 7)   ; bgBlack=$(tput setab 0)


Updated question: How should I fix this?  Should I set $TERM myself?  Or should I just not set these variables if $TERM is not set?

UPDATE 2

One solution I tried was to check whether $TERM was set. But this didn't seem to work; I still got the same error message.  Here's the code:

if [ ! "$TERM" = "" ]; then
  #Do stuff here
fi


So apparently $TERM was set, but tput still concluded it wasn't.


Question: Is there an organization that reviews/approves crypto implementations?
Answer: Since 1995, NIST has indeed also certified implementations, via the Cryptographic Module Validation Program (CMVP) that validates cryptographic modules for adherence to FIPS 140 standards.

OpenSSL is open source and the OpenSSL FIPS Object Module has been validated via this program: OpenSSL: Important Notes about OpenSSL and FIPS 140-2.


  The OpenSSL FIPS Object Module
  validation is unique among all FIPS
  140-2 validations in that the product
  is "delivered" in source code form,
  meaning that if you can use it exactly
  as is and can build it (according to
  the very specific documented
  instructions) for your platform, then
  you can use it as validated
  cryptography on a "vendor affirmed"
  basis.


Note that, as they say, "it's complicated".  So do check out those links carefully and be prepared for frustrating interactions between the technical and bureaucratic challenges.