- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Term = HP
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 06:43 PM
08-23-2007 06:43 PM
Please help me..Point waiting..
In my Ux 11.23 have SAP ECC 6 and Oracle 10g.
How to make the term always accept HP rather than to press enter when we su - root / su - devadm /su - oradev.
Please help me in urgent.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 06:57 PM
08-23-2007 06:57 PM
Re: Term = HP
export TERM=hp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 06:58 PM
08-23-2007 06:58 PM
Re: Term = HP
you can add it in the .profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 07:01 PM
08-23-2007 07:01 PM
Re: Term = HP
# set term if it's not set
if [ "$TERM" = "" -o "$TERM" = "unknown" -o "$TERM" = "dialup" \
-o "$TERM" = "network" ]
then
eval `ttytype -s -a`
Just add this before this first "if" test:
TERM=hp
If you only want to do this for root, devadm and oradev, you need to do some testing:
case $(id -un) in
root|devadm|oradev) TERM=hp ;;
esac
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 07:07 PM
08-23-2007 07:07 PM
Re: Term = HP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 07:15 PM
08-23-2007 07:15 PM
Re: Term = HP
I already modify .profile for root..it success.
how about the oradev and devadm..
I change the profile in /home/devadm but when i su, it request the term again..please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 07:25 PM
08-23-2007 07:25 PM
Re: Term = HP
You'll have to attach the .profile so we can see what you need to do. (Also tell us what you changed.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 07:32 PM
08-23-2007 07:32 PM
Re: Term = HP
Here the .profile that you mention..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 07:41 PM
08-23-2007 07:41 PM
Re: Term = HP
You can try by editing /etc/profile and at the end put entry
TERM=HP
export TERM
Hope it will then be applicable for all the user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 07:51 PM
08-23-2007 07:51 PM
Re: Term = HP
Thanks to you solutions.
I already manage to get the solution.
I edit the .login for oradev and devadm.
comment the line start with tset.
It works! tq
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 08:31 PM
08-23-2007 08:31 PM
Re: Term = HP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2007 01:26 AM
08-24-2007 01:26 AM
SolutionIt's important to *always* run ttytype in /etc/profile, and remove the profile code that says something like this:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
or this:
# set term if it's not set
if [ "$TERM" = "" -o "$TERM" = "unknown" -o "$TERM" = "dialup" \
-o "$TERM" = "network" ]
then
eval `ttytype -s -a`
fi
The above comment says: set term if it's not set which may have been relevant 25 years ago when all connections were 'real' terminals. But a telnet session may (or may not) carry a terminal ID when a user logs in and there is nothing standard about the value of TERM coming from a non-HP-UX source. For instance, a Linux box may set TERM=linux or TERM=linux-80x25, clearly incompatible with HP's extensive (but not infinite) teriminfo library (found in /usr/lib/terminfo). This TERM setting comes in from the remote client at the start of the telnet session and therefore sets TERM before /etc/profile is started.
So to avoid painful mistakes, always ask ttytype to identify the terminal, regardless of whether it was already set. The important features must match the terminal emulator which is why you never hardcode the values. Terminal emulators are not accurate emulators. The most common emulation is vt100 yet 99% of the emulators allow things that are impossible on a DEC VT100 (see http://vt100.net/ in case you've never seen one), things like changing the columns to 132 or lines to 60, programmable softtkeys, etc. Because there are just so many different programs out there, it is best to always test each connection.
The following code should replace all the lines in /etc/profile that set the TERM, COLUMNS, LINES and ERASE:
if tty -s
then
# always set TERM
eval $(ttytype -s -a)
if [ "$TERM" = "" -o \
"$TERM" = "unknown" -o \
"$TERM" = "dialup" -o \
"$TERM" = "network" -o \
"$TERM" = "dumb" ]
then
export TERM=vt100
fi
stty erase "^H" kill "^U" intr "^C" eof "^D" 2> /dev/null
stty hupcl ixon ixoff 2> /dev/null
# set $ERASE to ^H, if ERASE is not set or set to DEL
# stty erase and $ERASE must match
if [ "$ERASE" != "^H" ]
then
export ERASE="^H"
stty erase $ERASE
fi
tabs
# Turn off the softkey labels 'cause they burn the terminal screens and
# are annoying when editing or watching commands and data...
# (no effect for non-softkey terminals)
# Also send an sgr0 (end enhancements) in case some
# feature like blink is ON for this terminal
tput rmln
tput sgr0
# Some vt100 emulators don't behave right and ttytype
# is unable to determine LINES or COLUMNS. Set a default
# if either one is unset or too small. LINES=4 is a bug
# in ttytype for 8bit VT220 emulators.
LINES=${LINES:-24}
COLUMNS=${COLUMNS:-80}
[ $LINES -le 4 ] && export LINES=24
fi
Once you use the above code, all users will be properly setup so things like vi and swinstall and SAM work correctly no matter what terminal they are using. Note that Xwindow users must enable /etc/profile processing with an .Xdefaults setting. Notice that all this code is protected by tty -s so when /etc/profile is run in batch mode (ie, cron, at, inittab, etc), the terminal-only commands will be bypassed.
And after all the above has been said, the GSP/MP throws a wrench into the middle of everything. For some unexplained reason, the GSP/MP firware designers decided to hardcode your terminal setting (VT100 or HPTERM) and even modified HP-UX code for ttytype to override your TERM settings, regardles of what terminal you are using at the console. So even if you run ttytype at the console, it may not set the correct values. Although I prefer HPTERM, the vast majority of new boxes (all models in the rx or rp product line) are hardcoded to VT100. The best advice: DON'T use the console except for simple commands. If you have to switch between VT and HP like I do, use an emulator that can quickly change emulation mode such as Reflection for HP (*not* Reflection/X).
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2007 01:30 AM
08-24-2007 01:30 AM
Re: Term = HP
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2007 12:19 PM
08-27-2007 12:19 PM