Operating System - HP-UX
1752633 Members
6070 Online
108788 Solutions
New Discussion

Issue with user Terminal or Shell or Profile

 
Indrajit Bhagat
Regular Advisor

Issue with user Terminal or Shell or Profile

Hi Team

 

I am getting some geniunen issue:

 

Whenever a user sapadm is looging into the server, he needs to set the terminay tty.

and the vi is working in open mode.

 

abcd:/home/sapadm#su - sapadm
Authorized uses, only. All activity may be monitored and reported
You have mail.
TERM = (hp) tty
avggspbh 21: vi abcd

[Using open mode]

"abcd" [New file]

 

avggspbh 22: echo $TERM
tty

 

Any idea what would be the issue

2 REPLIES 2
Indrajit Bhagat
Regular Advisor

Re: Issue with user Terminal or Shell or Profile

Hi All

 

The Best think i Had done, is copied the home directory from the server, in which his profile was working. Seems issue resolved

Bill Hassell
Honored Contributor

Re: Issue with user Terminal or Shell or Profile

The problem is that your login profiles are not setup to properly handle terminals. The $TERM value must never be set manually as in: TERM=vt100, but instead, should be set using ttytype -s. The default /etc/profile and .profile have not been updated in more than 20 years and are very poor at handling different terminals.

 

All user .profile files should have this line:

 

   eval $(ttytype -s)

 

There may be the deprecated (obsolete, don't use) command tset, possibly in a convoluted if-then-else clause. You can just add the above line after the finish of this part of the code or just put it at the bottom of .profile

 

Now your terminal will be automatically identified and vi will run normally (along with any other terminal-dependent programs).



Bill Hassell, sysadmin