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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display hostname on dtterm?

Status
Not open for further replies.

aixquest

Technical User
Jan 15, 2001
53
US
Are there anyway to edit $HOME/.profile to display hostname whenever open dtterm?

Your help is appreciated...
 
This seemed to work part of it if I entered from the shell. If the line entered in the /.profile and logged out, then logged back in, it didn't seem to work. I have "root" permission to log into the server, does this mean this needs to be in a different .profile file?

Thanks.
 
This is what I have in all .profiles:

ENV=$HOME/.kshrc
export ENV

Then in .kshrc in the home directory of the user, I have

export HOST=`/usr/bin/uname -n`
export USER=`/usr/bin/id -nur`
export PS1='$USER@$HOST: $PWD >'

Note the difference in the single quotes in these statements.

This results in:

root@mycomputer: / >
The info after the : changes whenever I change directory.


 
Thanks for your help. I was able to get it to work by uncomment one line in /.dtprofile for .profile to activate when log in.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top