- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Setting the default term type on tty ports
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
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
04-27-2001 01:34 PM
04-27-2001 01:34 PM
I need to set the default terminal type for serial (tty) connections to vt100. The snippet below from the man pages on getty says:
____________
getty(1M)
/usr/sbin/getty [-h] [-t timeout] line [speed [type [linedesc]]]
type
The default terminal is none; i.e., any crt or normal terminal unknown to the system. Also, for terminal type to have any meaning, the virtual terminal handlers must be compiled into the operating system. They are available, but not compiled in the default condition.
____________
How do compile them into the "operating system?" I assume this means a driver in the kernel. What would the name be?
Is there another way for me to make sure that terminal connections are vt100 by default?
Thanks,
-Brad
Will give just do points.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2001 01:45 PM
04-27-2001 01:45 PM
Re: Setting the default term type on tty ports
Term type can be set in .profile and exported.
e.g. TERM=vt100; export $TERM
Hope this helps,
Brad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2001 02:45 PM
04-27-2001 02:45 PM
Re: Setting the default term type on tty ports
if [ "$TERM" = "" ]
then eval ` tset -s -Q -m ':?vt100'` else
eval ` tset -s -Q `
fi
However, when someone logs in via a terminal (i.e.: Telnet is ok) durring login the system says "terminal type unknown." Which makes me think I need to tell the system, not the users session what the default terminal type should be. Also, getty (above) talkes about loading things into the kernel. Something tells me there is more to this than just setting "TERM," but I don't know what driver to load or exactly how to go about fixing this problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2001 05:48 PM
04-27-2001 05:48 PM
SolutionUnder normal network logins (telnet), the terminal type is negotiated with the telnet daemon and the originator. Some telnet code fails to provide a terminal value and sometimes telnetd will set TERM=unknown. No problem as /etc/profile should be coded to handle this situation:
if [ "$TERM" = "$UNSET" -o "$TERM" = "unknown" -o "$TERM" = "dialup" -o "$TERM" = "network" ]
then
eval $(/sbin/ttytype -s)
fi
ttytype will attempt to guess what type of terminal is being used. It does this by sending common query codes and if no response, tries others. If all your terminals and/or emulators are truly dumb then you can hardcode the TERM value in /etc/profile with just:
export TERM=vt100
Now I indicated this works on 'normal' Unix logins through modems, terminals and telnet. Tools like remsh or Xwindows bypass these tests and you'll need to accomodate them differently.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2001 05:28 AM
04-28-2001 05:28 AM
Re: Setting the default term type on tty ports
Just a few words to add to previous answers that relate to more general case. Especially Bill' answer is full.
But in Bradd's question serial terminals are mentioned.
In the previous versions of HP-UX it could be possible to connect type of terminal with a serial line in a file
/etc/ttytype. Although i didn't try it in HP-UX11 I hope this works as previously. Syntax of /etc/ttytype is simple, in the first field type of terminal should be put and serial line in the second field.
Hope this helps.
Rgds.