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 (command line) 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, Gnome or another GUI, you should not be experiencing this problem. If you are, I’m not quite sure what the problem is, but this solution probably won’t help you. Still, you’re free to try.
This solution is only needed by those either consoled into a machine via a null modem cable, by those who have telnet-ed into a remote machine or if you are using a Sun machine with a Sun keyboard and mouse in text mode (no GUI, for example if your video card driver is not yet installed.) This solution is assuming you are using the default Solaris shell, the Bourne shell (sh).


  1. Set the TERM variable to your terminal type and export it.
  2. Restart (or start) the application.

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. In most cases, if you are consoled into a machine via a null modem cable, this is also the value you should use.

sun If you are physically sitting at the Sun 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:

export TERM

A few things to note:

  • The word “TERM” in the above example is completely CAPITALIZED. You must type it in ALL CAPS, (exactly as written above) for it to work properly.
  • You will need to substitute your value (as determined above) in place of the word <value> — for example, if your value is vt100, you will type TERM=vt100

2) Restart the application.

Run the application again. It should now appear and react to your keystrokes as you would expect it to.

One thing to take into account 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. If you are using the default shell (Bourne),

NOTE TO SELF: In order to finish this article, I need to create a link to an article that explains how to edit .profile and/or .login

PS: Don’t forget to stop by AnySystem.com for all your Sun hardware and consulting needs.

Comments are closed.