Changing terminal emulators
Solution 1
The value of the environment variable TERM is used by the server (in system V, or BSD, derived OSes) to control how input is recognized by the system, and what capabilities exist for output. Some terminal types are similar enough that they can be interchanged while still remaining usefull, while others could make the system unusable until you open a new connection with a supported value for TERM. For example, from one Linux system to another, you would probably experience very little difference between vt100, vt220, and xterm settings. Most of the differences would be in how output is displayed, and whether colors or bold fonts are available to that type of terminal. The termcap database lists all the terminal types, with their various capabilities.
As long as you don't switch to a terminal type that your keyboard and screen aren't compatible with, you'll be fine.
read the man page for term, and termcap, on your system for more information.
To change the terminal type:
in bash:
export TERM=vt100
in bourne shell or ksh:
TERM=vt100
export TERM
in csh or tcsh:
setenv TERM vt100
vt100
is a pretty safe terminal to start playing with. it's compatible with xterm, but it doesn't display colors or bold fonts, and may not recognize your F* keys, but you're unlikely to really mess anything up using vt100.
A lot of people use terminal detection in personal init scripts to optimize their user experience depending how how they're logging into the server. For example, set a plain PS1 if you're using vt100, use color and dynamic variables when using bash in an xterm.
Good luck with your research.
Solution 2
You're misunderstanding.
Your console or terminal or PuTTY instance on the LOCAL side is the actual "terminal emulator", even though nowadays we just shorten then to "terminals". The usage stems from back when people actually used monitor-and-keyboard terminals to sign on to a mainframe server rather than using multiple consoles and graphical user environments.
The $TERM variable simply tells the remote system what kind of control codes your terminal will understand when it sends them (for instance, to generate text-based menus or anything based on libncurses).
I'm not sure what exactly you want to accomplish, but changing $TERM probably won't help.
Related videos on Youtube
Alex
Updated on September 18, 2022Comments
-
Alex almost 2 years
I'm working with an AJAX button and label controls. When the user clicks the button, the data is updated in the label.
But after clicking the button, the Page_Load event occurs, and I don't want it, because all data is being initialized to default values.
How can I check in Page_Load event that it's an AJAX request?
I'm using UpdatePanel and ScriptManager as AJAX tools.
-
Amelio Vazquez-Reina over 12 yearsThanks @Shadur, this is helpful. I would like to enable support for more colors. I am having problems with escaping characters, as I explain in the update in this question. In case it matters, both machines/systems are modern (
Ubuntu 11.10
on my local machine andRed Hat Enterprise Linux Server release 5.4 (Tikanga)
on the remote machine) -
Amelio Vazquez-Reina over 12 yearsSorry, the link was to the wrong question. I just edited my comment above.
-
Shadur over 12 yearsThen your problem still isn't the TERM variable, because my gnome-terminal window, SSHed to a remote server with a $TERM value of xterm has no problems rendering ansi colors. It might be better if you explain your problem rather than asking how to implement what you think should be the solution.
-
Amelio Vazquez-Reina over 12 yearsThanks, but I didn't say that "my problem" was the
$TERM
variable. Also, I am not asking this question for the sole purpose of finding a solution to a different problem/question. If anything, my other question motivated this question. Finally, I don't think there is anything wrong with hoping to learn more about how terminal emulators work by asking this question. -
Gilles 'SO- stop being evil' over 12 years@intrpc Note that it's pretty rare to need to change the
TERM
variable; it's mostly necessary when you log in to an older system that doesn't know about the name of a newer terminal (and there haven't been many new terminal types in the last 15 years or so, most terminal emulators style themselves asxterm
).TERM
is what terminal type programs believe they're talking to, it doesn't change what the terminal actually is.