- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- TERM How to detect Terminalinformation
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
01-14-2003 04:02 AM
01-14-2003 04:02 AM
TERM How to detect Terminalinformation
Is there a better/more safe way of detecting terminal type then by ttytype?
My problem is, that TERM is set to vt100 by loginscript, byt ttytype tells me it's an vt200, which it's not!
It is an xterm or dtterm, how can that be correct detected?
I DO KNOW, that this can be set by TERM, but I want a autodetect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2003 04:10 AM
01-14-2003 04:10 AM
Re: TERM How to detect Terminalinformation
/* (void)fprintf (stderr, "PRIMARY DA Response: '%s'\n", buf);
* 61: vt100 family
* 62: vt200 family
* 63: vt300 family
* 64: vt400 family (NOT checked!)
* 1: 132-columns
* 2: printer port
* 3: ReGIS graphics
* 4: sixel graphics
* 5: ?
* 6: selective erase
* 7: soft character set
* 8: user-defined keys
* 9: NRC sets
* 13: local editing mode
* 15: DEC technical set
* 16: locator device port
* 18: user windows
* 19: dual sessions
*/
if (strcmp (buf + i, "1;2" ) == 0) return ("vt100");
if (strcmp (buf + i, "1;0" ) == 0) return ("vt101");
if (strcmp (buf + i, "6" ) == 0) return ("vt102");
if (strcmp (buf + i, "12;7;1;10;102" ) == 0) return ("vt125");
if (strcmp (buf + i, "7" ) == 0) return ("vt131");
if (strcmp (buf + i, "62;1;2;6;7;8;9" ) == 0) return ("vt220");
if (strcmp (buf + i, "62;1;2;3;4;6;7;8;9" ) == 0) return ("vt240");
if (strcmp (buf + i, "63;1;2;6;7;8;9" ) == 0) return ("vt320");
if (strcmp (buf + i, "63;1;2;3;4;6;7;8;9" ) == 0) return ("vt340");
if (strcmp (buf + i, "64;1;2;6;7;8;9" ) == 0) return ("vt420");
if (strcmp (buf + i, "64;1;2;3;4;6;7;8;9" ) == 0) return ("vt440");
It scans the DA respons from the terminal (emulator), which - in your case - obviously tell that it is vt200 compatible. So you have to find /why/ the DA respons of your terminal (emulator) is vt200 and fix it.
Enjoy, have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2003 04:30 AM
01-14-2003 04:30 AM
Re: TERM How to detect Terminalinformation
Can tell anything about, where this problem might be?
PS. We use XVision as out frontend
Cheers
Bjarne
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2003 05:00 AM
01-14-2003 05:00 AM
Re: TERM How to detect Terminalinformation
eval `ttytype -s`
tset
in my .profile as a matter of course, and this usually works fine for me, in hpterm and dtterm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2003 05:04 AM
01-14-2003 05:04 AM
Re: TERM How to detect Terminalinformation
man tset. "tset -" reports terminal type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2003 05:32 AM
01-14-2003 05:32 AM
Re: TERM How to detect Terminalinformation
Since vt200 has almost no extra features over vt100 (another keyboard layout if I'm not mistaken), it's easy to deal with in your .profile
export TERM=`ttytype`
if [ "$TERM" = "vt200" ]; then
TERM=vt100
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2003 05:33 AM
01-14-2003 05:33 AM
Re: TERM How to detect Terminalinformation
That was it - thanks!
You should have points, but it doesn't seam to work at the moment - sorry!
Cheers
Bjarne
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2003 08:41 AM
01-14-2003 08:41 AM