- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ttytype cannot recognize "xterm" and "dtterm" term...
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
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
11-21-2001 03:30 AM
11-21-2001 03:30 AM
Why ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 03:54 AM
11-21-2001 03:54 AM
Re: ttytype cannot recognize "xterm" and "dtterm" terminals
The problems are reported when a dtterm of geometry != 80x24 is used to
rlogin/telnet to a remote system. The resulting connection will not
function correctly with curses applications until "eval resize" is
called.
The best workaround found is to link the vt200 terminfo DB entry on the
remote system to that of dtterm.
Does this sound like your scenario / problem ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 05:42 AM
11-21-2001 05:42 AM
Re: ttytype cannot recognize "xterm" and "dtterm" terminals
The dtterm terminal is 80x24.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 05:52 AM
11-21-2001 05:52 AM
Re: ttytype cannot recognize "xterm" and "dtterm" terminals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2001 07:31 AM
11-21-2001 07:31 AM
SolutionHow is TERM set?
1) ttytype
/etc/profile contains these lines:
# set term if it's not set
if [ "$TERM" = "" -o "$TERM" = "unknown" -o "$TERM" = "dialup"
-o "$TERM" = "network" ]
then
eval `ttytype -s -a`
fi
export TERM
So if TERM is not set or set to "unknown", "dialup" or "network" ttytype tries
to identify your terminal.
This TERM setting is finally exported.
Usually you won't need ttytype to identify your current terminal.
How does ttytype try to identify a terminal
ttytype sends an identification request sequence to the terminal.
Finally the terminal's answer is interpreted using an ttytype internal mapping.
Undocumented feature: ttytype -D exactly shows the communication between the
ttytype command and the terminal.
Due to these facts a xterm is identified as vt100, which shouldn't be a problem
as xterm is vt100 compatible.Same is true of dtterm.
2) Start a local terminal (hpterm, dtterm or xterm) with a shell in it. The
xapplication (hpterm, dtterm, xterm) knows how to set TERM and passes this info
to the shell.
3) When you start a telnet or rlogin to another system the TERM still keeps set.
So the ttytype command of /etc/profile is NOT executed. According to the manpage
of telnetd the TERM is passed between to telnetd, which inherits it to the
shell.
4) su or newgrp (without the - option): TERM remains unchanged.
5) 'su -' or 'newgrp -': See the approriate man-page: In general TERM will get
lost, thus ttytype will be executed as part of /etc/profile. With HP-UX 11.0
TERM will remain unchanged!
Do you have a specific problem ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2001 03:11 AM
11-23-2001 03:11 AM
Re: ttytype cannot recognize "xterm" and "dtterm" terminals
I modified the line where TERM is checked in the /etc/profile script in order to check LINES COLUMNS and ERASE vars.
Then TERM was wrongly updated.
Now I restored the original line and I added a IF clause to check those vars:
if [ "$LINES" = "" -o "$COLUMNS" = "" -o "$ERASE" = "" ]
then
eval `ttytype -s -a | grep -v "^TERM="`
fi
These lines get properly the terminal geometry and ERASE char.
But unfortunately all user $HOME/.profile scripts executes an stty command to force the ERASE char of the session to ^H.
I had to modify these user profiles in order to prevent this because the /etc/profile sets properyly this value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2001 03:17 AM
11-23-2001 03:17 AM
Re: ttytype cannot recognize "xterm" and "dtterm" terminals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2001 04:22 PM
11-24-2001 04:22 PM
Re: ttytype cannot recognize "xterm" and "dtterm" terminals
dtterm usually looks like a vt200 series and can return vt200 or vt220. However, there are several differences between the vt200 capability and dtterm. To see this, use the commands:
untic vt200
untic dtterm
So the problem is not with ttytype but with dtterm which is unable to provide any feedback on just what value for $TERM to use. I would put in code to test for vt200 and vt220 and if true, set TERM=dtterm.
Or you can use a smart terminal emulator (hpterm) which can be accurately identified. hpterm has the advantage of fitting common character mode tools like sam and swinstall and Glance, without clumsy workarounds.
Bill Hassell, sysadmin