1827809 Members
1981 Online
109969 Solutions
New Discussion

Re: setting TERM value

 
SOLVED
Go to solution
so.nimda
Super Advisor

setting TERM value

Hi,

I'm having an issue which I hope someone can help :

When I su to userA from root, I'm greeted with "TERM = (hp)". However, when I su to userB from root, it doesn't prompt.

I have checked the .profile & .login & .cshrc in /home/userB and there are no "env" or "ttyterm" settings. Same for userA - no settings whatsoever in all 3 files.

However, executing "env" for both users showed "TERM=xterm".

Where is it set? How can I bypass the "TERM = (hp)" for userA?

This is so frustrating.... :(

Thanks in advance !!
:)
7 REPLIES 7
Peter Godron
Honored Contributor

Re: setting TERM value

Hi,
check /etc/profile


Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.

Your profile shows only 2 of 89 answers were rewarded !
Ralph Grothe
Honored Contributor

Re: setting TERM value

It depends on the login shell of the user you su to.
I would guess that the nagging query derrives from the tset command in any of the dot files relevant to the user's shell.
Can you find a command line in any of these files that has something like an
"eval `tset ...?*"
in it?
If the termtype has a leading question mark you alway will be asked for confirmation.
Madness, thy name is system administration
so.nimda
Super Advisor

Re: setting TERM value

Hi Ralph,

Thanks for the reply.

Yes. I see '?hp'.

How should I rectify it?

I do not want to be prompted everytime I switch user.

Regards
Univer_1
Valued Contributor

Re: setting TERM value

hi,

Check the command line which contain "tset".
If there is a " -A " option, delete it.
Ralph Grothe
Honored Contributor
Solution

Re: setting TERM value

Hi rancid,

I was facing a similar annoyance like you with the SAP administrative accounts on our SAP/R3 boxes, who for some odd reason which I never managed to find out, always were insisting on a C shell as login shell, although our SAP DBAs, who are the only people that use those accounts, aren't into the C shell at all (I'm not particularly fond of it either).
So, in one of the csh relevant dot files, viz. $home/.login, I discovered this line (which I commented out as you can see)

#set up the terminal
#eval `tset -s -Q -m ':?hp' `

and replaced it by this line (because our login server is an AIX box from where the aixterm is inherited)

eval setenv `tset -s -Q -m ':aixterm'|tail -1|sed -e 's/=/ /' -e 's/\;$//'`

This replacement will most likely not be suitable for you.
But you can give it any term type that is appropiate for you.
If you're happy with hp term, simply remove the leading question mark, and the term will be set to this without any confirmatory interruptions (so I hope).

If it doesn't work however, please read the manpage of tset (I also would have to read it myself to give a qualified answer here because I long have forgotten the various options and quirks of tset, according to the Unix habit, once set up let it run and safely forget about ;-)

HTH

Ralph
Madness, thy name is system administration
so.nimda
Super Advisor

Re: setting TERM value

Hi Univer,

Thanks for your reply.

Yes it has something to do with the "tset" command.

Regards
so.nimda
Super Advisor

Re: setting TERM value

Hi Ralph,

Thanks so much for the very detailed explanation.

Yes, it's the SAP boxes that are giving me this problem.

I will have a go at your suggestions and recommendations.

Thanks once again.

Regards