Q: I'm trying to use vi, but instead of clearing the screen and allowing
me to view my file, it jumbles the file and none of the commands react as
expected.
or in more general terms,
"In console mode, I'm trying to use any application that requires use
of the full screen (SunVTS, vi, etc) and when I launch it, it doesn't correctly
show the entire screen. It looks like a garbled version of the application
I'm trying to use."
A: If you are using CDE or another graphical interface, you will not
be experiencing this problem. If you are, we're not quite sure what the problem
is, but this solution probably won't help you.
This solution is only needed by those either consoled into a machine via
a null modem cable, by those who have telnetted into a remote machine or
if you are using a Sun machine with a Sun keyboard and mouse in text mode
(no GUI.) This solution is assuming you are using the default Solaris shell,
Bourne shell (sh).
SUMMARY:
1) Set the TERM variable to your terminal type and export it.
2) Restart the application.
DETAILED:
1) Set the TERM variable to your terminal type and export it. First you have
to find out what type of terminal you are using. Since there are many possibilities,
we'll leave this up to you to figure out. However, here are some guidelines
that will cover the majority of situations:
value situation
-------- ---------
vt100 If you are telnetted into a machine remotely, chances are this is
the value you should use.
vt100 In most cases, if you are consoled into a machine via a null modem
cable, this is the value you should use.
sun If you are sitting at the machine and using a Sun keyboard and mouse,
but the screen is only text (no graphics or windows, like in CDE), this is
your value
Once you have figured out what kind of terminal you are using, type:
TERM=<value> (substitute your value in place of the word 'value' -
i.e. TERM=vt100)
export TERM
Please note that "TERM" in the above examples is CAPITALIZED. You must type
it in all CAPS for it to work.
2) Restart the application. It should now appear as you expect it to and
react to your keystrokes properly.
One thing to note is that this change is only temporary. When you disconnect
from the current session, and log back in it will revert to the previous
behavior. In order to make this change permanent, you need to add the commands
used above to your .profile or .login file, depending on which shell you
are using.