1825667 Members
3685 Online
109686 Solutions
New Discussion

Re: Global .profile

 
SOLVED
Go to solution
jerry1
Super Advisor

Global .profile

Would anyone happen to already have a .profile
that will work well between sun/hp with
hpterm(not on sun), xterm, dtterm, etc...

Basically a nice user .profile that has known
features that a user might need when working
between these two environments.


1 REPLY 1
Michael D. Zorn
Regular Advisor
Solution

Re: Global .profile

If you need to be able to handle different terminals, here's the part of one I use (runs in Korn shell - and it was built a long time ago - hence the check for ANSI terminals):

.......
# Check for Xwindows:
if [ "X$DISPLAY" != "X" ]
then
print "hello. you're in Xwindows."
export TERM=hp300h
export TERM_INGRES=70092

elif [ $(tty | cut -c6-9) = 'ttys' ]
then
print "hello. you're on the network."
export TERM=vt100
export TERM_INGRES=vt100kNG
export INGRES_KEYS=$II_SYSTEM/ingres/files/qr.map

elif [ $TERM = 'vt100' ]
then
print "hello. you're on a PC."
export TERM=vt100
export TERM_INGRES=vt100kNG

elif [ $TERM = 'dec-vt100' ]
then
print "where did that come from??????"
export TERM=vt100
export TERM_INGRES=vt100kNG

elif [ $TERM = 'ansi' ]
then
print "hello. you're on a PC probably running Windows NT."
export TERM=vt100
export TERM_INGRES=vt100kNG

fi
stty sane
stty erase "^H" kill "^U" intr "^C" eof "^D" susp "^Z"
stty hupcl ixon ixoff
tabs