Operating System - HP-UX
1836746 Members
3000 Online
110109 Solutions
New Discussion

can't vi on N4000 console

 
Michael Mai
Occasional Contributor

can't vi on N4000 console

How do I set the terminal on N4000 console so I can use vi to edit a file?
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: can't vi on N4000 console

"export term=hp"


Pete

Pete
HGN
Honored Contributor

Re: can't vi on N4000 console

Hi

The terminal type is not correct that is why you are having this issue

You could do a TERM=hp
export the TERM

Rgds

HGN
Bill Hassell
Honored Contributor

Re: can't vi on N4000 console

Does your N4000 have an HP terminal such as a 700/9x model? If so, you can login and check the setting of TERM:

echo $TERM

If it is not set, run this command:

exec $(ttyset -s)

Then vi should run OK. When you login, ttyset should have been run automatically but if someone hardcoded TERM=something in your login profile, vi will have problems.


Bill Hassell, sysadmin
Torsten.
Acclaimed Contributor

Re: can't vi on N4000 console

eval `ttytype -s`

is the key.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Bill Hassell
Honored Contributor

Re: can't vi on N4000 console

Oops, Torsten is correct, eval not exec:

eval $(ttyset -s)

(darn keyboard...)


Bill Hassell, sysadmin