Previous Thread
Next Thread
Print Thread
Developer ESC sequences (IP, emulation) #26651 10 Feb 05 09:34 AM
Joined: Jun 2001
Posts: 11,650
J
Jack McGregor Offline OP
Member
OP Offline
Member
J
Joined: Jun 2001
Posts: 11,650
I've been asked how to get the IP address and emulation from ZTERM, and where is the online documentation. Here's the deal:

The "online" documentation for ZTERM is installed with ZTERM and is available on the ZTERM Help menu. The ESC sequences can be reached via:

Help | Contents | Developer Information | ESC Sequences

There you will find a list which includes one to query the client IP address.

The question of the current emulation is a bit more complicated. To start with, in most cases, you don't need to query it directly because the standard login sequence (particularly on Linux) will involve querying the telnet client for its emulation, with the end result that the TERM environment variable on the server side will be set to it. (You can adjust the name of the emulation as specified to the server by putting something in the "Telnet Identity" field on the ZTERM Configuration | Emulation dialog. If left blank, it will use the literal name of the emulation, e.g. "am62a", "wyse50", etc.)

So if you want to find out the emulation from within a UNIX script, just reference "$TERM" (for example, "echo $TERM").

A-Shell queries the TERM environment variable and sets the "terminal driver" to match. There are numerous ways to query that, from "SET TERM" at the dot, to various XCALLs such as JOBTRM.SBR. (Search the XCALL Reference for "terminal driver" and you may find others, such as PLYJOB, GETJTB, etc.)

There might also be a standard ESC sequence that terminals such as the AM62A respond to by reporting their emulation, but I'm not sure what it is for if ZTERM supports it.

Re: Developer ESC sequences (IP, emulation) #26652 10 Feb 05 12:00 PM
A
Anonymous
Unregistered
Anonymous
Unregistered
A
Never been there before. Cool. Thanks.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3