Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After upgrading to Maverick I have my TERM variable set to 'dumb', this does not happen with the same home dir running from Lucid and I didn't manually changed anything related to TERM.

Any idea where is the TERM variable expected to be set from?

share|improve this question
add comment

3 Answers

up vote 8 down vote accepted

To elaborate on what Gilles says, suppose you are remote connecting to your ubuntu from Windows using Putty.

In the putty config options, under Connection->Data there is a setting called terminal-type string. You can set your TERM there and putty instructs SSH to set that environment variable. At some point after that your shell is going to be executed, probably /bin/bash and it gets its environment from its parent process, probably the sshd process.

The same holds true if you ssh from a remote linux box, its just that the local TERM environment variable is passed through via ssh to the remote connection.

In the case of a terminal emulator it is the job of the terminal emulator to set the TERM environment variable. e.g. getty sets TERM to "linux" and forks a shell process (/bin/bash). or gnome-terminal sets TERM to "xterm" and forks a shell process.

share|improve this answer
    
I have checked and gnome-terminal works fine, it is really an "emulator" bug. I am using terminator. Thanks –  João Pinto Aug 24 '10 at 6:58
add comment

To answer your question literally, the terminal emulator is supposed to set $TERM

To solve your problem would require at least knowing what terminal emulator you use. It could be a bug or misconfiguration in the terminal emulator or a problem with your shell startup files (probably ~/.bashrc, but possibly ~/.bash_profile, /etc/bashrc, /etc/profile, ...).

¹ Assuming you're not using a hardware terminal; then it would be the argument to getty, called from inittab (older releases using SysVinit) or /etc/init/tty*.conf (Ubuntu ≥9.10, using Upstart).

share|improve this answer
1  
getty is not called from inittab, Ubuntu doesn't have an inittab any more! The consoles are defined by /etc/init/tty*.conf –  Source Lab Aug 24 '10 at 6:18
2  
I think you get a badge for the first use I've seen of footnotes in an answer :-) –  poolie Nov 17 '10 at 1:44
add comment

If you want to change the terminal make sure you check out the update-alternatives functionality.

For instance:

update-alternatives --config x-terminal-emulator

Many of the various system default options in Ubuntu are set via this method. Another common one would be a www-browser

update-alternatives --config x-www-browser
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.