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: ASA: How to connect server with a external IP address already assigned?
Answer: A traditional DMZ would have a firewall between the DMZ and the internet, and one between the DMZ and the inside network.  You can do this all on an ASA, but it depends on the model and licensing.

Internet
--------- Firewall
DMZ (with your spam filter)
--------- Firewall
Inside network


You could make that first firewall a software one, running on the spam-filter server.

So you could have the server on the Internet network as far as the ASA is concerned.  If you have spare ports on your ASA you could just assign one to the outside network (so you have two) and connect your spam server to that.  Then create a firewall rule allowing traffic from the spam-filter server into your inside network as required.  If you don't have a spare port, you will need a switch before the ASA.

You could get more fancy using a DMZ vlan on the ASA itself, and use the ASA to firewall the spam-filter, and the inside network.  This is probably the closest to what your Sonicwall was doing.