- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Setup TERM for console?
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
12-07-2009 01:27 PM
12-07-2009 01:27 PM
Setup TERM for console?
I am setting up a system with a vt100 console, but when I login through that console the TERM = 2392, and this causes the characters to be all weird on my screen. I can manually type "export TERM=vt100", and this fixes the problem.
How can I fix this so my console port uses vt100 mode, and initializes it as such?
I tried /etc/profile, and updated the block
if [ -z "$TERM" ]
case $TERM in
*2392* ) TERM = "vt100" ;;
50) TERM=wy50 ;;
50+) TERM=wy50 ;;
*) eval 'tset -s -Q '#look in ttytype
if [ -z "$TERM" -o "$TERM" = "unknown" ]
then
eval 'tset -s -Q -m ':?wy50' '
fi
;;
esac
fi
I was trying to get the console 2392 to use vt100 for TERM, but I noticed that later the *) statement overwrites my line. Where should I fix this?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2009 01:37 PM
12-07-2009 01:37 PM
Re: Setup TERM for console?
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
echo
echo "Value of TERM has been set to \"$TERM\". "
export TERM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2009 02:47 PM
12-07-2009 02:47 PM
Re: Setup TERM for console?
If this is a normal telnet or ssh connection, then your /etc/profile needs major repair. HP-UX handles dozens of terminal types and should never rely on what is encapsulated by the remote side nor use a hardcoded value. All that testing code should be replaced with this one line:
eval $(ttytype -s)
To see what this command does, just run: ttytype -s
The command performs a terminal identification sequence to avoid the endless problems with hardcoding TERM=something.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2009 02:59 PM
12-07-2009 02:59 PM
Re: Setup TERM for console?
Login into telnet/ssh works fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2009 07:24 PM
12-07-2009 07:24 PM
Re: Setup TERM for console?
ttytype -s
show?
Bill Hassell, sysadmin