Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vi not working properly under xterm

Status
Not open for further replies.

axf31

MIS
Aug 1, 2003
8
FR
Hi,

My system is SunOS host 5.6 Generic_105181-34 sun4u sparc SUNW,Ultra-5_10.

env :
DISPLAY=10.0.12.12:0.0
HOME=/root
HZ=100
LC_COLLATE=en_US
LC_CTYPE=en_US
LC_MESSAGES=C
LC_MONETARY=en_US
LC_NUMERIC=en_US
LC_TIME=en_US
LOGNAME=root
MAIL=/var/mail/root
PATH=/usr/sbin:/usr/bin:/opt/SUNWspro/bin
SHELL=/sbin/sh
TERM=xterm
TZ=MET
WINDOWID=4194317

When I opened a xterm session and I used vi for modifying the file, for example /etc/hosts, I can not see the content of this file.
I don't find the problem, could you help me ?
Thanks.

Regards,

Claude
 
Does this happen on all files you try to edit with vi? Can you create a file and see it when you reopen it? Have you tried setting your TERM to dtterm?
 
Hi Bi,

Same problem on all files.
I created a new file by vi and I can not see the content of this new file too.
vi working properly under telnet and dtterm.

Regards,
Claude
 
Hi afx

try to set your TERM to maybe vt220. This should work.
xterm is not known by vi as an correct TERM.

rgds
Uwe
 
Hi appi,

I agreed with you, vi works properly setting TERM=vt220 but I have several SUN systems and there is only one that behaves strangly with vi under xterm.

Regards,
Claude

 
Try comparing the xterm entries in /etc/termcap on this system and one of those that works.

vi should recognise the "xterm" terminal without problems.

Annihilannic.
 
Hi Annihilannic,

I checked them and the xterm entries are same on all servers.
the problem is very strange.
Thanks.

Rgds,

Claude
 
In fact, there are parameters missing as follows:
rows = 24; columns = 80; ypixels = 316; xpixels = 484
The SunOs doesn't set them itself when a xterm session is open, does it?

Claude

 
I would guess that it's due to differences between /etc/profile and ~/.profile on this and the other server(s).

Try putting this in your .profile on that server:

[tt]eval `/usr/ucb/tset -s -m :\?xterm -Q`[/tt]

It will prompt you for your terminal type, defaulting to "xterm". When you hit return it will hopefully set up your terminal correctly.

Annihilannic.
 
Same problem with the command eval in the file .profile .

Note: the /etc/profile and .profile are same on the both servers respectively.

Claude
 
Weird!

Try typing in stty rows 12 columns 34, using the correct values of course. Does that work?

Annihilannic.
 
Hi Annihilannic,

I set the stty parameters but the problem is same.
I cannot see stty parameters new entries with the stty -a command.

Rgds,

Claude
 
(depending on your shell)
export TERM=vt100
- or -
export TERM=sun

The latter one is to be used when you logon in CDE, the first works almost with every terminal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top