1838488 Members
2424 Online
110126 Solutions
New Discussion

Login problem

 
Henry Chua
Super Advisor

Login problem

Hi guys, I often see this whenever I telnet to a terminal
"
You have mail.

source /9000/bin/environ

TERM = (hp)
"
What is this, and what should I input? .. is there anyway to get rid of this for future login?

regards
Henry
17 REPLIES 17
kai_11
Occasional Advisor

Re: Login problem

you can edit ~/.profile and comment out the "echo" line.
"You have mail" is a indicator that you need pay some attention to your system because ther are new entry for you in /var/mail directory. You'd better keep this notification.
Patrick Wallek
Honored Contributor

Re: Login problem

Well, the "You have mail." message means just that. You can view your mail via mail or mailx from the command line.

The "source /9000/bin/environ" is something custom to your site that is invoked from /etc/profile or ~/.profile. The is probably an echo statement before the actual statement that sources the environment. If you want to get rid of it, you first need to know from where it is executed and then remove the echo statement.

The "TERM=(hp)" is a question asking you to verify your terminal type. It will default to an hp type terminal. You need to know what your terminal emulator supports to know what to input there. It could be a vt100, vt220, vt320 or any number of other terminal types. Figure out the terminal type and just type it in when that comes up.
Muthukumar_5
Honored Contributor

Re: Login problem

It is automated in /etc/profile or .profile file in your $HOME directoy.

You have mail is indicating that "you are having new mail" and you can view it as using mail or mailx.

TERM is expecting terminal type like vt100 etc.

see /etc/profile or .profile and comment echo statements to avoid this.

hth.

Easy to suggest when don't know about the problem!
Eknath
Trusted Contributor

Re: Login problem

Hi Henry,

This messages are displayed when your .profile file is executed. This file resides in your HOME directory.
You have mail.=> It gives an indication that there is mail for you in /var/mail directory which can be viewed by mail or mailx command as suggested by our friends. I suggest not to comment this line

source /9000/bin/environ=> this seems to be
specific to your server. You can comment this depending upon the importance.

TERM = (hp) =>system is asking you to input the type of terminal you are using to set the emulation(so that some keys work properly like backspace ^C etc). Default is hp, you can input it depending upon th eterminal you use(eg vt100,vt220 etc). Please do not comment this line.

Overall it is just displaying the messages, so i think there is no harm, let it be as it is.

Cheers!!!
eknath
Henry Chua
Super Advisor

Re: Login problem

Hi Guys,

Thanks for the info. It appears that I need to key in vt100 everytime i log onto the terminal, can i edit the .profile or any other files so that I will not need to key in anything prior to the login..

Regards
Henry
Muthukumar_5
Honored Contributor

Re: Login problem

Yep. You can edit /etc/profile using root user and put,

export TERM=vt100

It will not prompt. Put this in the starting "# Initialize terminal" part and before testing TERM variable.

hth.
Easy to suggest when don't know about the problem!
Amit Agarwal_1
Trusted Contributor

Re: Login problem

Run ttytype command to know your terminal type.

$ ttytype
vt220

Add the following line to your .profile
export TERM=vt220

or to keep the .profile flexible for any temrinal, put the following line
export TERM=`ttytype`

PS: ttytype in the above command is within back quotes

-Amit
Amit Agarwal_1
Trusted Contributor

Re: Login problem

I just recalled that instead of explicitly exporting TERM in .profile, you can instead add command line for 'ttytype -s' at the end of your profile. This command would inspect and export TERM appropriatley.
Henry Chua
Super Advisor

Re: Login problem

Hi guys,

This is my .profile file for my user

# @(#) $Header: profile,v 1.3 94/08/09 20:06:25 jeffj Exp $

# Set up the terminal:
eval ` tset -s -Q -m ':?hp' `
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs

# Set up the search paths:
PATH=$PATH:.

# Set up the shell environment:
set -u
trap "echo 'logout'" 0

# Set up the shell variables:
EDITOR=vi
export EDITOR

echo ""
echo ". /9000/bin/sh.environ"
. /9000/bin/sh.environ
echo ""
"
I tried inputting tytype -s and export TERM=vt100 but none of this work? did I script someting wrongly?
Enrico P.
Honored Contributor

Re: Login problem

Hi,
have you added the lines to the end of the profile?

TERM=vt100
export TERM


Enrico
Henry Chua
Super Advisor

Re: Login problem

Hi Enrico,

Yes, I have tried the suggestion given, but it still prompted me to specify my ttytype.. did i miss something out?

Best regards
Henry
Muthukumar_5
Honored Contributor

Re: Login problem

What is there in /etc/profile file? I hope it is prompting that. You can check this as,

-- /etc/profile --
# begin
echo "This is /etc/profile file"

-- $HOME/.profile
# begin
echo "this is .profile file"

I hope it is being executed from /etc/profile file so that changes has to be made in that.

hth.
Easy to suggest when don't know about the problem!
Enrico P.
Honored Contributor

Re: Login problem

Can you send the content of the

/9000/bin/sh.environ

file?

Enrico
Eknath
Trusted Contributor

Re: Login problem

Hi Henry,

First make a copy of .profile and /etc/profile before doing any changes.

Then comment following lines in /etc/profile as shown
# Notify if there is mail
# if [ -f /usr/bin/mail ]
# then
# if mail -e
# then echo "You have mail."
# fi
# fi

and finally comment these lines in .profile
# Set up the terminal:
# if [ "$TERM" = "" ]
# then
# eval ` tset -s -Q -m ':?hp' `
# else
# eval ` tset -s -Q `
# fi

TERM=vt110
export TERM
#echo ""
#echo ". /9000/bin/sh.environ"

any way i still wonder what does ./9000/bin/sh.environ do? Is it used to set environment variables..

Cheers!!!
eknath
Amit Agarwal_1
Trusted Contributor

Re: Login problem

What does ttytype return, when you run from command line?
Devender Khatana
Honored Contributor

Re: Login problem

Hi,

> echo ""
>echo ". /9000/bin/sh.environ"
>. /9000/bin/sh.environ
>echo ""

If this is the .profile for your user then your terminal type is set though this file. Contents of this file may be altered to set it to desired i.e. vt100 or vt220. Another way of achiving it will be to put 'export TERM=vt100'
below the entry of this line in your .profile of thae user for whom you want to set this.

For not viewing the important message like You have mail & all you can put clear in the last line of the .profile for the user allthough it is not recommended.

HTH,
Devender
Impossible itself mentions "I m possible"
Jino.P.V
Frequent Advisor

Re: Login problem

Hi Henry,

Just look at the file I have attached. It is standard .profile of root just after installation. Please see the change I have made to set the tty. I have commented the echo command. Then I have added the TERM=vt100
export TERM

commands. It should work at normal conditions.

hope it may help you to check..

regards,

Jino