- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- rlogin and TERM type issues
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
Discussions
Discussions
Discussions
Forums
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
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
тАО10-06-2004 03:02 AM
тАО10-06-2004 03:02 AM
rlogin and TERM type issues
On the local (I'm running putty) machine, ttytype reports "vt100", but "tset -" reports xterm. $TERM is set to xterm.
When I rlogin to the remote machine, both ttytype and tset - report "vt100".
According to the rlogin man page, the TERM type should be carried across to the remote, but it doesn't seem to go on tset or the $TERM var.
Any ideas?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2004 03:24 AM
тАО10-06-2004 03:24 AM
Re: rlogin and TERM type issues
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2004 03:24 AM
тАО10-06-2004 03:24 AM
Re: rlogin and TERM type issues
If you want xterm togo to remote term, do not set term through puuty, export the TERM explicitely after you login.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2004 03:30 AM
тАО10-06-2004 03:30 AM
Re: rlogin and TERM type issues
RAC, I *want* the xterm variable carried across the rlogin session. I have xterm on local and want xterm on remote, but I end up with vt100 on remote
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2004 04:05 AM
тАО10-06-2004 04:05 AM
Re: rlogin and TERM type issues
if [ "$TERM" = "" -o "$TERM" = "unknown" -o "$TERM" = "dialup" \
-o "$TERM" = "network" ]
then
eval `ttytype -s -a`
fi
export TERM
It will check $TERM information passed on putty there. If it is null or unknown or dialup then only it will make changes as,
by executing ttytype -s -a on shell there so that tset -s, ttytype, TERM variable are having informations there.
To avoid this,
1> Go to putty --> connection --> Terminal-type String to " " / unknown / dialup
or
2> Go to /etc/profile,
#if [ "$TERM" = "" -o "$TERM" = "unknown" -o "$TERM" = "dialup" \
-o "$TERM" = "network" ]
# then
eval `ttytype -s -a`
# fi
# export TERM
It will give what you expect now .. ( output are same now )
HTH.
REgards
Muthu.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2004 04:05 AM
тАО10-06-2004 04:05 AM
Re: rlogin and TERM type issues
Your PC has no clue about the terminfo database and putty or Reflection or NetTerm, etc do not have any idea how to match a local value with the models in the HP-UX terminfo database. The man page is written as to how HP-UX would behave with rlogin to another HP-UX box, not how your PC behaves. rlogin between 2 HP-UX systems will provide a correct setting for TERM without ttytype although I would still use ttytype to set the 3 variables: TERM COLUMNS LINES.
And you never want to force TERM=vt100 or TERM=xterm because you can't predict what the remote user actually has. TERM must be set to a value that matches the terminal emulator, and with many emulators, they can be configured to several emulations. Here's how ttytype works (from the man page):
1. send a Wyse ID string. Wait 1 second for a response. If a response is seen, use the details in the response to find the model number.
2. If Wyse ID fails, try an ANSI query to see if there is a response (ANSI includes DEC VT models, xterm, etc). If true then match the response internally and produce a model number.
3. If 1 and 2 fail, then try an HP terminal query and if OK, use a couple of other queries to identify exactly which model it is. Recent (less than 15 years old) terminals actually return their model number like 700/92.
When you run ttytype -s, a series of shell commands are echoed back. By using the eval command, these lines will set the current shell's TERM, COLUMNS and LINES which are then in turn used by vi, swinstall, sam, and other applications that use the Curses library.
HP's profiles should have all the: if [ TERM=.... ] statements removed and replaced with:
eval $(/sbin/ttytype -s)
Now TERM matches your emulator which is what it is supposed to do. Using whatever a foreign opsystem sends over will always be fraught with perils. Now there are good and bad emulators. A particular emulator may respond as if it is a vt100 but allows page scrolling and programmable softkeys. A VT100 has no such capability.
To see all the models that are in the HP database, use the command:
ls /usr/lib/terminfo/*
(there's about 1,800 entries) You also need to make sure that your rlogin actually runs /etc/profile and then $HOME/.profile or you'll get whatever telnetd or rlogind get from the remote system.
Bill Hassell, sysadmin